tonybaloney / perflint

Python Linter for performance anti patterns
MIT License
665 stars 10 forks source link

Options ignored on the command line #16

Closed ArneBachmannDLR closed 2 years ago

ArneBachmannDLR commented 2 years ago

On Windows, Mambaforge Python 3.9.7 environment:

perflint mypackage/ --disable=loop-invariant-global-usage
...
mypackage\__main__.py:122:65: W8202: Lookups of global names within a loop is inefficient, copy to a local variable outside of the loop first. (loop-invariant-global-usage

Same with -d W8202.

tonybaloney commented 2 years ago

thanks for the report. It's specifically the enable/disable flags because I'm setting them at the end of the list (so yours are overridden).

Fixing in a PR