-
Notifications
You must be signed in to change notification settings - Fork 54
Open
Description
There is a suggestion to refine the type annotations for list parameters in several functions (e.g., package_list, repo_list, and tags) to use explicit types such as List[str] or List[dict[str, str]] for improved readability and static analysis. However, these type annotations are currently inconsistent or missing throughout the codebase.
To address this, we should:
- Audit the relevant files and functions to ensure all list parameters and return types have explicit and correct type annotations.
- Import the necessary types from the
typingmodule (e.g.,List,Dict,Any, etc.). - Enable
mypystatic type checking on the affected files to enforce type safety and catch potential issues. - Fix any type errors that arise from enabling
mypy.
This will improve code clarity and maintainability, and help catch bugs earlier in development.
Action items:
- Update type annotations for all relevant list parameters and return types in the codebase.
- Import required types from the
typingmodule. - Enable
mypychecks on the affected files. - Fix any type errors reported by
mypy.
If possible, please create a dedicated PR for these changes.
I created this issue for @psegedy from #1868 (comment).
Tips and commands
Getting Help
- Contact our support team for questions or feedback.
- Visit our documentation for detailed guides and information.
- Keep in touch with the Sourcery team by following us on X/Twitter, LinkedIn or GitHub.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels