vsoch / gridtest

grid parameters and testing for Python modules and functions
https://vsoch.github.io/gridtest/
Mozilla Public License 2.0
2 stars 1 forks source link

PyFlakes code cleanup suggestions #26

Closed cbrueffer closed 4 years ago

cbrueffer commented 4 years ago

Description

Hi @vsoch, to slowly get started on the JOSS review I ran PyFlakes on the code. Here is the output, I think there's some good low-hanging cleanup fruit in there:

chris@stellar:~/repos/gridtest/gridtest$ pyflakes *
client/check.py:11:1 'sys' imported but unused
client/check.py:12:1 'os' imported but unused
client/update.py:12:1 'os' imported but unused
client/test.py:12:1 'json' imported but unused
client/test.py:14:1 're' imported but unused
client/shell.py:11:1 'gridtest.main.test.GridTest' imported but unused
client/shell.py:74:5 'gridtest.main.test.GridRunner' imported but unused
client/shell.py:74:5 'gridtest.main.test.GridTest' imported but unused
client/shell.py:74:5 redefinition of unused 'GridTest' from line 11
client/shell.py:85:5 'gridtest.main.test.GridRunner' imported but unused
client/shell.py:85:5 'gridtest.main.test.GridTest' imported but unused
client/shell.py:85:5 redefinition of unused 'GridTest' from line 11
client/shell.py:94:5 'gridtest.main.test.GridRunner' imported but unused
client/shell.py:94:5 'gridtest.main.test.GridTest' imported but unused
client/shell.py:94:5 redefinition of unused 'GridTest' from line 11
client/gridview.py:11:1 'gridtest.main.test.GridTest' imported but unused
client/gridview.py:14:1 'json' imported but unused
client/__init__.py:16:1 'os' imported but unused
client/generate.py:12:1 'os' imported but unused
decorators.py:19:1 'sys' imported but unused
decorators.py:20:1 'os' imported but unused
defaults.py:29:9 undefined name 'bot'
defaults.py:33:9 undefined name 'bot'
func.py:18:1 'sys' imported but unused
__init__.py:11:1 '.version.__version__' imported but unused
logger/__init__.py:1:1 '.message.bot' imported but unused
logger/__init__.py:2:1 '.progress.ProgressBar' imported but unused
logger/__init__.py:3:1 '.namer.RobotNamer' imported but unused
main/check.py:56:5 local variable 'spec' is assigned to but never used
main/substitute.py:12:1 'gridtest.defaults.GRIDTEST_GRIDEXPANDERS' imported but unused
main/substitute.py:14:1 'gridtest.logger.bot' imported but unused
main/substitute.py:15:1 'itertools' imported but unused
main/substitute.py:16:1 'os' imported but unused
main/test.py:20:1 'gridtest.main.generate.get_function_typing' imported but unused
main/test.py:31:1 'itertools' imported but unused
main/test.py:184:38 undefined name 'name'
main/test.py:661:17 f-string is missing placeholders
main/test.py:735:33 f-string is missing placeholders
main/grids.py:18:1 're' imported but unused
main/expand.py:13:1 'os' imported but unused
main/helpers.py:16:1 'time' imported but unused
main/helpers.py:56:11 f-string is missing placeholders
main/workers.py:13:1 'gridtest.main.helpers.test_types' imported but unused
main/workers.py:13:1 'gridtest.main.helpers.Capturing' imported but unused
main/workers.py:16:1 'io.StringIO' imported but unused
main/workers.py:58:9 local variable 'to_cleanup' is assigned to but never used
main/generate.py:11:1 'gridtest.utils.read_yaml' imported but unused
utils.py:15:1 'json' imported but unused
vsoch commented 4 years ago

Thanks! I'll fix these up right away!

vsoch commented 4 years ago

All set! Please see https://github.com/vsoch/gridtest/pull/27. I also added pyflkes to run for the GitHub workflow so we won't miss future unused imports. And thanks for showing me this - I think I'm going to add it to most of my other python projects!

What we can do, if you agree, is to make changes for the review and merge into master, and then do a new release when the review is finished. So for the PR I've bumped the version, but won't actually release until after we are finished up.

cbrueffer commented 4 years ago

I think that's a good solution, thanks for the quick fixes!