Skip to content

Fix some type hint errors reported by mypy in .pyi files#270

Merged
CEXT-Dan merged 8 commits intoCEXT-Dan:mainfrom
rdesparbes:fix-default-argument-none
Apr 14, 2025
Merged

Fix some type hint errors reported by mypy in .pyi files#270
CEXT-Dan merged 8 commits intoCEXT-Dan:mainfrom
rdesparbes:fix-default-argument-none

Conversation

@rdesparbes
Copy link
Copy Markdown
Contributor

@rdesparbes rdesparbes commented Apr 14, 2025

Description

This pull request :

  • Fixes some errors reported by mypy on the .pyi files, both on the C++ and the Python side.
  • Adds the python-dotenv to the dev dependencies, as it is needed to launch run_tests.bat

Methodology

From the root of the project:

pip install mypy types-pywin32
mypy pyrx

Some errors reported by mypy on the .pyi files have been corrected on the Python side and the C++ side (hopefully).
For a description of which errors have been corrected, got to the commit section.

This pull request reduces the number of errors reported by mypy 1.15.0 from 296 on main (9020c7e) to 228 (8fe8105).

Tests before merging

On this branch:

  • Recompile the wrapper
  • Generate the stubs
  • Verify that they closely match the ones that are already present

Next steps

The type errors that are left in the .pyi files are related to overloading order, or incompatible definitions for magic methods (__*****__).

@rdesparbes rdesparbes changed the title Fix some type hints reported by mypy in .pyi files Fix some type hint errors reported by mypy in .pyi files Apr 14, 2025
@CEXT-Dan CEXT-Dan merged commit 7a94c3c into CEXT-Dan:main Apr 14, 2025
1 check passed
@CEXT-Dan
Copy link
Copy Markdown
Owner

Wow, you've done a lot of work! Thank you!

CEXT-Dan added a commit that referenced this pull request Apr 15, 2025
@rdesparbes rdesparbes deleted the fix-default-argument-none branch April 15, 2025 06:06
CEXT-Dan added a commit that referenced this pull request May 31, 2025
Fix some type hint errors reported by mypy in .pyi files
CEXT-Dan added a commit that referenced this pull request May 31, 2025
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