src/eric7/Plugins/CheckerPlugins/CodeStyleChecker/pycodestyle.py

branch
eric7
changeset 10353
babe9d606903
parent 10168
8312e0e76795
child 10439
21c28b0f9e41
equal deleted inserted replaced
10352:37d8616b44ca 10353:babe9d606903
82 sys.version_info < (3, 10) and 82 sys.version_info < (3, 10) and
83 callable(getattr(tokenize, '_compile', None)) 83 callable(getattr(tokenize, '_compile', None))
84 ): # pragma: no cover (<py310) 84 ): # pragma: no cover (<py310)
85 tokenize._compile = lru_cache(tokenize._compile) # type: ignore 85 tokenize._compile = lru_cache(tokenize._compile) # type: ignore
86 86
87 __version__ = '2.11.0-eric' 87 __version__ = '2.11.1-eric'
88 88
89 DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox' 89 DEFAULT_EXCLUDE = '.svn,CVS,.bzr,.hg,.git,__pycache__,.tox'
90 DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704,W503,W504' 90 DEFAULT_IGNORE = 'E121,E123,E126,E226,E24,E704,W503,W504'
91 try: 91 try:
92 if sys.platform == 'win32': # pragma: win32 cover 92 if sys.platform == 'win32': # pragma: win32 cover
516 for tok0, tok1 in zip(tokens, tokens[1:]): 516 for tok0, tok1 in zip(tokens, tokens[1:]):
517 # This must exclude the True/False/None singletons, which can 517 # This must exclude the True/False/None singletons, which can
518 # appear e.g. as "if x is None:", and async/await, which were 518 # appear e.g. as "if x is None:", and async/await, which were
519 # valid identifier names in old Python versions. 519 # valid identifier names in old Python versions.
520 if (tok0.end == tok1.start and 520 if (tok0.end == tok1.start and
521 tok0.type == tokenize.NAME and
521 keyword.iskeyword(tok0.string) and 522 keyword.iskeyword(tok0.string) and
522 tok0.string not in SINGLETONS and 523 tok0.string not in SINGLETONS and
523 not (tok0.string == 'except' and tok1.string == '*') and 524 not (tok0.string == 'except' and tok1.string == '*') and
524 not (tok0.string == 'yield' and tok1.string == ')') and 525 not (tok0.string == 'yield' and tok1.string == ')') and
525 tok1.string not in ':\n'): 526 tok1.string not in ':\n'):

eric ide

mercurial