-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a resolve_binding method to Context
- Loading branch information
1 parent
ec8ca66
commit aed248b
Showing
10 changed files
with
211 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,10 @@ | |
def main(): | ||
exit(1) | ||
quit(1) | ||
|
||
|
||
def main(): | ||
exit = 1 | ||
|
||
exit(1) | ||
quit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
from functools import lru_cache | ||
|
||
|
||
@lru_cache(maxsize=None) | ||
def fixme(): | ||
pass | ||
|
||
|
||
@other_decorator | ||
@lru_cache(maxsize=None) | ||
def fixme(): | ||
pass | ||
|
||
|
||
@lru_cache(maxsize=None) | ||
@other_decorator | ||
def fixme(): | ||
pass | ||
|
||
|
||
@lru_cache() | ||
def ok(): | ||
pass | ||
|
||
|
||
@lru_cache(maxsize=64) | ||
def ok(): | ||
pass | ||
|
||
|
||
def user_func(): | ||
pass | ||
|
||
|
||
@lru_cache(user_func) | ||
def ok(): | ||
pass | ||
|
||
|
||
@lru_cache(user_func, maxsize=None) | ||
def ok(): | ||
pass | ||
|
||
|
||
def lru_cache(maxsize=None): | ||
pass | ||
|
||
|
||
@lru_cache(maxsize=None) | ||
def ok(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
crates/ruff/src/rules/pyupgrade/snapshots/ruff__rules__pyupgrade__tests__UP033_1.py.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
source: crates/ruff/src/rules/pyupgrade/mod.rs | ||
expression: diagnostics | ||
--- | ||
- kind: | ||
name: LRUCacheWithMaxsizeNone | ||
body: "Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`" | ||
suggestion: "Rewrite with `@functools.cache" | ||
fixable: true | ||
location: | ||
row: 4 | ||
column: 10 | ||
end_location: | ||
row: 4 | ||
column: 24 | ||
fix: | ||
edits: [] | ||
parent: ~ | ||
- kind: | ||
name: LRUCacheWithMaxsizeNone | ||
body: "Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`" | ||
suggestion: "Rewrite with `@functools.cache" | ||
fixable: true | ||
location: | ||
row: 10 | ||
column: 10 | ||
end_location: | ||
row: 10 | ||
column: 24 | ||
fix: | ||
edits: [] | ||
parent: ~ | ||
- kind: | ||
name: LRUCacheWithMaxsizeNone | ||
body: "Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`" | ||
suggestion: "Rewrite with `@functools.cache" | ||
fixable: true | ||
location: | ||
row: 15 | ||
column: 10 | ||
end_location: | ||
row: 15 | ||
column: 24 | ||
fix: | ||
edits: [] | ||
parent: ~ | ||
|
Oops, something went wrong.