Skip to content

Commit

Permalink
scripts/lint-python: fix invocation in updated mypy
Browse files Browse the repository at this point in the history
Mypy now is severely confused by there being a bitbox02.py inside a
bitbox02 folder, resulting in duplicate module errors. See
python/mypy#4008.

gvanrossum writes:

> This is because apparently you seem to have both a folder named gsi
and a file name gsi.py. This is a problem for Python too (IIRC the
folder/package wins) so you can't really blame mypy for complaining
about this.

I don't understand this, as Python seems to handle it fine in our
package, but mypy does not.
  • Loading branch information
benma committed Nov 22, 2021
1 parent 0582ca5 commit fd58160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/lint-python
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ ARGS=($(find py releases -name '*.py' | grep -v -e generated -e old))
# behavior).
# We must typecheck the whole `py` directory even if only a few files are modified so that mypy
# sees all types
${MYPY} --implicit-reexport --namespace-packages --ignore-missing-imports --strict py py/bitbox02 releases/describe_signed_firmware.py
${MYPY} --implicit-reexport --namespace-packages --ignore-missing-imports --strict py/send_message.py py/bitbox02/bitbox02 releases/describe_signed_firmware.py

# Must run from root directory where .pylintrc is
# We ignore refactor and convention messages because they can differ with `black`
Expand Down

0 comments on commit fd58160

Please sign in to comment.