Skip to content

refactor: add contextmanager to VariableRenameVisitor #10685

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

Merged
merged 4 commits into from
Jun 21, 2021

Conversation

atakiar
Copy link
Contributor

@atakiar atakiar commented Jun 21, 2021

Description

As title. Related to Guido’s coding style suggestion in #1184

Test Plan

Existing tests with # flags: --allow-redefinition should pass. No new test cases were added

@JelleZijlstra JelleZijlstra merged commit 08e6ba8 into python:master Jun 21, 2021
@atakiar atakiar deleted the renmaing-use-contextmanagers branch June 21, 2021 19:00
JukkaL pushed a commit that referenced this pull request Sep 6, 2021
Related issue: #1184
Follows up to #10569, #10685

This PR:
* Refactors `Scope`
  - Replaces `Scope.enter_file` with `Scope.module_scope`
  - Replaces `Scope.enter_function` with `Scope.function_scope`
  - Splits `Scope.leave()` into corresponding context manager
* Deletes unused files
freundTech added a commit to freundTech/mypy that referenced this pull request Sep 27, 2021
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