Skip to content

Refactor: use context manager for Scope - #11053

Merged
JukkaL merged 1 commit into
python:masterfrom
97littleleaf11:refactor-1184
Sep 6, 2021
Merged

JukkaL merged 1 commit into
python:masterfrom
97littleleaf11:refactor-1184

Conversation

@97littleleaf11

Copy link
Copy Markdown
Collaborator

Description

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

@JukkaL JukkaL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! Looks good. This makes things less error-prone and the code easier to follow.

@JukkaL
JukkaL merged commit 725a24a into python:master Sep 6, 2021
@97littleleaf11
97littleleaf11 deleted the refactor-1184 branch September 6, 2021 16:43
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