-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move @functools.cache rewrites to their own rule
- Loading branch information
1 parent
70ea4b2
commit e17f3ca
Showing
19 changed files
with
425 additions
and
390 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
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,67 @@ | ||
import functools | ||
from functools import lru_cache | ||
|
||
|
||
@functools.lru_cache() | ||
def fixme(): | ||
pass | ||
|
||
|
||
@lru_cache() | ||
def fixme(): | ||
pass | ||
|
||
|
||
@other_decorator | ||
@functools.lru_cache() | ||
def fixme(): | ||
pass | ||
|
||
|
||
@functools.lru_cache() | ||
@other_decorator | ||
def fixme(): | ||
pass | ||
|
||
|
||
@functools.lru_cache(maxsize=None) | ||
def ok(): | ||
pass | ||
|
||
|
||
@lru_cache(maxsize=None) | ||
def ok(): | ||
pass | ||
|
||
|
||
@functools.lru_cache(maxsize=64) | ||
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,67 @@ | ||
import functools | ||
from functools import lru_cache | ||
|
||
|
||
@functools.lru_cache(maxsize=None) | ||
def fixme(): | ||
pass | ||
|
||
|
||
@lru_cache(maxsize=None) | ||
def fixme(): | ||
pass | ||
|
||
|
||
@other_decorator | ||
@functools.lru_cache(maxsize=None) | ||
def fixme(): | ||
pass | ||
|
||
|
||
@functools.lru_cache(maxsize=None) | ||
@other_decorator | ||
def fixme(): | ||
pass | ||
|
||
|
||
@functools.lru_cache() | ||
def ok(): | ||
pass | ||
|
||
|
||
@lru_cache() | ||
def ok(): | ||
pass | ||
|
||
|
||
@functools.lru_cache(maxsize=64) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1688,6 +1688,7 @@ | |
"UP03", | ||
"UP030", | ||
"UP032", | ||
"UP033", | ||
"W", | ||
"W2", | ||
"W29", | ||
|
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
Oops, something went wrong.