diff options
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-x | pycodestyle.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pycodestyle.py b/pycodestyle.py index 52bcc09..0d8ed50 100755 --- a/pycodestyle.py +++ b/pycodestyle.py @@ -78,6 +78,13 @@ try: except ImportError: from ConfigParser import RawConfigParser +# this is a performance hack. see https://bugs.python.org/issue43014 +if ( + sys.version_info < (3, 10) and + callable(getattr(tokenize, '_compile', None)) +): # pragma: no cover (<py310) + tokenize._compile = lru_cache()(tokenize._compile) # type: ignore + __version__ = '2.7.0' DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox' |