-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
introduce strict-ish pylint + minimal fixes #98
Commits on Aug 2, 2023
-
pylintrc: add initial default .pylintrc
Generated via `pylint --generate-rcfile`
Configuration menu - View commit details
-
Copy full SHA for 6411bba - Browse repository at this point
Copy the full SHA 6411bbaView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8ba28a - Browse repository at this point
Copy the full SHA b8ba28aView commit details -
Configuration menu - View commit details
-
Copy full SHA for e4d6ed3 - Browse repository at this point
Copy the full SHA e4d6ed3View commit details -
pylintrc: fix unqualified exception names
PyLint 2.16 has started complaining: > pylint: Command line or configuration file:1: UserWarning: Specifying > exception names in the overgeneral-exceptions option without module > name is deprecated and support for it will be removed in pylint 3.0. > Use fully qualified name (maybe 'builtins.BaseException' ?) instead.
Configuration menu - View commit details
-
Copy full SHA for 5a34385 - Browse repository at this point
Copy the full SHA 5a34385View commit details -
Configuration menu - View commit details
-
Copy full SHA for 969aed7 - Browse repository at this point
Copy the full SHA 969aed7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 89179de - Browse repository at this point
Copy the full SHA 89179deView commit details -
Configuration menu - View commit details
-
Copy full SHA for b34892f - Browse repository at this point
Copy the full SHA b34892fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a222b1 - Browse repository at this point
Copy the full SHA 7a222b1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a58d97 - Browse repository at this point
Copy the full SHA 7a58d97View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a77c25 - Browse repository at this point
Copy the full SHA 7a77c25View commit details -
pylintrc: enable all extensions and minimum initial suppressions
The checks will be selectively removed from "disabled=…" as fixed.
Configuration menu - View commit details
-
Copy full SHA for 789f958 - Browse repository at this point
Copy the full SHA 789f958View commit details -
pylint: suppress 'arguments-differ' on python 3.8 and 3.9
The type declaration of Generic.__new__ is over-broad in Python 3.8 (likely also in 3.9, though not verified), but fixed in later versions. This causes warnings if `Generic` subclasses override `__new__` but don't expose an "anything goes" (*args, **kwargs) signature. It's not worth writing a specialized transformer to fix it, and it's lame to have to write lint suppressions on correct code, especially when it only applies to a particular version.
Configuration menu - View commit details
-
Copy full SHA for 56affb2 - Browse repository at this point
Copy the full SHA 56affb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1a1892 - Browse repository at this point
Copy the full SHA a1a1892View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f73592 - Browse repository at this point
Copy the full SHA 4f73592View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b56c64 - Browse repository at this point
Copy the full SHA 8b56c64View commit details -
Configuration menu - View commit details
-
Copy full SHA for f96c18a - Browse repository at this point
Copy the full SHA f96c18aView commit details -
Suppressing two existing TODOs in rxelems.test pylint: fixme
Configuration menu - View commit details
-
Copy full SHA for 2f5abe0 - Browse repository at this point
Copy the full SHA 2f5abe0View commit details -
lint: enable
comparison-with-itself
Suppressed in intentional `__eq__` tests. pylint: comparison-with-itself
Configuration menu - View commit details
-
Copy full SHA for 5eb6f60 - Browse repository at this point
Copy the full SHA 5eb6f60View commit details -
lint: enable
too-many-public-methods
checkerSuppressing on Fsm class. pylint: too-many-public-methods
Configuration menu - View commit details
-
Copy full SHA for 8168bd9 - Browse repository at this point
Copy the full SHA 8168bd9View commit details -
lint: enable
too-many-
* checkersSuppressing on existing large functions. pylint: too-many-branches pylint: too-many-locals pylint: too-many-return-statements pylint: too-many-statements
Configuration menu - View commit details
-
Copy full SHA for 9097cf0 - Browse repository at this point
Copy the full SHA 9097cf0View commit details -
lint: enable
compare-to-empty-string
checkerSuppressed in tests where it's actually checking string output. > Avoid comparisons to empty string pylint: compare-to-empty-string
Configuration menu - View commit details
-
Copy full SHA for 99986dc - Browse repository at this point
Copy the full SHA 99986dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12e8128 - Browse repository at this point
Copy the full SHA 12e8128View commit details -
lint: fix trivial pointless-statement/expression-not-assigned
pylint: expression-not-assigned pylint: pointless-statement
Configuration menu - View commit details
-
Copy full SHA for 2da3134 - Browse repository at this point
Copy the full SHA 2da3134View commit details -
lint: tests: suppress protected-access on ._commonconc
> Access to a protected member _commonconc of a client class pylint: protected-access
Configuration menu - View commit details
-
Copy full SHA for 861e5fa - Browse repository at this point
Copy the full SHA 861e5faView commit details -
lint: "x not in" vs. "not x in"
> test for membership should be 'not in' flake8: E713
Configuration menu - View commit details
-
Copy full SHA for 8cdd1b9 - Browse repository at this point
Copy the full SHA 8cdd1b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31221fe - Browse repository at this point
Copy the full SHA 31221feView commit details -
lint: avoid unnecessary-comprehension warning
pylint: unnecessary-comprehension
Configuration menu - View commit details
-
Copy full SHA for d46e704 - Browse repository at this point
Copy the full SHA d46e704View commit details -
lint: use
[]
instead oflist()
> consider using [] instead of list() pylint: use-list-literal
Configuration menu - View commit details
-
Copy full SHA for 0add7cc - Browse repository at this point
Copy the full SHA 0add7ccView commit details -
lint: rewrite
list(…) == []
asnot list(…)
>> 'list(...) != []' can be simplified to 'list(...)' as an empty >> sequence is falsey pylint: use-implicit-booleaness-not-comparison
Configuration menu - View commit details
-
Copy full SHA for 86062b0 - Browse repository at this point
Copy the full SHA 86062b0View commit details -
lint: rewrite
len(x) > 0
asx
;len(x) == 0
asnot x
> Avoid comparisons to zero pylint: compare-to-zero
Configuration menu - View commit details
-
Copy full SHA for 60fd7d3 - Browse repository at this point
Copy the full SHA 60fd7d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 06a5dc5 - Browse repository at this point
Copy the full SHA 06a5dc5View commit details -
> Consider using "elif" instead of "else" then "if" to remove one > indentation level pylint: else-if-used
Configuration menu - View commit details
-
Copy full SHA for ff70825 - Browse repository at this point
Copy the full SHA ff70825View commit details -
lint: fix unnecessary
lambda str: len(str)
lambdaThis was also a shadowed outer name, since `str` is a variable in the outer scope. pylint: unnecessary-lambda
Configuration menu - View commit details
-
Copy full SHA for 9439be7 - Browse repository at this point
Copy the full SHA 9439be7View commit details -
lint: remove some unused fixture arguments in fsm_test
pylint: unused-argument
Configuration menu - View commit details
-
Copy full SHA for da3c74d - Browse repository at this point
Copy the full SHA da3c74dView commit details -
lint: fix shadowed functions/locals/args
> Redefining name 'static' from outer scope pylint: redefined-outer-name
Configuration menu - View commit details
-
Copy full SHA for 6f234dc - Browse repository at this point
Copy the full SHA 6f234dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 13f72bc - Browse repository at this point
Copy the full SHA 13f72bcView commit details -
lint: avoid shadowing
input
builtin where possiblepylint: redefined-builtin
Configuration menu - View commit details
-
Copy full SHA for f1cdd28 - Browse repository at this point
Copy the full SHA f1cdd28View commit details -
lint: avoid shadowing
map
builtin name where possibleTo avoid altering signatures, this does not include keyword arguments or attributes of `Fsm` here, just local variable names. > Redefining built-in 'map' pylint: redefined-builtin
Configuration menu - View commit details
-
Copy full SHA for edad9d9 - Browse repository at this point
Copy the full SHA edad9d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9b7302 - Browse repository at this point
Copy the full SHA c9b7302View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1967468 - Browse repository at this point
Copy the full SHA 1967468View commit details -
lint: iterating over
.keys()
is redundantpylint: consider-iterating-dictionary
Configuration menu - View commit details
-
Copy full SHA for 7a0b10a - Browse repository at this point
Copy the full SHA 7a0b10aView commit details -
lint: fsm: avoid redundant lookup to transition map
Note that there are many other instances of unnecessary lookups; this is the only one that triggers this checker. pylint: unnecessary-dict-index-lookup
Configuration menu - View commit details
-
Copy full SHA for d2c4c9b - Browse repository at this point
Copy the full SHA d2c4c9bView commit details -
lint: iterate over .items() vs. keys + lookup
pylint: consider-using-dict-items
Configuration menu - View commit details
-
Copy full SHA for 663667f - Browse repository at this point
Copy the full SHA 663667fView commit details -
lint: use enumerate() vs range+len
> Consider using enumerate instead of iterating with range and len pylint: consider-using-enumerate
Configuration menu - View commit details
-
Copy full SHA for 89e5ba9 - Browse repository at this point
Copy the full SHA 89e5ba9View commit details -
lint: simplify dict creation via dict literals
> Consider using a dictionary comprehension pylint: consider-using-dict-comprehension
Configuration menu - View commit details
-
Copy full SHA for a38f0e6 - Browse repository at this point
Copy the full SHA a38f0e6View commit details -
lint: use comprehension vs
filter
builtin> Used builtin function 'filter'. Using a list comprehension can be > clearer. pylint: bad-builtin
Configuration menu - View commit details
-
Copy full SHA for 6f88a75 - Browse repository at this point
Copy the full SHA 6f88a75View commit details -
lint: fix redefined-variable-type warnings
> Redefinition of initial type from set to frozenset > Redefinition of mults type from list to reversed pylint: redefined-variable-type
Configuration menu - View commit details
-
Copy full SHA for 55ab660 - Browse repository at this point
Copy the full SHA 55ab660View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26dcecd - Browse repository at this point
Copy the full SHA 26dcecdView commit details -
lint: fix or suppress invalid-name style warnings
Trying to keep it low-ish impact. pylint: invalid-name
Configuration menu - View commit details
-
Copy full SHA for 8ecc8a0 - Browse repository at this point
Copy the full SHA 8ecc8a0View commit details -
nit: charclass.__repr__: avoid useless str(char)/key=str in sorted ch…
…arset The collection already contains `str` elements.
Configuration menu - View commit details
-
Copy full SHA for 9829ea7 - Browse repository at this point
Copy the full SHA 9829ea7View commit details -
lint: charclass: more consistent use of f-strings
> Formatting a regular string which could be a f-string pylint: consider-using-f-string
Configuration menu - View commit details
-
Copy full SHA for 1a7c1d5 - Browse repository at this point
Copy the full SHA 1a7c1d5View commit details
Commits on Aug 3, 2023
-
lint: simplify a couple ternary-able expressions
> Consider rewriting as a ternary expression pylint: consider-ternary-expression
Configuration menu - View commit details
-
Copy full SHA for 079ad78 - Browse repository at this point
Copy the full SHA 079ad78View commit details -
lint: avoid redefining loop variables
> Redefining 'symbol' from loop pylint: redefined-loop-name
Configuration menu - View commit details
-
Copy full SHA for 924413d - Browse repository at this point
Copy the full SHA 924413dView commit details -
lint: explicitly define "cannot __hash__" on Fsm
> Implementing __eq__ without also implementing __hash__ pylint: eq-without-hash
Configuration menu - View commit details
-
Copy full SHA for 967a48c - Browse repository at this point
Copy the full SHA 967a48cView commit details -
lint: rewrite a couple
for
loops asany()
> `for` loop could be `any(…)` pylint: consider-using-any-or-all
Configuration menu - View commit details
-
Copy full SHA for 3468455 - Browse repository at this point
Copy the full SHA 3468455View commit details -
lint: reduce some overlarge try/except statement groups
> try clause contains 9 statements, expected at most 1 pylint: too-many-try-statements
Configuration menu - View commit details
-
Copy full SHA for 551c13f - Browse repository at this point
Copy the full SHA 551c13fView commit details -
lint: raise more specific errors and enable
broad-exception-raised
> Raising too general exception: Exception pylint: broad-exception-raised
Configuration menu - View commit details
-
Copy full SHA for 1670052 - Browse repository at this point
Copy the full SHA 1670052View commit details -
Configuration menu - View commit details
-
Copy full SHA for 24a2e8a - Browse repository at this point
Copy the full SHA 24a2e8aView commit details -
lint: remove some useless suppressions
And enables the `useless-suppression` checker, which is disabled by default. Removes some statements which would not trigger warnings, for some reason or other: generally these are left over from refactors. For example, the too-many-arguments on `Fsm.__init__` had been triggering before the arguments were explicitly marked as keyword-only, but the suppression was not removed with that change. pylint: useless-suppression
Configuration menu - View commit details
-
Copy full SHA for c4faa1b - Browse repository at this point
Copy the full SHA c4faa1bView commit details