lint: enable mypy import checking #23212

pull fanquake wants to merge 4 commits into bitcoin:master from fanquake:22844_fixedup changing 8 files +16 −12
  1. fanquake commented at 6:22 AM on October 7, 2021: member

    This is #22844 with issues addressed, and two additional commits. One to move to the latest mypy version in the CI, and another to remove what is just pointless duplication from the test README. There's no need to relist package versions and install instructions (meaning 2x the work when changing anything), when you can just link to 04_install.sh which has the versions used and pip invocations to install them.

  2. fanquake added the label Scripts and tools on Oct 7, 2021
  3. fanquake force-pushed on Oct 7, 2021
  4. practicalswift commented at 7:41 AM on October 7, 2021: contributor

    Concept ACK

    The more high quality automated review we can get prior to manual review the better.

  5. fanquake force-pushed on Oct 7, 2021
  6. DrahtBot commented at 5:48 PM on October 7, 2021: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  7. DrahtBot added the label Needs rebase on Oct 13, 2021
  8. fanquake force-pushed on Oct 14, 2021
  9. DrahtBot removed the label Needs rebase on Oct 14, 2021
  10. laanwj commented at 12:36 PM on October 15, 2021: member

    Python lints are failing:

    test/functional/test_runner.py:43: error: Module has no attribute "getwindowsversion"  [attr-defined]
    Found 1 error in 1 file (checked 216 source files)
    ^---- failure generated from test/lint/lint-python.sh
    
  11. promag commented at 10:33 PM on October 15, 2021: member

    Tested ACK after

    diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
    index c5f08b27f2..d6f61bfbff 100755
    --- a/test/functional/test_runner.py
    +++ b/test/functional/test_runner.py
    @@ -40,7 +40,7 @@ except UnicodeDecodeError:
         CROSS = "x "
         CIRCLE = "o "
    
    -if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393):
    +if os.name != 'nt' or sys.getwindowsversion() >= (10, 0, 14393): #type:ignore
         if os.name == 'nt':
             import ctypes
             kernel32 = ctypes.windll.kernel32  # type: ignore
    

    because getwindowsversion is only available in Windows.

  12. doc: remove pointlessly duplicated linter version / install info b93e2299da
  13. lint: install pyzmq (22.3.0) into linter environment
    mypy stubs were introduced in 21.0.1
    6ae9c2ef23
  14. lint mypy 0.910 22e652662b
  15. lint: enable mypy checking for missing imports
    Achieve this by adding some ignore, and making data/ importable.
    
    Co-authored-by: João Barbosa <joao.paulo.barbosa@gmail.com>
    a46f71bb70
  16. fanquake force-pushed on Oct 16, 2021
  17. fanquake commented at 1:15 AM on October 16, 2021: member

    Tested ACK after

    Thanks for the review @promag. Taken the suggestion.

  18. promag commented at 8:10 AM on October 16, 2021: member

    ACK

  19. practicalswift commented at 9:47 AM on October 16, 2021: contributor

    cr ACK a46f71bb703dd8ada77e5eaf2a0b05d741d39bbf

  20. MarcoFalke merged this on Oct 17, 2021
  21. MarcoFalke closed this on Oct 17, 2021

  22. fanquake deleted the branch on Oct 17, 2021
  23. sidhujag referenced this in commit dde8b9a002 on Oct 17, 2021
  24. DrahtBot locked this on Oct 30, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-18 12:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me