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

Added check for importing a Final variable from another module and … #9532

Merged
merged 1 commit into from
Dec 2, 2024

Conversation

erictraut
Copy link
Collaborator

…then attempting to overwrite it. This partially addresses microsoft/pylance-release#6455.

Added check for an attempt to assign to a module-local variable if it is shadowing a Final variable declared by the builtins module or some other chained file. This addresses microsoft/pylance-release#6455.

…then attempting to overwrite it. This partially addresses microsoft/pylance-release#6455.

Added check for an attempt to assign to a module-local variable if it is shadowing a `Final` variable declared by the builtins module or some other chained file. This addresses microsoft/pylance-release#6455.
Copy link
Contributor

github-actions bot commented Dec 2, 2024

Diff from mypy_primer, showing the effect of this PR on open source code:

rotki (https://github.com/rotki/rotki)
+ /tmp/mypy_primer/projects/rotki/rotkehlchen/tests/fixtures/__init__.py
+   /tmp/mypy_primer/projects/rotki/rotkehlchen/tests/fixtures/__init__.py:4:6 - error: "USERSDIR_NAME" is declared as Final and cannot be reassigned (reportGeneralTypeIssues)
- 3437 errors, 265 warnings, 0 informations 
+ 3438 errors, 265 warnings, 0 informations 

@erictraut erictraut merged commit 099c43f into main Dec 2, 2024
18 checks passed
@erictraut erictraut deleted the issue-6455-3 branch December 2, 2024 14:34
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.

1 participant