Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add linters to the repo #403

Merged
merged 6 commits into from
Dec 7, 2021
Merged

Add linters to the repo #403

merged 6 commits into from
Dec 7, 2021

Conversation

peitili
Copy link
Contributor

@peitili peitili commented Dec 7, 2021

initial result of the linters:


Check docstring is first.................................................Failed
- hook id: check-docstring-first
- exit code: 1

tilequeue/format/OSciMap4/StaticVals/__init__.py:2 Module docstring appears after code (code seen on line 1).
tilequeue/format/OSciMap4/StaticKeys/__init__.py:8 Multiple module docstrings (first docstring on line 1).

Check Yaml...............................................................Passed
Debug Statements (Python)................................................Passed
Check for case conflicts.................................................Passed
Check that executables have shebangs.....................................Failed
- hook id: check-executables-have-shebangs
- exit code: 1

tilequeue/command.py: marked executable but has no (or invalid) shebang!
  If it isn't supposed to be executable, try: chmod -x tilequeue/command.py
  If it is supposed to be executable, double-check its shebang.

Check JSON...........................................(no files to check)Skipped
Fix End of Files.........................................................Failed
- hook id: end-of-file-fixer
- exit code: 1
- files were modified by this hook

Fixing tilequeue/format/OSciMap4/StaticKeys/__init__.py
Fixing tilequeue/format/OSciMap4/pbf_test.py
Fixing tilequeue/format/OSciMap4/TagRewrite/__init__.py
Fixing tilequeue/format/OSciMap4/GeomEncoder.py

Trim Trailing Whitespace.................................................Failed
- hook id: trailing-whitespace
- exit code: 1
- files were modified by this hook

Fixing tilequeue/format/OSciMap4/StaticKeys/__init__.py
Fixing README.md
Fixing tilequeue/format/OSciMap4/TagRewrite/__init__.py
Fixing tilequeue/format/OSciMap4/GeomEncoder.py
Fixing tilequeue/format/OSciMap4/TileData_v4.proto
Fixing tilequeue/format/OSciMap4/TileData_v4_pb2.py

Fix requirements.txt.....................................................Failed
- hook id: requirements-txt-fixer
- exit code: 1
- files were modified by this hook

Sorting requirements.txt

Fix double quoted strings................................................Failed
- hook id: double-quote-string-fixer
- exit code: 1
- files were modified by this hook

Fixing strings in tilequeue/utils.py
Fixing strings in tilequeue/config.py
Fixing strings in tilequeue/format/__init__.py
Fixing strings in tilequeue/format/OSciMap4/GeomEncoder.py
Fixing strings in tilequeue/wof.py
Fixing strings in tilequeue/query/common.py
Fixing strings in tilequeue/tile.py
Fixing strings in tests/test_wof.py
Fixing strings in tilequeue/queue/mapper.py
Fixing strings in setup.py
Fixing strings in tilequeue/store.py
Fixing strings in tilequeue/query/rawr.py
Fixing strings in tilequeue/worker.py
Fixing strings in tilequeue/format/OSciMap4/pbf_test.py
Fixing strings in tilequeue/query/fixture.py
Fixing strings in tilequeue/format/OSciMap4/StaticVals/__init__.py
Fixing strings in tilequeue/queue/message.py
Fixing strings in tests/test_store.py
Fixing strings in tests/test_tile.py
Fixing strings in tests/test_wof_http.py
Fixing strings in tests/test_mvt.py
Fixing strings in tilequeue/command.py
Fixing strings in tests/test_query_rawr.py
Fixing strings in tilequeue/metatile.py
Fixing strings in tilequeue/format/vtm.py
Fixing strings in tilequeue/rawr.py

Reorder python imports...................................................Failed
- hook id: reorder-python-imports
- exit code: 1
- files were modified by this hook

Reordering imports in tilequeue/utils.py
Reordering imports in tilequeue/format/OSciMap4/TileData_v4_pb2.py
Reordering imports in tilequeue/query/__init__.py
Reordering imports in tilequeue/log.py
Reordering imports in tilequeue/config.py
Reordering imports in tilequeue/format/geojson.py
Reordering imports in tilequeue/format/mvt.py
Reordering imports in tilequeue/queue/redis_queue.py
Reordering imports in tilequeue/query/pool.py
Reordering imports in tilequeue/format/OSciMap4/GeomEncoder.py
Reordering imports in tilequeue/queue/file.py
Reordering imports in tilequeue/wof.py
Reordering imports in tilequeue/queue/sqs.py
Reordering imports in tilequeue/query/postgres.py
Reordering imports in tilequeue/top_tiles.py
Reordering imports in tilequeue/toi/__init__.py
Reordering imports in tilequeue/query/common.py
Reordering imports in tilequeue/tile.py
Reordering imports in tilequeue/toi/s3.py
Reordering imports in tilequeue/queue/mapper.py
Reordering imports in tests/test_process.py
Reordering imports in setup.py
Reordering imports in tilequeue/store.py
Reordering imports in tilequeue/query/rawr.py
Reordering imports in tilequeue/worker.py
Reordering imports in tilequeue/process.py
Reordering imports in tilequeue/format/OSciMap4/pbf_test.py
Reordering imports in tilequeue/toi/file.py
Reordering imports in tests/queue/test_file.py
Reordering imports in tilequeue/query/fixture.py
Reordering imports in tests/test_toi.py
Reordering imports in tilequeue/transform.py
Reordering imports in tilequeue/queue/message.py
Reordering imports in tests/test_store.py
Reordering imports in tilequeue/queue/writer.py
Reordering imports in tests/test_tile.py
Reordering imports in tilequeue/command.py
Reordering imports in tests/test_metatile.py
Reordering imports in tilequeue/queue/__init__.py
Reordering imports in tilequeue/format/OSciMap4/StaticKeys/__init__.py
Reordering imports in tilequeue/metatile.py
Reordering imports in tilequeue/format/vtm.py
Reordering imports in tilequeue/rawr.py

autopep8.................................................................Failed
- hook id: autopep8
- files were modified by this hook
Strip unnecessary `# noqa`s..............................................Failed
- hook id: yesqa
- exit code: 1
- files were modified by this hook

Rewriting tilequeue/config.py
Rewriting tilequeue/format/__init__.py
Rewriting tilequeue/queue/sqs.py
Rewriting tilequeue/command.py
Rewriting tilequeue/format/vtm.py

flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tilequeue/format/OSciMap4/TileData_v4_pb2.py:12:121: E501 line too long (1039 > 120 characters)
tilequeue/format/OSciMap4/GeomEncoder.py:95:16: W604 backticks are deprecated, use 'repr()'
tilequeue/format/OSciMap4/GeomEncoder.py:181:25: W601 .has_key() is deprecated, use 'in'
tilequeue/format/OSciMap4/GeomEncoder.py:195:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:215:13: E265 block comment should start with '# '
tilequeue/format/OSciMap4/GeomEncoder.py:216:13: E265 block comment should start with '# '
tilequeue/format/OSciMap4/GeomEncoder.py:219:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:236:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:251:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:268:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:309:9: E722 do not use bare 'except'
tilequeue/format/OSciMap4/GeomEncoder.py:339:9: E722 do not use bare 'except'


@nvkelso nvkelso requested a review from iandees December 7, 2021 06:27
@nvkelso
Copy link
Member

nvkelso commented Dec 7, 2021

The formatting changes LGTM, but CI complains about:

ImportError: cannot import name MessageHandle

So fix that up and then this is good to go?

@peitili peitili requested a review from nvkelso December 7, 2021 07:03
@peitili
Copy link
Contributor Author

peitili commented Dec 7, 2021

The formatting changes LGTM, but CI complains about:

ImportError: cannot import name MessageHandle

So fix that up and then this is good to go?

yup, fixed

@peitili peitili merged commit 7ec7b60 into master Dec 7, 2021
@peitili peitili deleted the pythonlinter branch December 7, 2021 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants