Skip to content

gh-109413 Improve the mypy config file for libregrtest#109518

Merged
hauntsaninja merged 1 commit intopython:mainfrom
AlexWaygood:libregrtest-mypy-config
Sep 18, 2023
Merged

gh-109413 Improve the mypy config file for libregrtest#109518
hauntsaninja merged 1 commit intopython:mainfrom
AlexWaygood:libregrtest-mypy-config

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygood AlexWaygood commented Sep 17, 2023

  • Set explicit_package_bases = True in the config file. This means that mypy can now be run on libregrtest from the repo root, rather than having to cd into the Lib/test directory. You can now invoke mypy by running mypy --config-file Lib/test/libregrtest/mypy.ini.
  • Consolidate all of the packages we're ignoring missing import from into one section, rather than having a separate section for each one.
  • Only disable --strict-optional for the specific submodules that currently have strict-optional errors in them.

Cc. @vstinner

Copy link
Contributor

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@hauntsaninja hauntsaninja merged commit 54fbfa8 into python:main Sep 18, 2023
@AlexWaygood AlexWaygood deleted the libregrtest-mypy-config branch September 18, 2023 00:48
AlexWaygood added a commit to AlexWaygood/cpython that referenced this pull request Sep 18, 2023
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments