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

Automatically Remove Incomplete mypy Stubgen Files #21

Open
sepehr-akbarzadeh opened this issue Jul 24, 2024 · 0 comments
Open

Automatically Remove Incomplete mypy Stubgen Files #21

sepehr-akbarzadeh opened this issue Jul 24, 2024 · 0 comments
Labels
clean code Improve Clean Code priority: medium Indicates issues that are important but not urgent.

Comments

@sepehr-akbarzadeh
Copy link
Contributor

Issue Summary

The mypy stubgen tool sometimes produces incomplete or incorrect stub files, which can lead to misleading type checks and potential errors in the codebase. This issue proposes a mechanism to automatically identify and remove these incomplete stub files to ensure the integrity and accuracy of type hinting.

Detailed Description

mypy stubgen generates .pyi files for type hinting, but these can be incomplete or incorrect. To address this, we propose:

  1. Identification Tool: Develop a script to analyze .pyi files for missing or placeholder type annotations.
  2. Automatic Removal: Integrate the script into the CI/CD pipeline to remove incomplete stubs and generate a report.
  3. Notification: Provide reports on removed stubs and reasons for removal for developer review.
  4. Re-generation and Validation: Allow re-generation and validation of stubs after fixing identified issues.

Expected Benefits

  • Improved Accuracy: Ensures accurate and complete type hints.
  • Reduced Bugs: Prevents bugs from incorrect type information.
  • Developer Awareness: Informs developers of type hint issues, encouraging fixes.
@sepehr-akbarzadeh sepehr-akbarzadeh added clean code Improve Clean Code priority: medium Indicates issues that are important but not urgent. labels Jul 24, 2024
@sepehr-akbarzadeh sepehr-akbarzadeh added this to the One-Week Fix Sprint milestone Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean code Improve Clean Code priority: medium Indicates issues that are important but not urgent.
Projects
None yet
Development

No branches or pull requests

1 participant