Skip to content

refactor: add contextmanager to VariableRenameVisitor - #10685

Merged
JelleZijlstra merged 4 commits into
python:masterfrom
atakiar:renmaing-use-contextmanagers
Jun 21, 2021
Merged

JelleZijlstra merged 4 commits into
python:masterfrom
atakiar:renmaing-use-contextmanagers

Conversation

@atakiar

@atakiar atakiar commented Jun 21, 2021

Copy link
Copy Markdown
Contributor

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

Comment thread mypy/renaming.py Outdated
Comment thread mypy/renaming.py Outdated
Comment thread mypy/renaming.py Outdated
@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