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

Turn on strict typing in mypy #2211

Merged
merged 5 commits into from
Apr 11, 2024

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Mar 16, 2024

  • Pinned mypy to ensure the CI won't start failing suddenly if next release finds new issues
  • Bumped python_version to 3.8 to stop warnings about mypy not supporting Python 3.7 (relates to Dropping support for Python 3.7 #2207 )
  • Updated and improved comments
  • Start checking setup.py
  • Solved about a dozen of type issues

orig_new_compiler = ccompiler.new_compiler
ccompiler.new_compiler = my_new_compiler

base_compiler = MSVCCompiler
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Doesn't look like base_compiler was used for anything other than being an alias.

@Avasam
Copy link
Collaborator Author

Avasam commented Mar 16, 2024

@mhammond When you have the time, can you turn on autofixing in https://results.pre-commit.ci/ ? Direct link: https://github.com/apps/pre-commit-ci/installations/new

@Avasam Avasam force-pushed the turn-on-strict-typing-in-mypy branch from c656901 to 6a4a4c2 Compare March 16, 2024 04:53
Comment on lines +22 to +24
; Class cannot subclass "..." (has type "Any"); (IDEM)
; TODO: Use typeshed's types-pywin32 stubs after a few more fixes there
misc,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@@ -907,7 +908,8 @@ def resolveMUITimeZone(spec):


# from jaraco.util.dictlib 5.3.1
class RangeMap(dict):
# TODO: Update to implementation in jaraco.collections
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

setup.py Outdated Show resolved Hide resolved
@Avasam Avasam force-pushed the turn-on-strict-typing-in-mypy branch from 6a4a4c2 to b45952f Compare March 16, 2024 05:24
mypy.ini Outdated Show resolved Hide resolved
@Avasam Avasam force-pushed the turn-on-strict-typing-in-mypy branch 6 times, most recently from bd20882 to b0eedf9 Compare March 18, 2024 04:07
@Avasam Avasam force-pushed the turn-on-strict-typing-in-mypy branch from b0eedf9 to 153a5fc Compare March 18, 2024 04:13
@Avasam Avasam merged commit 2b3b1a0 into mhammond:main Apr 11, 2024
27 checks passed
@Avasam Avasam deleted the turn-on-strict-typing-in-mypy branch April 11, 2024 18:19
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.

2 participants