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 and document semantic analysis passes #3459

Closed
JukkaL opened this issue May 26, 2017 · 1 comment
Closed

Refactor and document semantic analysis passes #3459

JukkaL opened this issue May 26, 2017 · 1 comment
Labels
priority-1-normal refactoring Changing mypy's internals

Comments

@JukkaL
Copy link
Collaborator

JukkaL commented May 26, 2017

The semantic analyzer is kind of confusing. Refactoring and documenting it better could be pretty helpful. A few ideas:

  • Document the relationships between the passes better and which things aren't valid during which passes (e.g. subtype checks or joins).
  • Rename the passes to more reasonable names. Maybe just use SemanticAnalyzerPassN as the names.
  • Consider moving the semantic analyzer passes to separate files, or at least have them in the order of the passes within the single file. Currently the second pass comes first, which is confusing.
  • Don't share SemanticAnalyzer objects with other passes. Instead refactor the shared functionality into a separate utility class and share that.
@ilevkivskyi
Copy link
Member

I think this is superseded by #6204

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority-1-normal refactoring Changing mypy's internals
Projects
None yet
Development

No branches or pull requests

2 participants