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

Refactor checker.py #12027

Closed
97littleleaf11 opened this issue Jan 20, 2022 · 2 comments
Closed

Refactor checker.py #12027

97littleleaf11 opened this issue Jan 20, 2022 · 2 comments
Labels
needs discussion refactoring Changing mypy's internals

Comments

@97littleleaf11
Copy link
Collaborator

Currently the checker.py is quite large. Splitting some stateless funcs into submodules might be a good idea.

cc @JukkaL @ilevkivskyi @sobolevn

@97littleleaf11 97littleleaf11 added refactoring Changing mypy's internals needs discussion labels Jan 20, 2022
@97littleleaf11
Copy link
Collaborator Author

97littleleaf11 commented Feb 22, 2022

Here is some thoughts from @JukkaL :
#12026 (comment)

We can split checker.py by defining a trait/interface that contains commonly used helper methods such as fail and passing the checker instance to another module using this new trait type to avoid an import cycle. We've already split semanal.py in this way (using SemanticAnalyzerInterface), though it's still very big.

The key would be to identify groups of related functionality that make sense to be moved away to a new module. Just moving random bits and pieces to another module doesn't improve the situation much. The semanal_foo modules can perhaps act as some inspiration.

@hauntsaninja
Copy link
Collaborator

Closing since this isn't too concrete, but feel free to open PRs

@hauntsaninja hauntsaninja closed this as not planned Won't fix, can't repro, duplicate, stale Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs discussion refactoring Changing mypy's internals
Projects
None yet
Development

No branches or pull requests

2 participants