OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
849 stars 309 forks source link

Status of ruff issues and fixes #4028

Open echoix opened 4 months ago

echoix commented 4 months ago

This is a small issue to track the progress and amount of issues to fix with ruff.


(0): Initial state for 373800152d4f3b70639e2a7b1942f03b06c2c51b, before my first merged fix in #3948: (collapsed)

Details of $ ruff check --preview --select ALL --statistics >> ruff_stats_0_initial_373800152d4f3b70639e2a7b1942f03b06c2c51b.txt

```python $ ruff check --preview --select ALL --statistics >> ruff_stats_0_initial_373800152d4f3b70639e2a7b1942f03b06c2c51b.txt 27485 E231 [*] missing-whitespace 14452 ANN001 [ ] missing-type-function-argument 9515 ANN201 [ ] missing-return-type-undocumented-public-function 7467 D400 [ ] ends-in-period 7457 D415 [ ] ends-in-punctuation 7395 COM812 [*] missing-trailing-comma 5951 N802 [ ] invalid-function-name 5685 F821 [ ] undefined-name 4461 N806 [ ] non-lowercase-variable-in-function 3367 PT009 [ ] pytest-unittest-assertion 2580 D102 [ ] undocumented-public-method 2308 UP031 [*] printf-string-formatting 2305 Q000 [*] bad-quotes-inline-string 1860 ANN202 [ ] missing-return-type-private-function 1843 F405 [ ] undefined-local-with-import-star-usage 1560 D205 [ ] blank-line-after-summary 1408 ERA001 [*] commented-out-code 1382 ARG002 [ ] unused-method-argument 1351 FBT003 [ ] boolean-positional-value-in-call 1334 ANN204 [ ] missing-return-type-special-method 1127 D401 [ ] non-imperative-mood 997 E501 [ ] line-too-long 925 N803 [ ] invalid-argument-name 907 CPY001 [ ] missing-copyright-notice 890 T201 [*] print 812 I001 [*] unsorted-imports 778 D212 [*] multi-line-summary-first-line 776 PTH118 [ ] os-path-join 732 FBT002 [ ] boolean-default-value-positional-argument 723 D107 [ ] undocumented-public-init 699 TD002 [ ] missing-todo-author 694 TD003 [ ] missing-todo-link 661 A001 [ ] builtin-variable-shadowing 661 DTZ001 [ ] call-datetime-without-tzinfo 655 FIX002 [ ] line-contains-todo 653 D103 [ ] undocumented-public-function 650 PLR2004 [ ] magic-value-comparison 623 D101 [ ] undocumented-public-class 555 C408 [*] unnecessary-collection-call 535 D202 [*] no-blank-line-after-function 515 PLR6301 [ ] no-self-use 513 ANN206 [*] missing-return-type-class-method 508 A002 [ ] builtin-argument-shadowing 507 PTH123 [ ] builtin-open 494 F841 [ ] unused-variable 492 C901 [ ] complex-structure 477 PLC0415 [ ] import-outside-top-level 462 PLR0913 [ ] too-many-arguments 459 UP032 [*] f-string 453 RET505 [*] superfluous-else-return 451 S101 [ ] assert 451 PLW1514 [*] unspecified-encoding 435 PLR6201 [*] literal-membership 405 COM819 [*] prohibited-trailing-comma 399 PLR0912 [ ] too-many-branches 392 D209 [*] new-line-after-last-paragraph 387 ANN003 [ ] missing-type-kwargs 360 SIM108 [ ] if-else-block-instead-of-if-exp 351 SIM115 [ ] open-file-with-context-handler 340 INP001 [ ] implicit-namespace-package 316 PLR0917 [ ] too-many-positional 309 PLR0915 [ ] too-many-statements 274 ISC001 [ ] single-line-implicit-string-concatenation 267 D105 [ ] undocumented-magic-method 266 D100 [ ] undocumented-public-module 249 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string 217 SIM118 [*] in-dict-keys 210 SLF001 [ ] private-member-access 206 D208 [*] over-indentation 188 TRY003 [ ] raise-vanilla-args 184 E722 [ ] bare-except 182 EM101 [*] raw-string-in-exception 180 ANN002 [ ] missing-type-args 180 PLR5501 [*] collapsible-else-if 177 SIM102 [ ] collapsible-if 172 PLW2901 [ ] redefined-loop-name 169 N816 [ ] mixed-case-variable-in-global-scope 167 PLR0914 [ ] too-many-locals 165 PERF401 [ ] manual-list-comprehension 159 TD004 [ ] missing-todo-colon 153 PLW0603 [ ] global-statement 145 INT003 [ ] printf-in-get-text-func-call 145 D200 [ ] fits-on-one-line 142 ARG001 [ ] unused-function-argument 142 W605 [*] invalid-escape-sequence 142 PLR1702 [ ] too-many-nested-blocks 134 N815 [ ] mixed-case-variable-in-class-scope 124 PT027 [ ] pytest-unittest-raises-assertion 123 UP015 [*] redundant-open-modes 120 PTH113 [ ] os-path-isfile 115 E265 [*] no-space-after-block-comment 111 SIM300 [*] yoda-conditions 109 RET503 [*] implicit-return 108 ARG005 [ ] unused-lambda-argument 108 E221 [*] multiple-spaces-before-operator 106 F401 [ ] unused-import 105 PLW0602 [ ] global-variable-not-assigned 102 D210 [ ] surrounding-whitespace 100 D404 [ ] docstring-starts-with-this 99 PLR6104 [*] non-augmented-assignment 97 B008 [ ] function-call-in-default-argument 95 B007 [ ] unused-loop-control-variable 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove 88 F403 [ ] undefined-local-with-import-star 87 RET504 [*] unnecessary-assign 84 PLR1714 [*] repeated-equality-comparison 81 SIM105 [ ] suppressible-exception 76 PLR1730 [*] if-stmt-min-max 73 EXE001 [ ] shebang-not-executable 73 PLR0904 [ ] too-many-public-methods 73 UP030 [*] format-literals 70 BLE001 [ ] blind-except 68 RUF012 [ ] mutable-class-default 67 INT002 [ ] format-in-get-text-func-call 67 PTH119 [ ] os-path-basename 66 SIM113 [ ] enumerate-for-loop 65 S110 [ ] try-except-pass 64 B006 [*] mutable-argument-default 62 PERF203 [ ] try-except-in-loop 61 RET502 [*] implicit-return-value 60 S404 [ ] suspicious-subprocess-import 59 FURB110 [*] if-exp-instead-of-or-operator 59 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 50 B904 [ ] raise-without-from-inside-except 50 N812 [ ] lowercase-imported-as-non-lowercase 50 FURB118 [ ] reimplemented-operator 49 PTH122 [ ] os-path-splitext 48 E402 [ ] module-import-not-at-top-of-file 47 PTH100 [ ] os-path-abspath 45 TD001 [ ] invalid-todo-tag 44 D104 [ ] undocumented-public-package 44 TRY300 [ ] try-consider-else 43 D407 [*] dashed-underline-after-section 43 PLR0402 [*] manual-from-import 42 S603 [ ] subprocess-without-shell-equals-true 42 SIM201 [*] negate-equal-op 41 PLR0911 [ ] too-many-return-statements 40 PIE790 [*] unnecessary-placeholder 39 FIX001 [ ] line-contains-fixme 37 PTH102 [ ] os-mkdir 37 PLW0108 [*] unnecessary-lambda 37 UP008 [*] super-call-with-parameters 37 FURB113 [ ] repeated-append 36 TD005 [ ] missing-todo-description 36 E302 [*] blank-lines-top-level 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception 35 E721 [ ] type-comparison 34 PTH120 [ ] os-path-dirname 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 D402 [ ] no-signature 33 PLC2801 [ ] unnecessary-dunder-call 33 UP004 [*] useless-object-inheritance 32 FLY002 [*] static-join-to-f-string 32 FURB101 [ ] read-whole-file 30 RET506 [*] superfluous-else-raise 28 D412 [*] blank-lines-between-header-and-content 27 E741 [ ] ambiguous-variable-name 27 FURB103 [ ] write-whole-file 25 C417 [*] unnecessary-map 24 D300 [ ] triple-single-quotes 24 FURB154 [*] repeated-global 22 E226 [*] missing-whitespace-around-arithmetic-operator 22 E266 [*] multiple-leading-hashes-for-block-comment 21 PLW3201 [ ] bad-dunder-method-name 20 C416 [*] unnecessary-comprehension 20 PTH207 [ ] glob 19 S405 [ ] suspicious-xml-etree-import 19 B018 [ ] useless-expression 19 EM103 [*] dot-format-in-exception 19 RET507 [*] superfluous-else-continue 19 E303 [*] too-many-blank-lines 19 F822 [ ] undefined-export 18 S310 [ ] suspicious-url-open-usage 18 PIE808 [*] unnecessary-range-start 18 SIM210 [*] if-expr-with-true-false 18 PLW0604 [ ] global-at-module-level 18 TRY302 [ ] useless-try-except 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 EXE002 [ ] shebang-missing-executable-file 17 N813 [ ] camelcase-imported-as-lowercase 16 S307 [ ] suspicious-eval-usage 16 S607 [ ] start-process-with-partial-path 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 PLR0916 [ ] too-many-boolean-expressions 16 FURB152 [*] math-constant 15 SIM114 [*] if-with-same-arms 15 N999 [ ] invalid-module-name 15 PLR1722 [*] sys-exit-alias 14 ANN205 [ ] missing-return-type-static-method 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 PERF402 [ ] manual-list-copy 14 E116 [ ] unexpected-indentation-comment 14 D301 [*] escape-sequence-in-docstring 14 PLR1704 [ ] redefined-argument-from-local 14 RUF027 [*] missing-f-string-syntax 14 TRY301 [ ] raise-within-try 13 EM102 [*] f-string-in-exception 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 13 UP024 [*] os-error-alias 13 RUF021 [*] parenthesize-chained-operators 13 RUF100 [*] unused-noqa 12 PTH116 [ ] os-stat 12 N801 [ ] invalid-class-name 12 PLR1711 [*] useless-return 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element 11 S112 [ ] try-except-continue 11 PTH104 [ ] os-rename 11 D214 [*] section-not-over-indented 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 B909 [ ] loop-iterator-mutation 10 PTH108 [ ] os-unlink 10 PTH202 [ ] os-path-getsize 10 PD011 [ ] pandas-use-of-dot-values 10 PERF102 [*] incorrect-dict-iterator 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 ICN001 [*] unconventional-import-alias 9 RET501 [*] unnecessary-return-none 9 SIM101 [*] duplicate-isinstance-call 9 TD006 [*] invalid-todo-capitalization 9 NPY002 [ ] numpy-legacy-random 9 PLC0206 [ ] dict-index-missing-items 9 TRY002 [ ] raise-vanilla-class 9 TRY004 [ ] type-check-without-type-error 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PTH111 [ ] os-path-expanduser 8 D206 [ ] indent-with-spaces 7 B028 [ ] no-explicit-stacklevel 7 C414 [*] unnecessary-double-cast-or-process 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation 7 PIE810 [*] multiple-starts-ends-with 7 PTH101 [ ] os-chmod 7 PTH204 [ ] os-path-getmtime 7 E111 [ ] indentation-with-invalid-multiple 6 S108 [ ] hardcoded-temp-file 6 S301 [ ] suspicious-pickle-usage 6 S403 [ ] suspicious-pickle-import 6 S602 [ ] subprocess-popen-with-shell-equals-true 6 FIX003 [ ] line-contains-xxx 6 SIM401 [*] if-else-block-instead-of-dict-get 6 N805 [*] invalid-first-argument-name-for-method 6 E713 [*] not-in-test 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 6 TRY400 [*] error-instead-of-exception 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 C403 [*] unnecessary-list-comprehension-set 5 C404 [*] unnecessary-list-comprehension-dict 5 PT018 [*] pytest-composite-assertion 5 E114 [ ] indentation-with-invalid-multiple-comment 5 E731 [*] lambda-assignment 5 F811 [ ] redefined-while-unused 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test 4 S102 [ ] exec-builtin 4 B004 [*] unreliable-callable-check 4 B009 [*] get-attr-with-constant 4 C405 [*] unnecessary-literal-set 4 G002 [ ] logging-percent-format 4 Q001 [*] bad-quotes-multiline-string 4 SIM117 [ ] multiple-with-statements 4 SLOT000 [ ] no-slots-in-str-subclass 4 PTH117 [ ] os-path-isabs 4 E261 [*] too-few-spaces-before-inline-comment 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring 4 PGH004 [ ] blanket-noqa 4 UP022 [*] replace-stdout-stderr 4 FURB131 [*] delete-full-slice 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment 4 RUF022 [*] unsorted-dunder-all 4 TRY201 [*] verbose-raise 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 B034 [ ] re-sub-positional-args 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print 3 PYI024 [ ] collections-named-tuple 3 PT006 [*] pytest-parametrize-names-wrong-type 3 SIM211 [*] if-expr-with-false-true 3 N818 [ ] error-suffix-on-exception-name 3 E305 [*] blank-lines-after-function-or-class 3 E714 [*] not-is-test 3 D411 [*] no-blank-line-before-section 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias 3 PLR2044 [*] empty-comment 3 PLW0133 [*] useless-exception-statement 3 PLW1641 [ ] eq-without-hash 3 FURB105 [*] print-empty-string 3 FURB116 [ ] f-string-number-format 2 B020 [ ] loop-variable-overrides-iterator 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 PIE794 [*] duplicate-class-field-definition 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir 2 E701 [ ] multiple-statements-on-one-line-colon 2 F601 [*] multi-value-repeated-key-literal 2 PLC2701 [ ] import-private-name 2 PLR0202 [*] no-classmethod-decorator 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 FURB142 [*] for-loop-set-mutations 2 FURB148 [*] unnecessary-enumerate 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S105 [ ] hardcoded-password-string 1 S113 [ ] request-without-timeout 1 S605 [ ] start-process-with-a-shell 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable 1 C400 [*] unnecessary-generator-list 1 INT001 [ ] f-string-in-get-text-func-call 1 G003 [ ] logging-string-concat 1 PYI056 [ ] unsupported-method-call-on-all 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad 1 PT013 [ ] pytest-incorrect-pytest-import 1 SIM109 [*] compare-with-tuple 1 NPY001 [*] numpy-deprecated-type-alias 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E117 [ ] over-indented 1 E222 [*] multiple-spaces-after-operator 1 E241 [*] multiple-spaces-after-comma 1 E272 [*] multiple-spaces-before-keyword 1 E301 [*] blank-line-between-methods 1 W293 [*] blank-line-with-whitespace 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals 1 UP028 [*] yield-in-for-loop 1 FURB140 [*] reimplemented-starmap 1 FURB192 [*] sorted-min-max ```


(1): At the commit where the ruff was configured and all failing rules were added, the state was:

Details of $ ruff check --preview --select ALL --statistics >> ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt

```python $ ruff check --preview --select ALL --statistics >> ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt 13607 ANN001 [ ] missing-type-function-argument 9029 ANN201 [ ] missing-return-type-undocumented-public-function 7345 D400 [ ] ends-in-period 7335 D415 [ ] ends-in-punctuation 7321 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name 4439 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method 2153 UP031 [*] printf-string-formatting 1826 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1433 D205 [ ] blank-line-after-summary 1353 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument 1328 FBT003 [ ] boolean-positional-value-in-call 1182 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name 893 T201 [*] print 891 CPY001 [ ] missing-copyright-notice 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 715 FBT002 [ ] boolean-default-value-positional-argument 698 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 650 D107 [ ] undocumented-public-init 644 A001 [ ] builtin-variable-shadowing 585 D103 [ ] undocumented-public-function 563 PLR2004 [ ] magic-value-comparison 557 D101 [ ] undocumented-public-class 518 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 495 E501 [ ] line-too-long 491 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use 470 PLC0415 [ ] import-outside-top-level 464 C901 [ ] complex-structure 448 S101 [ ] assert 438 PLR0913 [ ] too-many-arguments 433 PLW1514 [*] unspecified-encoding 431 UP032 [*] f-string 421 RET505 [*] superfluous-else-return 378 D209 [*] new-line-after-last-paragraph 377 ANN003 [ ] missing-type-kwargs 375 PLR0912 [ ] too-many-branches 347 SIM108 [ ] if-else-block-instead-of-if-exp 339 INP001 [ ] implicit-namespace-package 339 SIM115 [ ] open-file-with-context-handler 305 PLR0917 [ ] too-many-positional 293 PLR0915 [ ] too-many-statements 256 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string 215 SIM118 [*] in-dict-keys 195 D105 [ ] undocumented-magic-method 194 ICN001 [ ] unconventional-import-alias 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args 167 PLW2901 [ ] redefined-loop-name 166 PLR5501 [*] collapsible-else-if 165 ANN002 [ ] missing-type-args 162 EM101 [*] raw-string-in-exception 161 PLR0914 [ ] too-many-locals 159 PERF401 [ ] manual-list-comprehension 154 SIM102 [ ] collapsible-if 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope 133 D200 [ ] fits-on-one-line 124 PLR1702 [ ] too-many-nested-blocks 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile 118 UP015 [*] redundant-open-modes 112 F401 [*] unused-import 110 SIM300 [*] yoda-conditions 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned 97 B008 [ ] function-call-in-default-argument 96 PLR6104 [*] non-augmented-assignment 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove 88 B007 [ ] unused-loop-control-variable 88 F403 [ ] undefined-local-with-import-star 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception 81 PLR1714 [*] repeated-equality-comparison 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment 68 UP030 [*] format-literals 67 S404 [ ] suspicious-subprocess-import 64 SIM113 [ ] enumerate-for-loop 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default 62 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename 59 FURB110 [*] if-exp-instead-of-or-operator 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 50 S603 [ ] subprocess-without-shell-equals-true 50 N812 [ ] lowercase-imported-as-non-lowercase 49 PTH122 [ ] os-path-splitext 49 F821 [ ] undefined-name 48 B904 [ ] raise-without-from-inside-except 44 D104 [ ] undocumented-public-package 43 D407 [*] dashed-underline-after-section 42 SIM201 [*] negate-equal-op 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag 40 PLR0911 [ ] too-many-return-statements 39 FIX001 [ ] line-contains-fixme 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir 37 FURB113 [ ] repeated-append 36 TD005 [ ] missing-todo-description 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 PLC2801 [ ] unnecessary-dunder-call 30 E402 [ ] module-import-not-at-top-of-file 29 RET506 [*] superfluous-else-raise 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content 26 D402 [ ] no-signature 25 C417 [*] unnecessary-map 25 PTH120 [ ] os-path-dirname 25 FURB103 [ ] write-whole-file 24 S607 [ ] start-process-with-partial-path 24 E721 [ ] type-comparison 24 D300 [ ] triple-single-quotes 24 PLR6201 [*] literal-membership 24 FURB154 [*] repeated-global 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import 19 B018 [ ] useless-expression 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start 18 SIM210 [*] if-expr-with-true-false 18 PLW0604 [ ] global-at-module-level 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob 17 TRY302 [ ] useless-try-except 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 PLR0916 [ ] too-many-boolean-expressions 16 FURB152 [*] math-constant 15 S307 [ ] suspicious-eval-usage 15 RET507 [*] superfluous-else-continue 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 SIM114 [*] if-with-same-arms 14 PERF402 [ ] manual-list-copy 14 D301 [*] escape-sequence-in-docstring 14 PLR1704 [ ] redefined-argument-from-local 14 PLW3201 [ ] bad-dunder-method-name 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element 12 RUF021 [*] parenthesize-chained-operators 12 RUF100 [*] unused-noqa 11 S112 [ ] try-except-continue 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented 11 TRY301 [ ] raise-within-try 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize 10 PERF102 [*] incorrect-dict-iterator 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink 9 TRY002 [ ] raise-vanilla-class 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces 8 PLC0206 [ ] dict-index-missing-items 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation 7 SIM101 [*] duplicate-isinstance-call 7 PTH101 [ ] os-chmod 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace 6 S108 [ ] hardcoded-temp-file 6 PIE810 [*] multiple-starts-ends-with 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test 4 C404 [*] unnecessary-list-comprehension-dict 4 G002 [ ] logging-percent-format 4 PT018 [*] pytest-composite-assertion 4 SIM117 [ ] multiple-with-statements 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring 4 UP022 [*] replace-stdout-stderr 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment 4 TRY201 [*] verbose-raise 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 B009 [*] get-attr-with-constant 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print 3 PT006 [*] pytest-parametrize-names-wrong-type 3 PT009 [ ] pytest-unittest-assertion 3 SIM211 [*] if-expr-with-false-true 3 N818 [ ] error-suffix-on-exception-name 3 E713 [*] not-in-test 3 E714 [*] not-is-test 3 D411 [*] no-blank-line-before-section 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias 3 PLR2044 [*] empty-comment 3 PLW1641 [ ] eq-without-hash 3 FURB105 [*] print-empty-string 3 FURB116 [ ] f-string-number-format 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import 2 B004 [*] unreliable-callable-check 2 B020 [ ] loop-variable-overrides-iterator 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir 2 PTH117 [ ] os-path-isabs 2 E231 [*] missing-whitespace 2 D208 [*] over-indentation 2 F601 [*] multi-value-repeated-key-literal 2 F822 [ ] undefined-export 2 PLC2701 [ ] import-private-name 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 FURB142 [*] for-loop-set-mutations 2 FURB148 [*] unnecessary-enumerate 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list 1 FIX003 [ ] line-contains-xxx 1 G003 [ ] logging-string-concat 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad 1 SIM109 [*] compare-with-tuple 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment 1 W391 [*] too-many-newlines-at-end-of-file 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself 1 PLR0202 [*] no-classmethod-decorator 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals 1 FURB131 [*] delete-full-slice 1 FURB140 [*] reimplemented-starmap 1 FURB192 [*] sorted-min-max ```

Diff between init state (0) and ruff configured (1)

```diff diff --git a/ruff_stats_0_initial_373800152d4f3b70639e2a7b1942f03b06c2c51b.txt b/ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt index 7b62c930bb..e9af2aaed6 100644 --- a/ruff_stats_0_initial_373800152d4f3b70639e2a7b1942f03b06c2c51b.txt +++ b/ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt @@ -1,325 +1,284 @@ -27485 E231 [*] missing-whitespace -14452 ANN001 [ ] missing-type-function-argument - 9515 ANN201 [ ] missing-return-type-undocumented-public-function - 7467 D400 [ ] ends-in-period - 7457 D415 [ ] ends-in-punctuation - 7395 COM812 [*] missing-trailing-comma - 5951 N802 [ ] invalid-function-name - 5685 F821 [ ] undefined-name - 4461 N806 [ ] non-lowercase-variable-in-function - 3367 PT009 [ ] pytest-unittest-assertion - 2580 D102 [ ] undocumented-public-method - 2308 UP031 [*] printf-string-formatting - 2305 Q000 [*] bad-quotes-inline-string - 1860 ANN202 [ ] missing-return-type-private-function - 1843 F405 [ ] undefined-local-with-import-star-usage - 1560 D205 [ ] blank-line-after-summary - 1408 ERA001 [*] commented-out-code - 1382 ARG002 [ ] unused-method-argument - 1351 FBT003 [ ] boolean-positional-value-in-call - 1334 ANN204 [ ] missing-return-type-special-method - 1127 D401 [ ] non-imperative-mood - 997 E501 [ ] line-too-long - 925 N803 [ ] invalid-argument-name - 907 CPY001 [ ] missing-copyright-notice - 890 T201 [*] print - 812 I001 [*] unsorted-imports - 778 D212 [*] multi-line-summary-first-line - 776 PTH118 [ ] os-path-join - 732 FBT002 [ ] boolean-default-value-positional-argument - 723 D107 [ ] undocumented-public-init - 699 TD002 [ ] missing-todo-author - 694 TD003 [ ] missing-todo-link - 661 A001 [ ] builtin-variable-shadowing +13607 ANN001 [ ] missing-type-function-argument + 9029 ANN201 [ ] missing-return-type-undocumented-public-function + 7345 D400 [ ] ends-in-period + 7335 D415 [ ] ends-in-punctuation + 7321 COM812 [*] missing-trailing-comma + 5919 N802 [ ] invalid-function-name + 4439 N806 [ ] non-lowercase-variable-in-function + 2285 D102 [ ] undocumented-public-method + 2153 UP031 [*] printf-string-formatting + 1826 ANN202 [ ] missing-return-type-private-function + 1439 F405 [ ] undefined-local-with-import-star-usage + 1433 D205 [ ] blank-line-after-summary + 1353 ERA001 [*] commented-out-code + 1337 ARG002 [ ] unused-method-argument + 1328 FBT003 [ ] boolean-positional-value-in-call + 1182 ANN204 [ ] missing-return-type-special-method + 1115 D401 [ ] non-imperative-mood + 909 N803 [ ] invalid-argument-name + 893 T201 [*] print + 891 CPY001 [ ] missing-copyright-notice + 762 PTH118 [ ] os-path-join + 751 D212 [*] multi-line-summary-first-line + 715 FBT002 [ ] boolean-default-value-positional-argument + 698 I001 [*] unsorted-imports + 693 TD002 [ ] missing-todo-author + 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo - 655 FIX002 [ ] line-contains-todo - 653 D103 [ ] undocumented-public-function - 650 PLR2004 [ ] magic-value-comparison - 623 D101 [ ] undocumented-public-class - 555 C408 [*] unnecessary-collection-call - 535 D202 [*] no-blank-line-after-function - 515 PLR6301 [ ] no-self-use + 654 FIX002 [ ] line-contains-todo + 650 D107 [ ] undocumented-public-init + 644 A001 [ ] builtin-variable-shadowing + 585 D103 [ ] undocumented-public-function + 563 PLR2004 [ ] magic-value-comparison + 557 D101 [ ] undocumented-public-class + 518 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method - 508 A002 [ ] builtin-argument-shadowing - 507 PTH123 [ ] builtin-open - 494 F841 [ ] unused-variable - 492 C901 [ ] complex-structure - 477 PLC0415 [ ] import-outside-top-level - 462 PLR0913 [ ] too-many-arguments - 459 UP032 [*] f-string - 453 RET505 [*] superfluous-else-return - 451 S101 [ ] assert - 451 PLW1514 [*] unspecified-encoding - 435 PLR6201 [*] literal-membership - 405 COM819 [*] prohibited-trailing-comma - 399 PLR0912 [ ] too-many-branches - 392 D209 [*] new-line-after-last-paragraph - 387 ANN003 [ ] missing-type-kwargs - 360 SIM108 [ ] if-else-block-instead-of-if-exp - 351 SIM115 [ ] open-file-with-context-handler - 340 INP001 [ ] implicit-namespace-package - 316 PLR0917 [ ] too-many-positional - 309 PLR0915 [ ] too-many-statements - 274 ISC001 [ ] single-line-implicit-string-concatenation - 267 D105 [ ] undocumented-magic-method - 266 D100 [ ] undocumented-public-module - 249 PTH110 [ ] os-path-exists + 495 E501 [ ] line-too-long + 491 F841 [ ] unused-variable + 490 A002 [ ] builtin-argument-shadowing + 487 PTH123 [ ] builtin-open + 481 PLR6301 [ ] no-self-use + 470 PLC0415 [ ] import-outside-top-level + 464 C901 [ ] complex-structure + 448 S101 [ ] assert + 438 PLR0913 [ ] too-many-arguments + 433 PLW1514 [*] unspecified-encoding + 431 UP032 [*] f-string + 421 RET505 [*] superfluous-else-return + 378 D209 [*] new-line-after-last-paragraph + 377 ANN003 [ ] missing-type-kwargs + 375 PLR0912 [ ] too-many-branches + 347 SIM108 [ ] if-else-block-instead-of-if-exp + 339 INP001 [ ] implicit-namespace-package + 339 SIM115 [ ] open-file-with-context-handler + 305 PLR0917 [ ] too-many-positional + 293 PLR0915 [ ] too-many-statements + 256 D100 [ ] undocumented-public-module + 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string - 217 SIM118 [*] in-dict-keys - 210 SLF001 [ ] private-member-access - 206 D208 [*] over-indentation - 188 TRY003 [ ] raise-vanilla-args + 215 SIM118 [*] in-dict-keys + 195 D105 [ ] undocumented-magic-method + 194 ICN001 [ ] unconventional-import-alias + 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except - 182 EM101 [*] raw-string-in-exception - 180 ANN002 [ ] missing-type-args - 180 PLR5501 [*] collapsible-else-if - 177 SIM102 [ ] collapsible-if - 172 PLW2901 [ ] redefined-loop-name - 169 N816 [ ] mixed-case-variable-in-global-scope - 167 PLR0914 [ ] too-many-locals - 165 PERF401 [ ] manual-list-comprehension - 159 TD004 [ ] missing-todo-colon - 153 PLW0603 [ ] global-statement - 145 INT003 [ ] printf-in-get-text-func-call - 145 D200 [ ] fits-on-one-line - 142 ARG001 [ ] unused-function-argument + 171 TRY003 [ ] raise-vanilla-args + 167 PLW2901 [ ] redefined-loop-name + 166 PLR5501 [*] collapsible-else-if + 165 ANN002 [ ] missing-type-args + 162 EM101 [*] raw-string-in-exception + 161 PLR0914 [ ] too-many-locals + 159 PERF401 [ ] manual-list-comprehension + 154 SIM102 [ ] collapsible-if + 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence - 142 PLR1702 [ ] too-many-nested-blocks + 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope - 124 PT027 [ ] pytest-unittest-raises-assertion - 123 UP015 [*] redundant-open-modes - 120 PTH113 [ ] os-path-isfile - 115 E265 [*] no-space-after-block-comment - 111 SIM300 [*] yoda-conditions - 109 RET503 [*] implicit-return - 108 ARG005 [ ] unused-lambda-argument - 108 E221 [*] multiple-spaces-before-operator - 106 F401 [ ] unused-import + 133 D200 [ ] fits-on-one-line + 124 PLR1702 [ ] too-many-nested-blocks + 122 N816 [ ] mixed-case-variable-in-global-scope + 118 PTH113 [ ] os-path-isfile + 118 UP015 [*] redundant-open-modes + 112 F401 [*] unused-import + 110 SIM300 [*] yoda-conditions + 108 RET503 [*] implicit-return + 107 ARG005 [ ] unused-lambda-argument + 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned - 102 D210 [ ] surrounding-whitespace - 100 D404 [ ] docstring-starts-with-this - 99 PLR6104 [*] non-augmented-assignment 97 B008 [ ] function-call-in-default-argument - 95 B007 [ ] unused-loop-control-variable + 96 PLR6104 [*] non-augmented-assignment + 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove + 88 B007 [ ] unused-loop-control-variable 88 F403 [ ] undefined-local-with-import-star - 87 RET504 [*] unnecessary-assign - 84 PLR1714 [*] repeated-equality-comparison + 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception - 76 PLR1730 [*] if-stmt-min-max + 81 PLR1714 [*] repeated-equality-comparison 73 EXE001 [ ] shebang-not-executable - 73 PLR0904 [ ] too-many-public-methods - 73 UP030 [*] format-literals - 70 BLE001 [ ] blind-except - 68 RUF012 [ ] mutable-class-default - 67 INT002 [ ] format-in-get-text-func-call - 67 PTH119 [ ] os-path-basename - 66 SIM113 [ ] enumerate-for-loop - 65 S110 [ ] try-except-pass - 64 B006 [*] mutable-argument-default - 62 PERF203 [ ] try-except-in-loop - 61 RET502 [*] implicit-return-value - 60 S404 [ ] suspicious-subprocess-import + 71 PLR0904 [ ] too-many-public-methods + 69 E265 [*] no-space-after-block-comment + 68 UP030 [*] format-literals + 67 S404 [ ] suspicious-subprocess-import + 64 SIM113 [ ] enumerate-for-loop + 63 S110 [ ] try-except-pass + 63 B006 [*] mutable-argument-default + 63 RUF012 [ ] mutable-class-default + 62 BLE001 [ ] blind-except + 60 PTH119 [ ] os-path-basename 59 FURB110 [*] if-exp-instead-of-or-operator - 59 RUF005 [ ] collection-literal-concatenation + 58 PERF203 [ ] try-except-in-loop + 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression + 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir - 50 B904 [ ] raise-without-from-inside-except + 50 S603 [ ] subprocess-without-shell-equals-true 50 N812 [ ] lowercase-imported-as-non-lowercase - 50 FURB118 [ ] reimplemented-operator 49 PTH122 [ ] os-path-splitext - 48 E402 [ ] module-import-not-at-top-of-file - 47 PTH100 [ ] os-path-abspath - 45 TD001 [ ] invalid-todo-tag + 49 F821 [ ] undefined-name + 48 B904 [ ] raise-without-from-inside-except 44 D104 [ ] undocumented-public-package - 44 TRY300 [ ] try-consider-else 43 D407 [*] dashed-underline-after-section - 43 PLR0402 [*] manual-from-import - 42 S603 [ ] subprocess-without-shell-equals-true 42 SIM201 [*] negate-equal-op - 41 PLR0911 [ ] too-many-return-statements - 40 PIE790 [*] unnecessary-placeholder + 42 PTH100 [ ] os-path-abspath + 40 TD001 [ ] invalid-todo-tag + 40 PLR0911 [ ] too-many-return-statements 39 FIX001 [ ] line-contains-fixme + 39 PIE790 [*] unnecessary-placeholder + 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir - 37 PLW0108 [*] unnecessary-lambda - 37 UP008 [*] super-call-with-parameters 37 FURB113 [ ] repeated-append 36 TD005 [ ] missing-todo-description - 36 E302 [*] blank-lines-top-level 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception - 35 E721 [ ] type-comparison - 34 PTH120 [ ] os-path-dirname 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage - 33 D402 [ ] no-signature 33 PLC2801 [ ] unnecessary-dunder-call - 33 UP004 [*] useless-object-inheritance - 32 FLY002 [*] static-join-to-f-string - 32 FURB101 [ ] read-whole-file - 30 RET506 [*] superfluous-else-raise + 30 E402 [ ] module-import-not-at-top-of-file + 29 RET506 [*] superfluous-else-raise + 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content - 27 E741 [ ] ambiguous-variable-name - 27 FURB103 [ ] write-whole-file + 26 D402 [ ] no-signature 25 C417 [*] unnecessary-map + 25 PTH120 [ ] os-path-dirname + 25 FURB103 [ ] write-whole-file + 24 S607 [ ] start-process-with-partial-path + 24 E721 [ ] type-comparison 24 D300 [ ] triple-single-quotes + 24 PLR6201 [*] literal-membership 24 FURB154 [*] repeated-global - 22 E226 [*] missing-whitespace-around-arithmetic-operator 22 E266 [*] multiple-leading-hashes-for-block-comment - 21 PLW3201 [ ] bad-dunder-method-name 20 C416 [*] unnecessary-comprehension - 20 PTH207 [ ] glob 19 S405 [ ] suspicious-xml-etree-import 19 B018 [ ] useless-expression - 19 EM103 [*] dot-format-in-exception - 19 RET507 [*] superfluous-else-continue - 19 E303 [*] too-many-blank-lines - 19 F822 [ ] undefined-export 18 S310 [ ] suspicious-url-open-usage + 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start 18 SIM210 [*] if-expr-with-true-false 18 PLW0604 [ ] global-at-module-level - 18 TRY302 [ ] useless-try-except + 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo - 17 EXE002 [ ] shebang-missing-executable-file - 17 N813 [ ] camelcase-imported-as-lowercase - 16 S307 [ ] suspicious-eval-usage - 16 S607 [ ] start-process-with-partial-path + 17 PTH207 [ ] glob + 17 TRY302 [ ] useless-try-except + 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 PLR0916 [ ] too-many-boolean-expressions 16 FURB152 [*] math-constant - 15 SIM114 [*] if-with-same-arms + 15 S307 [ ] suspicious-eval-usage + 15 RET507 [*] superfluous-else-continue + 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name - 15 PLR1722 [*] sys-exit-alias - 14 ANN205 [ ] missing-return-type-static-method 14 S311 [ ] suspicious-non-cryptographic-random-usage + 14 SIM114 [*] if-with-same-arms 14 PERF402 [ ] manual-list-copy - 14 E116 [ ] unexpected-indentation-comment 14 D301 [*] escape-sequence-in-docstring 14 PLR1704 [ ] redefined-argument-from-local + 14 PLW3201 [ ] bad-dunder-method-name 14 RUF027 [*] missing-f-string-syntax - 14 TRY301 [ ] raise-within-try - 13 EM102 [*] f-string-in-exception + 13 ANN205 [ ] missing-return-type-static-method 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension - 13 UP024 [*] os-error-alias - 13 RUF021 [*] parenthesize-chained-operators - 13 RUF100 [*] unused-noqa 12 PTH116 [ ] os-stat - 12 N801 [ ] invalid-class-name - 12 PLR1711 [*] useless-return 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element + 12 RUF021 [*] parenthesize-chained-operators + 12 RUF100 [*] unused-noqa 11 S112 [ ] try-except-continue - 11 PTH104 [ ] os-rename + 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented + 11 TRY301 [ ] raise-within-try 10 B026 [ ] star-arg-unpacking-after-keyword-arg - 10 B909 [ ] loop-iterator-mutation - 10 PTH108 [ ] os-unlink + 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize - 10 PD011 [ ] pandas-use-of-dot-values 10 PERF102 [*] incorrect-dict-iterator + 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone - 9 ICN001 [*] unconventional-import-alias - 9 RET501 [*] unnecessary-return-none - 9 SIM101 [*] duplicate-isinstance-call 9 TD006 [*] invalid-todo-capitalization - 9 NPY002 [ ] numpy-legacy-random - 9 PLC0206 [ ] dict-index-missing-items + 9 PTH108 [ ] os-unlink 9 TRY002 [ ] raise-vanilla-class - 9 TRY004 [ ] type-check-without-type-error 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin - 8 PTH111 [ ] os-path-expanduser + 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces - 7 B028 [ ] no-explicit-stacklevel + 8 PLC0206 [ ] dict-index-missing-items + 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today + 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation - 7 PIE810 [*] multiple-starts-ends-with + 7 SIM101 [*] duplicate-isinstance-call 7 PTH101 [ ] os-chmod + 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime - 7 E111 [ ] indentation-with-invalid-multiple + 7 D210 [ ] surrounding-whitespace 6 S108 [ ] hardcoded-temp-file - 6 S301 [ ] suspicious-pickle-usage - 6 S403 [ ] suspicious-pickle-import - 6 S602 [ ] subprocess-popen-with-shell-equals-true - 6 FIX003 [ ] line-contains-xxx + 6 PIE810 [*] multiple-starts-ends-with + 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get - 6 N805 [*] invalid-first-argument-name-for-method - 6 E713 [*] not-in-test + 6 E741 [ ] ambiguous-variable-name + 6 F811 [ ] redefined-while-unused 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check - 6 TRY400 [*] error-instead-of-exception 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function - 5 C403 [*] unnecessary-list-comprehension-set - 5 C404 [*] unnecessary-list-comprehension-dict - 5 PT018 [*] pytest-composite-assertion - 5 E114 [ ] indentation-with-invalid-multiple-comment - 5 E731 [*] lambda-assignment - 5 F811 [ ] redefined-while-unused + 5 S602 [ ] subprocess-popen-with-shell-equals-true + 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test - 4 S102 [ ] exec-builtin - 4 B004 [*] unreliable-callable-check - 4 B009 [*] get-attr-with-constant - 4 C405 [*] unnecessary-literal-set + 4 C404 [*] unnecessary-list-comprehension-dict 4 G002 [ ] logging-percent-format - 4 Q001 [*] bad-quotes-multiline-string + 4 PT018 [*] pytest-composite-assertion 4 SIM117 [ ] multiple-with-statements - 4 SLOT000 [ ] no-slots-in-str-subclass - 4 PTH117 [ ] os-path-isabs - 4 E261 [*] too-few-spaces-before-inline-comment 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring - 4 PGH004 [ ] blanket-noqa 4 UP022 [*] replace-stdout-stderr - 4 FURB131 [*] delete-full-slice 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment - 4 RUF022 [*] unsorted-dunder-all 4 TRY201 [*] verbose-raise 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell + 3 B009 [*] get-attr-with-constant 3 B034 [ ] re-sub-positional-args + 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print - 3 PYI024 [ ] collections-named-tuple 3 PT006 [*] pytest-parametrize-names-wrong-type + 3 PT009 [ ] pytest-unittest-assertion 3 SIM211 [*] if-expr-with-false-true 3 N818 [ ] error-suffix-on-exception-name - 3 E305 [*] blank-lines-after-function-or-class + 3 E713 [*] not-in-test 3 E714 [*] not-is-test 3 D411 [*] no-blank-line-before-section 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias 3 PLR2044 [*] empty-comment - 3 PLW0133 [*] useless-exception-statement 3 PLW1641 [ ] eq-without-hash 3 FURB105 [*] print-empty-string 3 FURB116 [ ] f-string-number-format + 2 S403 [ ] suspicious-pickle-import + 2 S406 [ ] suspicious-xml-sax-import + 2 B004 [*] unreliable-callable-check 2 B020 [ ] loop-variable-overrides-iterator 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set - 2 PIE794 [*] duplicate-class-field-definition + 2 C405 [*] unnecessary-literal-set 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir - 2 E701 [ ] multiple-statements-on-one-line-colon + 2 PTH117 [ ] os-path-isabs + 2 E231 [*] missing-whitespace + 2 D208 [*] over-indentation 2 F601 [*] multi-value-repeated-key-literal + 2 F822 [ ] undefined-export 2 PLC2701 [ ] import-private-name - 2 PLR0202 [*] no-classmethod-decorator 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 FURB142 [*] for-loop-set-mutations @@ -327,35 +286,29 @@ 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int - 1 S105 [ ] hardcoded-password-string 1 S113 [ ] request-without-timeout - 1 S605 [ ] start-process-with-a-shell 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable + 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list - 1 INT001 [ ] f-string-in-get-text-func-call + 1 FIX003 [ ] line-contains-xxx 1 G003 [ ] logging-string-concat - 1 PYI056 [ ] unsupported-method-call-on-all + 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad - 1 PT013 [ ] pytest-incorrect-pytest-import 1 SIM109 [*] compare-with-tuple - 1 NPY001 [*] numpy-deprecated-type-alias 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym - 1 E117 [ ] over-indented - 1 E222 [*] multiple-spaces-after-operator - 1 E241 [*] multiple-spaces-after-comma - 1 E272 [*] multiple-spaces-before-keyword - 1 E301 [*] blank-line-between-methods - 1 W293 [*] blank-line-with-whitespace + 1 E731 [*] lambda-assignment + 1 W391 [*] too-many-newlines-at-end-of-file 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself + 1 PLR0202 [*] no-classmethod-decorator 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals - 1 UP028 [*] yield-in-for-loop + 1 FURB131 [*] delete-full-slice 1 FURB140 [*] reimplemented-starmap 1 FURB192 [*] sorted-min-max ```

The rest follows as comments as it is too long

echoix commented 4 months ago

(2): State of main on 2024-07-10 for commit c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7, after 30 merged PRs concerning code quality (after commit of state 1):

Details of $ ruff check --preview --select ALL --statistics > ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt

```python $ ruff check --preview --select ALL --statistics > ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt 13607 ANN001 [ ] missing-type-function-argument 9030 ANN201 [ ] missing-return-type-undocumented-public-function 7346 D400 [ ] ends-in-period 7336 D415 [ ] ends-in-punctuation 7293 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name 4438 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method 2149 UP031 [*] printf-string-formatting 1826 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1433 D205 [ ] blank-line-after-summary 1353 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument 1328 FBT003 [ ] boolean-positional-value-in-call 1182 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name 893 T201 [*] print 891 CPY001 [ ] missing-copyright-notice 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 715 FBT002 [ ] boolean-default-value-positional-argument 699 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 650 D107 [ ] undocumented-public-init 643 A001 [ ] builtin-variable-shadowing 585 D103 [ ] undocumented-public-function 563 PLR2004 [ ] magic-value-comparison 556 D101 [ ] undocumented-public-class 519 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 495 E501 [ ] line-too-long 491 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use 468 PLC0415 [ ] import-outside-top-level 464 C901 [ ] complex-structure 448 S101 [ ] assert 438 PLR0913 [ ] too-many-arguments 433 PLW1514 [*] unspecified-encoding 431 UP032 [*] f-string 421 RET505 [*] superfluous-else-return 378 D209 [*] new-line-after-last-paragraph 377 ANN003 [ ] missing-type-kwargs 375 PLR0912 [ ] too-many-branches 347 SIM108 [ ] if-else-block-instead-of-if-exp 339 INP001 [ ] implicit-namespace-package 339 SIM115 [ ] open-file-with-context-handler 305 PLR0917 [ ] too-many-positional 293 PLR0915 [ ] too-many-statements 256 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string 217 SIM118 [*] in-dict-keys 195 D105 [ ] undocumented-magic-method 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args 167 PLW2901 [ ] redefined-loop-name 166 PLR5501 [*] collapsible-else-if 165 ANN002 [ ] missing-type-args 162 EM101 [*] raw-string-in-exception 161 PLR0914 [ ] too-many-locals 159 PERF401 [ ] manual-list-comprehension 154 SIM102 [ ] collapsible-if 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope 133 D200 [ ] fits-on-one-line 124 PLR1702 [ ] too-many-nested-blocks 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile 118 UP015 [*] redundant-open-modes 110 SIM300 [*] yoda-conditions 109 F401 [*] unused-import 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned 97 B008 [ ] function-call-in-default-argument 96 PLR6104 [*] non-augmented-assignment 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove 88 F403 [ ] undefined-local-with-import-star 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception 81 PLR1714 [*] repeated-equality-comparison 79 B007 [ ] unused-loop-control-variable 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment 68 UP030 [*] format-literals 67 S404 [ ] suspicious-subprocess-import 64 SIM113 [ ] enumerate-for-loop 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default 62 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename 59 FURB110 [*] if-exp-instead-of-or-operator 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 50 S603 [ ] subprocess-without-shell-equals-true 49 PTH122 [ ] os-path-splitext 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name 48 B904 [ ] raise-without-from-inside-except 44 D104 [ ] undocumented-public-package 43 SIM201 [*] negate-equal-op 43 D407 [*] dashed-underline-after-section 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag 40 PLR0911 [ ] too-many-return-statements 39 FIX001 [ ] line-contains-fixme 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir 36 TD005 [ ] missing-todo-description 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 PLC2801 [ ] unnecessary-dunder-call 30 E402 [ ] module-import-not-at-top-of-file 29 RET506 [*] superfluous-else-raise 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content 26 D402 [ ] no-signature 25 C417 [*] unnecessary-map 25 PTH120 [ ] os-path-dirname 25 FURB103 [ ] write-whole-file 24 S607 [ ] start-process-with-partial-path 24 E721 [ ] type-comparison 24 D300 [ ] triple-single-quotes 24 PLR6201 [*] literal-membership 24 FURB154 [*] repeated-global 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start 18 PLW0604 [ ] global-at-module-level 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 PLR0916 [ ] too-many-boolean-expressions 16 FURB152 [*] math-constant 15 S307 [ ] suspicious-eval-usage 15 RET507 [*] superfluous-else-continue 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name 15 PERF402 [ ] manual-list-copy 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 SIM114 [*] if-with-same-arms 14 D301 [*] escape-sequence-in-docstring 14 PLW3201 [ ] bad-dunder-method-name 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 13 PLR1704 [ ] redefined-argument-from-local 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element 12 RUF021 [*] parenthesize-chained-operators 12 RUF100 [*] unused-noqa 11 S112 [ ] try-except-continue 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented 11 TRY301 [ ] raise-within-try 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink 9 PLC0206 [ ] dict-index-missing-items 9 TRY002 [ ] raise-vanilla-class 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation 7 SIM101 [*] duplicate-isinstance-call 7 PTH101 [ ] os-chmod 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace 6 S108 [ ] hardcoded-temp-file 6 PIE810 [*] multiple-starts-ends-with 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test 4 C404 [*] unnecessary-list-comprehension-dict 4 PT018 [*] pytest-composite-assertion 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 B009 [*] get-attr-with-constant 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print 3 PT006 [*] pytest-parametrize-names-wrong-type 3 PT009 [ ] pytest-unittest-assertion 3 N818 [ ] error-suffix-on-exception-name 3 D411 [*] no-blank-line-before-section 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias 3 PLR2044 [*] empty-comment 3 PLW1641 [ ] eq-without-hash 3 FURB105 [*] print-empty-string 3 FURB116 [ ] f-string-number-format 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import 2 B004 [*] unreliable-callable-check 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir 2 PTH117 [ ] os-path-isabs 2 E231 [*] missing-whitespace 2 D208 [*] over-indentation 2 F601 [*] multi-value-repeated-key-literal 2 F822 [ ] undefined-export 2 PLC2701 [ ] import-private-name 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 FURB142 [*] for-loop-set-mutations 2 FURB148 [*] unnecessary-enumerate 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list 1 FIX003 [ ] line-contains-xxx 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad 1 SIM109 [*] compare-with-tuple 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment 1 W391 [*] too-many-newlines-at-end-of-file 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself 1 PLR0202 [*] no-classmethod-decorator 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals 1 FURB131 [*] delete-full-slice 1 FURB140 [*] reimplemented-starmap 1 FURB192 [*] sorted-min-max ```

Diff between ruff configured (1) and main branch on 2024-07-10 c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7 (2)

```diff diff --git a/ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt b/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt index e9af2aaed6..f455e0be93 100644 --- a/ruff_stats_1_configured_ruff_277a147cc6d0771a8e85a6b5ad7f26310fe7e86b.txt +++ b/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt @@ -1,12 +1,12 @@ 13607 ANN001 [ ] missing-type-function-argument - 9029 ANN201 [ ] missing-return-type-undocumented-public-function - 7345 D400 [ ] ends-in-period - 7335 D415 [ ] ends-in-punctuation - 7321 COM812 [*] missing-trailing-comma + 9030 ANN201 [ ] missing-return-type-undocumented-public-function + 7346 D400 [ ] ends-in-period + 7336 D415 [ ] ends-in-punctuation + 7293 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name - 4439 N806 [ ] non-lowercase-variable-in-function + 4438 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method - 2153 UP031 [*] printf-string-formatting + 2149 UP031 [*] printf-string-formatting 1826 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1433 D205 [ ] blank-line-after-summary @@ -21,24 +21,24 @@ 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 715 FBT002 [ ] boolean-default-value-positional-argument - 698 I001 [*] unsorted-imports + 699 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 650 D107 [ ] undocumented-public-init - 644 A001 [ ] builtin-variable-shadowing + 643 A001 [ ] builtin-variable-shadowing 585 D103 [ ] undocumented-public-function 563 PLR2004 [ ] magic-value-comparison - 557 D101 [ ] undocumented-public-class - 518 D202 [*] no-blank-line-after-function + 556 D101 [ ] undocumented-public-class + 519 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 495 E501 [ ] line-too-long 491 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use - 470 PLC0415 [ ] import-outside-top-level + 468 PLC0415 [ ] import-outside-top-level 464 C901 [ ] complex-structure 448 S101 [ ] assert 438 PLR0913 [ ] too-many-arguments @@ -56,9 +56,8 @@ 256 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string - 215 SIM118 [*] in-dict-keys + 217 SIM118 [*] in-dict-keys 195 D105 [ ] undocumented-magic-method - 194 ICN001 [ ] unconventional-import-alias 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args @@ -78,8 +77,8 @@ 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile 118 UP015 [*] redundant-open-modes - 112 F401 [*] unused-import 110 SIM300 [*] yoda-conditions + 109 F401 [*] unused-import 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument @@ -90,11 +89,11 @@ 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove - 88 B007 [ ] unused-loop-control-variable 88 F403 [ ] undefined-local-with-import-star 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception 81 PLR1714 [*] repeated-equality-comparison + 79 B007 [ ] unused-loop-control-variable 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment @@ -114,13 +113,13 @@ 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 50 S603 [ ] subprocess-without-shell-equals-true - 50 N812 [ ] lowercase-imported-as-non-lowercase 49 PTH122 [ ] os-path-splitext + 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name 48 B904 [ ] raise-without-from-inside-except 44 D104 [ ] undocumented-public-package + 43 SIM201 [*] negate-equal-op 43 D407 [*] dashed-underline-after-section - 42 SIM201 [*] negate-equal-op 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag 40 PLR0911 [ ] too-many-return-statements @@ -128,7 +127,6 @@ 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir - 37 FURB113 [ ] repeated-append 36 TD005 [ ] missing-todo-description 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception @@ -152,16 +150,13 @@ 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import - 19 B018 [ ] useless-expression 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start - 18 SIM210 [*] if-expr-with-true-false 18 PLW0604 [ ] global-at-module-level 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob - 17 TRY302 [ ] useless-try-except 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name @@ -171,16 +166,16 @@ 15 RET507 [*] superfluous-else-continue 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name + 15 PERF402 [ ] manual-list-copy 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 SIM114 [*] if-with-same-arms - 14 PERF402 [ ] manual-list-copy 14 D301 [*] escape-sequence-in-docstring - 14 PLR1704 [ ] redefined-argument-from-local 14 PLW3201 [ ] bad-dunder-method-name 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension + 13 PLR1704 [ ] redefined-argument-from-local 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element @@ -193,17 +188,16 @@ 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize - 10 PERF102 [*] incorrect-dict-iterator 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink + 9 PLC0206 [ ] dict-index-missing-items 9 TRY002 [ ] raise-vanilla-class 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces - 8 PLC0206 [ ] dict-index-missing-items 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 C419 [*] unnecessary-comprehension-in-call @@ -232,16 +226,12 @@ 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test 4 C404 [*] unnecessary-list-comprehension-dict - 4 G002 [ ] logging-percent-format 4 PT018 [*] pytest-composite-assertion - 4 SIM117 [ ] multiple-with-statements 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring - 4 UP022 [*] replace-stdout-stderr 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment - 4 TRY201 [*] verbose-raise 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 B009 [*] get-attr-with-constant @@ -252,10 +242,7 @@ 3 T203 [*] p-print 3 PT006 [*] pytest-parametrize-names-wrong-type 3 PT009 [ ] pytest-unittest-assertion - 3 SIM211 [*] if-expr-with-false-true 3 N818 [ ] error-suffix-on-exception-name - 3 E713 [*] not-in-test - 3 E714 [*] not-is-test 3 D411 [*] no-blank-line-before-section 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias @@ -263,10 +250,10 @@ 3 PLW1641 [ ] eq-without-hash 3 FURB105 [*] print-empty-string 3 FURB116 [ ] f-string-number-format + 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import 2 B004 [*] unreliable-callable-check - 2 B020 [ ] loop-variable-overrides-iterator 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set @@ -292,7 +279,6 @@ 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list 1 FIX003 [ ] line-contains-xxx - 1 G003 [ ] logging-string-concat 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad ```

echoix commented 4 months ago

(3): Pending changes that are in my cumulative branch, some are already filed as PRs but others no:

Details of status after pending changes (3)

```python $ ruff check --preview --select ALL --statistics > ruff_stats_3_echoix_pending.txt 13593 ANN001 [ ] missing-type-function-argument 9029 ANN201 [ ] missing-return-type-undocumented-public-function 7345 D400 [ ] ends-in-period 7335 D415 [ ] ends-in-punctuation 7284 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name 4438 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method 2148 UP031 [*] printf-string-formatting 1826 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1431 D205 [ ] blank-line-after-summary 1353 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument 1328 FBT003 [ ] boolean-positional-value-in-call 1179 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name 893 T201 [*] print 891 CPY001 [ ] missing-copyright-notice 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 712 FBT002 [ ] boolean-default-value-positional-argument 696 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 649 D107 [ ] undocumented-public-init 643 A001 [ ] builtin-variable-shadowing 585 D103 [ ] undocumented-public-function 564 PLR2004 [ ] magic-value-comparison 558 D101 [ ] undocumented-public-class 519 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 495 E501 [ ] line-too-long 492 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use 468 PLC0415 [ ] import-outside-top-level 464 C901 [ ] complex-structure 448 S101 [ ] assert 438 PLR0913 [ ] too-many-arguments 433 PLW1514 [*] unspecified-encoding 431 UP032 [*] f-string 421 RET505 [*] superfluous-else-return 378 D209 [*] new-line-after-last-paragraph 377 ANN003 [ ] missing-type-kwargs 375 PLR0912 [ ] too-many-branches 347 SIM108 [ ] if-else-block-instead-of-if-exp 339 INP001 [ ] implicit-namespace-package 339 SIM115 [ ] open-file-with-context-handler 305 PLR0917 [ ] too-many-positional 293 PLR0915 [ ] too-many-statements 256 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string 218 SIM118 [*] in-dict-keys 195 D105 [ ] undocumented-magic-method 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args 167 PLW2901 [ ] redefined-loop-name 166 PLR5501 [*] collapsible-else-if 165 ANN002 [ ] missing-type-args 162 EM101 [*] raw-string-in-exception 161 PLR0914 [ ] too-many-locals 159 PERF401 [ ] manual-list-comprehension 154 SIM102 [ ] collapsible-if 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope 133 D200 [ ] fits-on-one-line 124 PLR1702 [ ] too-many-nested-blocks 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile 118 UP015 [*] redundant-open-modes 110 SIM300 [*] yoda-conditions 109 F401 [*] unused-import 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned 97 B008 [ ] function-call-in-default-argument 96 PLR6104 [*] non-augmented-assignment 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove 88 F403 [ ] undefined-local-with-import-star 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception 81 PLR1714 [*] repeated-equality-comparison 79 B007 [ ] unused-loop-control-variable 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment 68 UP030 [*] format-literals 67 S404 [ ] suspicious-subprocess-import 64 SIM113 [ ] enumerate-for-loop 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default 61 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 50 S603 [ ] subprocess-without-shell-equals-true 49 PTH122 [ ] os-path-splitext 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name 44 D104 [ ] undocumented-public-package 43 SIM201 [*] negate-equal-op 43 D407 [*] dashed-underline-after-section 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag 40 PLR0911 [ ] too-many-return-statements 39 FIX001 [ ] line-contains-fixme 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir 36 TD005 [ ] missing-todo-description 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 PLC2801 [ ] unnecessary-dunder-call 30 E402 [ ] module-import-not-at-top-of-file 29 RET506 [*] superfluous-else-raise 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content 26 D402 [ ] no-signature 25 PTH120 [ ] os-path-dirname 25 FURB103 [ ] write-whole-file 24 S607 [ ] start-process-with-partial-path 24 E721 [ ] type-comparison 24 D300 [ ] triple-single-quotes 24 PLR6201 [*] literal-membership 24 FURB154 [*] repeated-global 22 B904 [ ] raise-without-from-inside-except 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start 18 PLW0604 [ ] global-at-module-level 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 PLR0916 [ ] too-many-boolean-expressions 16 FURB152 [*] math-constant 15 S307 [ ] suspicious-eval-usage 15 RET507 [*] superfluous-else-continue 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name 15 PERF402 [ ] manual-list-copy 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 SIM114 [*] if-with-same-arms 14 D301 [*] escape-sequence-in-docstring 14 PLW3201 [ ] bad-dunder-method-name 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 13 PLR1704 [ ] redefined-argument-from-local 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element 12 RUF021 [*] parenthesize-chained-operators 12 RUF100 [*] unused-noqa 11 S112 [ ] try-except-continue 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented 11 TRY301 [ ] raise-within-try 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink 9 PLC0206 [ ] dict-index-missing-items 9 TRY002 [ ] raise-vanilla-class 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation 7 SIM101 [*] duplicate-isinstance-call 7 PTH101 [ ] os-chmod 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace 7 UP034 [*] extraneous-parentheses 6 S108 [ ] hardcoded-temp-file 6 PIE810 [*] multiple-starts-ends-with 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true 5 C404 [*] unnecessary-list-comprehension-dict 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test 4 PT018 [*] pytest-composite-assertion 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring 4 RUF003 [ ] ambiguous-unicode-character-comment 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 FBT001 [ ] boolean-type-hint-positional-argument 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print 3 PT006 [*] pytest-parametrize-names-wrong-type 3 PT009 [ ] pytest-unittest-assertion 3 N818 [ ] error-suffix-on-exception-name 3 D411 [*] no-blank-line-before-section 3 PLC0414 [*] useless-import-alias 3 PLW1641 [ ] eq-without-hash 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir 2 PTH117 [ ] os-path-isabs 2 E231 [*] missing-whitespace 2 D208 [*] over-indentation 2 F601 [*] multi-value-repeated-key-literal 2 F822 [ ] undefined-export 2 PLC2701 [ ] import-private-name 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 FURB142 [*] for-loop-set-mutations 2 FURB148 [*] unnecessary-enumerate 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list 1 FIX003 [ ] line-contains-xxx 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad 1 SIM109 [*] compare-with-tuple 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself 1 PLR0202 [*] no-classmethod-decorator 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals 1 FURB131 [*] delete-full-slice 1 FURB140 [*] reimplemented-starmap 1 FURB192 [*] sorted-min-max ```

Details diff between states (2) and (3), ie, the pending fixes

```diff diff --git a/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt b/ruff_stats_3_echoix_pending.txt index f455e0be93..fcb9ec885d 100644 --- a/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt +++ b/ruff_stats_3_echoix_pending.txt @@ -1,40 +1,40 @@ -13607 ANN001 [ ] missing-type-function-argument - 9030 ANN201 [ ] missing-return-type-undocumented-public-function - 7346 D400 [ ] ends-in-period - 7336 D415 [ ] ends-in-punctuation - 7293 COM812 [*] missing-trailing-comma +13593 ANN001 [ ] missing-type-function-argument + 9029 ANN201 [ ] missing-return-type-undocumented-public-function + 7345 D400 [ ] ends-in-period + 7335 D415 [ ] ends-in-punctuation + 7284 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name 4438 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method - 2149 UP031 [*] printf-string-formatting + 2148 UP031 [*] printf-string-formatting 1826 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage - 1433 D205 [ ] blank-line-after-summary + 1431 D205 [ ] blank-line-after-summary 1353 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument 1328 FBT003 [ ] boolean-positional-value-in-call - 1182 ANN204 [ ] missing-return-type-special-method + 1179 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name 893 T201 [*] print 891 CPY001 [ ] missing-copyright-notice 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line - 715 FBT002 [ ] boolean-default-value-positional-argument - 699 I001 [*] unsorted-imports + 712 FBT002 [ ] boolean-default-value-positional-argument + 696 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo - 650 D107 [ ] undocumented-public-init + 649 D107 [ ] undocumented-public-init 643 A001 [ ] builtin-variable-shadowing 585 D103 [ ] undocumented-public-function - 563 PLR2004 [ ] magic-value-comparison - 556 D101 [ ] undocumented-public-class + 564 PLR2004 [ ] magic-value-comparison + 558 D101 [ ] undocumented-public-class 519 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 495 E501 [ ] line-too-long - 491 F841 [ ] unused-variable + 492 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use @@ -56,7 +56,7 @@ 256 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 223 PLC1901 [ ] compare-to-empty-string - 217 SIM118 [*] in-dict-keys + 218 SIM118 [*] in-dict-keys 195 D105 [ ] undocumented-magic-method 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except @@ -103,9 +103,8 @@ 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default - 62 BLE001 [ ] blind-except + 61 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename - 59 FURB110 [*] if-exp-instead-of-or-operator 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression @@ -116,7 +115,6 @@ 49 PTH122 [ ] os-path-splitext 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name - 48 B904 [ ] raise-without-from-inside-except 44 D104 [ ] undocumented-public-package 43 SIM201 [*] negate-equal-op 43 D407 [*] dashed-underline-after-section @@ -139,7 +137,6 @@ 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content 26 D402 [ ] no-signature - 25 C417 [*] unnecessary-map 25 PTH120 [ ] os-path-dirname 25 FURB103 [ ] write-whole-file 24 S607 [ ] start-process-with-partial-path @@ -147,6 +144,7 @@ 24 D300 [ ] triple-single-quotes 24 PLR6201 [*] literal-membership 24 FURB154 [*] repeated-global + 22 B904 [ ] raise-without-from-inside-except 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import @@ -200,7 +198,6 @@ 8 D206 [ ] indent-with-spaces 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process - 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack @@ -210,31 +207,30 @@ 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace + 7 UP034 [*] extraneous-parentheses 6 S108 [ ] hardcoded-temp-file 6 PIE810 [*] multiple-starts-ends-with 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused - 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true + 5 C404 [*] unnecessary-list-comprehension-dict 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 FURB171 [*] single-item-membership-test - 4 C404 [*] unnecessary-list-comprehension-dict 4 PT018 [*] pytest-composite-assertion 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring - 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell - 3 B009 [*] get-attr-with-constant + 3 FBT001 [ ] boolean-type-hint-positional-argument 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today @@ -244,16 +240,11 @@ 3 PT009 [ ] pytest-unittest-assertion 3 N818 [ ] error-suffix-on-exception-name 3 D411 [*] no-blank-line-before-section - 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias - 3 PLR2044 [*] empty-comment 3 PLW1641 [ ] eq-without-hash - 3 FURB105 [*] print-empty-string - 3 FURB116 [ ] f-string-number-format 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import - 2 B004 [*] unreliable-callable-check 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set @@ -274,7 +265,6 @@ 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout - 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list @@ -286,7 +276,6 @@ 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment - 1 W391 [*] too-many-newlines-at-end-of-file 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length ```

echoix commented 4 months ago

@ninsbl Thanks for taking some time for these numerous improvements in python code quality, and to participate in this (not small) project or rather endeavour!

echoix commented 3 months ago

(4): State of main on 2024-07-21 for commit 1f6fa6c62e7d53f6daa980098735f73f9e3e16b8:

Details of $ ruff check --preview --select ALL --statistics > ruff_stats_4_main_20240721_1f6fa6c62e7d53f6daa980098735f73f9e3e16b8.txt

```python $ ruff check --preview --select ALL --statistics > ruff_stats_4_main_20240721_1f6fa6c62e7d53f6daa980098735f73f9e3e16b8.txt 13603 ANN001 [ ] missing-type-function-argument 8963 ANN201 [ ] missing-return-type-undocumented-public-function 7349 D400 [ ] ends-in-period 7339 D415 [ ] ends-in-punctuation 7293 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name 4430 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method 2146 UP031 [*] printf-string-formatting 1812 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1433 D205 [ ] blank-line-after-summary 1352 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument 1325 FBT003 [ ] boolean-positional-value-in-call 1182 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name 892 CPY001 [ ] missing-copyright-notice 890 T201 [*] print 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 715 FBT002 [ ] boolean-default-value-positional-argument 701 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 650 D107 [ ] undocumented-public-init 640 A001 [ ] builtin-variable-shadowing 587 D103 [ ] undocumented-public-function 559 PLR2004 [ ] magic-value-comparison 556 D101 [ ] undocumented-public-class 521 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method 499 E501 [ ] line-too-long 491 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing 481 PLR6301 [ ] no-self-use 468 PLC0415 [ ] import-outside-top-level 461 C901 [ ] complex-structure 448 S101 [ ] assert 433 PTH123 [ ] builtin-open 433 PLW1514 [*] unspecified-encoding 429 UP032 [*] f-string 378 D209 [*] new-line-after-last-paragraph 377 ANN003 [ ] missing-type-kwargs 375 RET505 [*] superfluous-else-return 363 PLR0912 [ ] too-many-branches 345 SIM108 [ ] if-else-block-instead-of-if-exp 339 INP001 [ ] implicit-namespace-package 339 SIM115 [ ] open-file-with-context-handler 306 PLR0913 [ ] too-many-arguments 305 PLR0917 [ ] too-many-positional 293 PLR0915 [ ] too-many-statements 257 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists 218 SIM118 [*] in-dict-keys 213 PLC1901 [ ] compare-to-empty-string 195 D105 [ ] undocumented-magic-method 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args 167 PLW2901 [ ] redefined-loop-name 165 ANN002 [ ] missing-type-args 162 EM101 [*] raw-string-in-exception 161 PLR0914 [ ] too-many-locals 160 PERF401 [ ] manual-list-comprehension 154 SIM102 [ ] collapsible-if 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope 133 D200 [ ] fits-on-one-line 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile 116 PLR1702 [ ] too-many-nested-blocks 109 F401 [*] unused-import 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned 105 UP015 [*] redundant-open-modes 97 B008 [ ] function-call-in-default-argument 96 PLR6104 [*] non-augmented-assignment 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs 91 PTH107 [ ] os-remove 88 F403 [ ] undefined-local-with-import-star 81 SIM105 [ ] suppressible-exception 77 B007 [ ] unused-loop-control-variable 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment 68 S404 [ ] suspicious-subprocess-import 68 UP030 [*] format-literals 64 SIM113 [ ] enumerate-for-loop 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default 62 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir 51 S603 [ ] subprocess-without-shell-equals-true 49 PTH122 [ ] os-path-splitext 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name 48 B904 [ ] raise-without-from-inside-except 47 SIM201 [*] negate-equal-op 44 D104 [ ] undocumented-public-package 43 D407 [*] dashed-underline-after-section 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag 39 FIX001 [ ] line-contains-fixme 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir 36 TD005 [ ] missing-todo-description 35 RSE102 [*] unnecessary-paren-on-raise-exception 35 PLR0911 [ ] too-many-return-statements 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 PLC2801 [ ] unnecessary-dunder-call 30 E402 [ ] module-import-not-at-top-of-file 29 RET506 [*] superfluous-else-raise 28 D412 [*] blank-lines-between-header-and-content 27 PLR6201 [*] literal-membership 26 D402 [ ] no-signature 25 S607 [ ] start-process-with-partial-path 25 PTH120 [ ] os-path-dirname 25 E721 [ ] type-comparison 24 B909 [ ] loop-iterator-mutation 24 D300 [ ] triple-single-quotes 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start 18 SIM114 [*] if-with-same-arms 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name 16 RUF100 [*] unused-noqa 15 S307 [ ] suspicious-eval-usage 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name 15 PERF402 [ ] manual-list-copy 15 PLR0916 [ ] too-many-boolean-expressions 14 S311 [ ] suspicious-non-cryptographic-random-usage 14 D301 [*] escape-sequence-in-docstring 14 PLW3201 [ ] bad-dunder-method-name 14 RUF021 [*] parenthesize-chained-operators 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method 13 RET507 [*] superfluous-else-continue 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 13 PLR1704 [ ] redefined-argument-from-local 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element 11 S112 [ ] try-except-continue 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented 11 TRY301 [ ] raise-within-try 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink 9 PLC0206 [ ] dict-index-missing-items 9 TRY002 [ ] raise-vanilla-class 8 B015 [ ] useless-comparison 8 SIM110 [*] reimplemented-builtin 8 PD011 [ ] pandas-use-of-dot-values 8 D206 [ ] indent-with-spaces 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation 7 PIE810 [*] multiple-starts-ends-with 7 PTH101 [ ] os-chmod 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace 7 UP034 [*] extraneous-parentheses 6 S108 [ ] hardcoded-temp-file 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true 5 SIM101 [*] duplicate-isinstance-call 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise 5 PLW0604 [ ] global-at-module-level 4 C404 [*] unnecessary-list-comprehension-dict 4 PT018 [*] pytest-composite-assertion 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring 4 RUF003 [ ] ambiguous-unicode-character-comment 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell 3 FBT001 [ ] boolean-type-hint-positional-argument 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today 3 DTZ006 [ ] call-datetime-fromtimestamp 3 T203 [*] p-print 3 PT006 [*] pytest-parametrize-names-wrong-type 3 PT009 [ ] pytest-unittest-assertion 3 N818 [ ] error-suffix-on-exception-name 3 D411 [*] no-blank-line-before-section 3 PLC0414 [*] useless-import-alias 3 PLW1641 [ ] eq-without-hash 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import 2 B004 [*] unreliable-callable-check 2 COM818 [ ] trailing-comma-on-bare-tuple 2 C401 [*] unnecessary-generator-set 2 C405 [*] unnecessary-literal-set 2 SIM116 [ ] if-else-block-instead-of-dict-lookup 2 SIM223 [*] expr-and-false 2 PTH106 [ ] os-rmdir 2 PTH117 [ ] os-path-isabs 2 E231 [*] missing-whitespace 2 D208 [*] over-indentation 2 F601 [*] multi-value-repeated-key-literal 2 F822 [ ] undefined-export 2 PLC2701 [ ] import-private-name 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list 1 FIX003 [ ] line-contains-xxx 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length 1 PLR0124 [ ] comparison-with-itself 1 PLR0202 [*] no-classmethod-decorator 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals ```

Diff between main branch on 2024-07-10 c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7 (2) and main branch on 2024-07-21 1f6fa6c62e7d53f6daa980098735f73f9e3e16b8 (4)

```diff diff --git a/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt b/ruff_stats_4_main_20240721_1f6fa6c62e7d53f6daa980098735f73f9e3e16b8.txt index fdd44528ee..86b2bcee3a 100644 --- a/ruff_stats_2_main_20240710_c9a1a17c5266f9c01da8be4daf4500aeafbb7ba7.txt +++ b/ruff_stats_4_main_20240721_1f6fa6c62e7d53f6daa980098735f73f9e3e16b8.txt @@ -1,186 +1,174 @@ -13607 ANN001 [ ] missing-type-function-argument - 9030 ANN201 [ ] missing-return-type-undocumented-public-function - 7346 D400 [ ] ends-in-period - 7336 D415 [ ] ends-in-punctuation +13603 ANN001 [ ] missing-type-function-argument + 8963 ANN201 [ ] missing-return-type-undocumented-public-function + 7349 D400 [ ] ends-in-period + 7339 D415 [ ] ends-in-punctuation 7293 COM812 [*] missing-trailing-comma 5919 N802 [ ] invalid-function-name - 4438 N806 [ ] non-lowercase-variable-in-function + 4430 N806 [ ] non-lowercase-variable-in-function 2285 D102 [ ] undocumented-public-method - 2149 UP031 [*] printf-string-formatting - 1826 ANN202 [ ] missing-return-type-private-function + 2146 UP031 [*] printf-string-formatting + 1812 ANN202 [ ] missing-return-type-private-function 1439 F405 [ ] undefined-local-with-import-star-usage 1433 D205 [ ] blank-line-after-summary - 1353 ERA001 [*] commented-out-code + 1352 ERA001 [*] commented-out-code 1337 ARG002 [ ] unused-method-argument - 1328 FBT003 [ ] boolean-positional-value-in-call + 1325 FBT003 [ ] boolean-positional-value-in-call 1182 ANN204 [ ] missing-return-type-special-method 1115 D401 [ ] non-imperative-mood 909 N803 [ ] invalid-argument-name - 893 T201 [*] print - 891 CPY001 [ ] missing-copyright-notice + 892 CPY001 [ ] missing-copyright-notice + 890 T201 [*] print 762 PTH118 [ ] os-path-join 751 D212 [*] multi-line-summary-first-line 715 FBT002 [ ] boolean-default-value-positional-argument - 699 I001 [*] unsorted-imports + 701 I001 [*] unsorted-imports 693 TD002 [ ] missing-todo-author 688 TD003 [ ] missing-todo-link 661 DTZ001 [ ] call-datetime-without-tzinfo 654 FIX002 [ ] line-contains-todo 650 D107 [ ] undocumented-public-init - 643 A001 [ ] builtin-variable-shadowing - 585 D103 [ ] undocumented-public-function - 563 PLR2004 [ ] magic-value-comparison + 640 A001 [ ] builtin-variable-shadowing + 587 D103 [ ] undocumented-public-function + 559 PLR2004 [ ] magic-value-comparison 556 D101 [ ] undocumented-public-class - 519 D202 [*] no-blank-line-after-function + 521 D202 [*] no-blank-line-after-function 513 ANN206 [*] missing-return-type-class-method - 495 E501 [ ] line-too-long + 499 E501 [ ] line-too-long 491 F841 [ ] unused-variable 490 A002 [ ] builtin-argument-shadowing - 487 PTH123 [ ] builtin-open 481 PLR6301 [ ] no-self-use 468 PLC0415 [ ] import-outside-top-level - 464 C901 [ ] complex-structure + 461 C901 [ ] complex-structure 448 S101 [ ] assert - 438 PLR0913 [ ] too-many-arguments + 433 PTH123 [ ] builtin-open 433 PLW1514 [*] unspecified-encoding - 431 UP032 [*] f-string - 421 RET505 [*] superfluous-else-return + 429 UP032 [*] f-string 378 D209 [*] new-line-after-last-paragraph 377 ANN003 [ ] missing-type-kwargs - 375 PLR0912 [ ] too-many-branches - 347 SIM108 [ ] if-else-block-instead-of-if-exp + 375 RET505 [*] superfluous-else-return + 363 PLR0912 [ ] too-many-branches + 345 SIM108 [ ] if-else-block-instead-of-if-exp 339 INP001 [ ] implicit-namespace-package 339 SIM115 [ ] open-file-with-context-handler + 306 PLR0913 [ ] too-many-arguments 305 PLR0917 [ ] too-many-positional 293 PLR0915 [ ] too-many-statements - 256 D100 [ ] undocumented-public-module + 257 D100 [ ] undocumented-public-module 246 PTH110 [ ] os-path-exists - 223 PLC1901 [ ] compare-to-empty-string - 217 SIM118 [*] in-dict-keys + 218 SIM118 [*] in-dict-keys + 213 PLC1901 [ ] compare-to-empty-string 195 D105 [ ] undocumented-magic-method 193 SLF001 [ ] private-member-access 184 E722 [ ] bare-except 171 TRY003 [ ] raise-vanilla-args 167 PLW2901 [ ] redefined-loop-name - 166 PLR5501 [*] collapsible-else-if 165 ANN002 [ ] missing-type-args 162 EM101 [*] raw-string-in-exception 161 PLR0914 [ ] too-many-locals - 159 PERF401 [ ] manual-list-comprehension + 160 PERF401 [ ] manual-list-comprehension 154 SIM102 [ ] collapsible-if 154 TD004 [ ] missing-todo-colon 142 W605 [*] invalid-escape-sequence 137 PLW0603 [ ] global-statement 134 N815 [ ] mixed-case-variable-in-class-scope 133 D200 [ ] fits-on-one-line - 124 PLR1702 [ ] too-many-nested-blocks 122 N816 [ ] mixed-case-variable-in-global-scope 118 PTH113 [ ] os-path-isfile - 118 UP015 [*] redundant-open-modes - 110 SIM300 [*] yoda-conditions + 116 PLR1702 [ ] too-many-nested-blocks 109 F401 [*] unused-import 108 RET503 [*] implicit-return 107 ARG005 [ ] unused-lambda-argument 105 ARG001 [ ] unused-function-argument 105 PLW0602 [ ] global-variable-not-assigned + 105 UP015 [*] redundant-open-modes 97 B008 [ ] function-call-in-default-argument 96 PLR6104 [*] non-augmented-assignment 94 D404 [ ] docstring-starts-with-this 93 PTH103 [ ] os-makedirs - 92 SIM103 [*] needless-bool 91 PTH107 [ ] os-remove 88 F403 [ ] undefined-local-with-import-star - 81 RET504 [*] unnecessary-assign 81 SIM105 [ ] suppressible-exception - 81 PLR1714 [*] repeated-equality-comparison - 79 B007 [ ] unused-loop-control-variable + 77 B007 [ ] unused-loop-control-variable 73 EXE001 [ ] shebang-not-executable 71 PLR0904 [ ] too-many-public-methods 69 E265 [*] no-space-after-block-comment + 68 S404 [ ] suspicious-subprocess-import 68 UP030 [*] format-literals - 67 S404 [ ] suspicious-subprocess-import 64 SIM113 [ ] enumerate-for-loop 63 S110 [ ] try-except-pass 63 B006 [*] mutable-argument-default 63 RUF012 [ ] mutable-class-default 62 BLE001 [ ] blind-except 60 PTH119 [ ] os-path-basename - 59 FURB110 [*] if-exp-instead-of-or-operator 58 PERF203 [ ] try-except-in-loop 58 RUF005 [ ] collection-literal-concatenation 57 S608 [ ] hardcoded-sql-expression 54 RET502 [*] implicit-return-value 54 PTH109 [ ] os-getcwd 52 PTH112 [ ] os-path-isdir - 50 S603 [ ] subprocess-without-shell-equals-true + 51 S603 [ ] subprocess-without-shell-equals-true 49 PTH122 [ ] os-path-splitext 49 N812 [ ] lowercase-imported-as-non-lowercase 49 F821 [ ] undefined-name 48 B904 [ ] raise-without-from-inside-except + 47 SIM201 [*] negate-equal-op 44 D104 [ ] undocumented-public-package - 43 SIM201 [*] negate-equal-op 43 D407 [*] dashed-underline-after-section 42 PTH100 [ ] os-path-abspath 40 TD001 [ ] invalid-todo-tag - 40 PLR0911 [ ] too-many-return-statements 39 FIX001 [ ] line-contains-fixme 39 PIE790 [*] unnecessary-placeholder 39 TRY300 [ ] try-consider-else 37 PTH102 [ ] os-mkdir 36 TD005 [ ] missing-todo-description - 36 FURB129 [*] readlines-in-for 35 RSE102 [*] unnecessary-paren-on-raise-exception + 35 PLR0911 [ ] too-many-return-statements 34 D403 [*] first-line-capitalized 34 D413 [*] blank-line-after-last-section 33 S314 [ ] suspicious-xml-element-tree-usage 33 PLC2801 [ ] unnecessary-dunder-call 30 E402 [ ] module-import-not-at-top-of-file 29 RET506 [*] superfluous-else-raise - 29 FURB101 [ ] read-whole-file 28 D412 [*] blank-lines-between-header-and-content + 27 PLR6201 [*] literal-membership 26 D402 [ ] no-signature - 25 C417 [*] unnecessary-map + 25 S607 [ ] start-process-with-partial-path 25 PTH120 [ ] os-path-dirname - 25 FURB103 [ ] write-whole-file - 24 S607 [ ] start-process-with-partial-path - 24 E721 [ ] type-comparison + 25 E721 [ ] type-comparison + 24 B909 [ ] loop-iterator-mutation 24 D300 [ ] triple-single-quotes - 24 PLR6201 [*] literal-membership - 24 FURB154 [*] repeated-global 22 E266 [*] multiple-leading-hashes-for-block-comment 20 C416 [*] unnecessary-comprehension 19 S405 [ ] suspicious-xml-etree-import 18 S310 [ ] suspicious-url-open-usage 18 EM103 [*] dot-format-in-exception 18 PIE808 [*] unnecessary-range-start - 18 PLW0604 [ ] global-at-module-level + 18 SIM114 [*] if-with-same-arms 18 FURB118 [ ] reimplemented-operator 17 DTZ005 [ ] call-datetime-now-without-tzinfo 17 PTH207 [ ] glob 16 EM102 [*] f-string-in-exception 16 E101 [ ] mixed-spaces-and-tabs 16 D406 [*] new-line-after-section-name - 16 PLR0916 [ ] too-many-boolean-expressions - 16 FURB152 [*] math-constant + 16 RUF100 [*] unused-noqa 15 S307 [ ] suspicious-eval-usage - 15 RET507 [*] superfluous-else-continue 15 N813 [ ] camelcase-imported-as-lowercase 15 N999 [ ] invalid-module-name 15 PERF402 [ ] manual-list-copy + 15 PLR0916 [ ] too-many-boolean-expressions 14 S311 [ ] suspicious-non-cryptographic-random-usage - 14 SIM114 [*] if-with-same-arms 14 D301 [*] escape-sequence-in-docstring 14 PLW3201 [ ] bad-dunder-method-name + 14 RUF021 [*] parenthesize-chained-operators 14 RUF027 [*] missing-f-string-syntax 13 ANN205 [ ] missing-return-type-static-method + 13 RET507 [*] superfluous-else-continue 13 RET508 [*] superfluous-else-break 13 PERF403 [ ] manual-dict-comprehension 13 PLR1704 [ ] redefined-argument-from-local 12 PTH116 [ ] os-stat 12 PLW0127 [ ] self-assigning-variable 12 RUF015 [*] unnecessary-iterable-allocation-for-first-element - 12 RUF021 [*] parenthesize-chained-operators - 12 RUF100 [*] unused-noqa 11 S112 [ ] try-except-continue 11 N801 [ ] invalid-class-name 11 D214 [*] section-not-over-indented @@ -188,7 +176,6 @@ 10 B026 [ ] star-arg-unpacking-after-keyword-arg 10 PTH104 [ ] os-rename 10 PTH202 [ ] os-path-getsize - 9 B909 [ ] loop-iterator-mutation 9 DTZ007 [ ] call-datetime-strptime-without-zone 9 TD006 [*] invalid-todo-capitalization 9 PTH108 [ ] os-unlink @@ -200,41 +187,39 @@ 8 D206 [ ] indent-with-spaces 8 TRY004 [ ] type-check-without-type-error 7 C414 [*] unnecessary-double-cast-or-process - 7 C419 [*] unnecessary-comprehension-in-call 7 DTZ011 [ ] call-date-today 7 EXE002 [ ] shebang-missing-executable-file 7 FIX004 [ ] line-contains-hack 7 ISC003 [ ] explicit-string-concatenation - 7 SIM101 [*] duplicate-isinstance-call + 7 PIE810 [*] multiple-starts-ends-with 7 PTH101 [ ] os-chmod 7 PTH111 [ ] os-path-expanduser 7 PTH204 [ ] os-path-getmtime 7 D210 [ ] surrounding-whitespace + 7 UP034 [*] extraneous-parentheses 6 S108 [ ] hardcoded-temp-file - 6 PIE810 [*] multiple-starts-ends-with 6 RET501 [*] unnecessary-return-none 6 SIM401 [*] if-else-block-instead-of-dict-get 6 E741 [ ] ambiguous-variable-name 6 F811 [ ] redefined-while-unused - 6 UP034 [*] extraneous-parentheses 6 UP036 [*] outdated-version-block 6 RUF019 [*] unnecessary-key-check 5 S202 [ ] tarfile-unsafe-members 5 S324 [ ] hashlib-insecure-hash-function 5 S602 [ ] subprocess-popen-with-shell-equals-true + 5 SIM101 [*] duplicate-isinstance-call 5 N805 [*] invalid-first-argument-name-for-method 5 PLE0704 [ ] misplaced-bare-raise - 5 FURB171 [*] single-item-membership-test + 5 PLW0604 [ ] global-at-module-level 4 C404 [*] unnecessary-list-comprehension-dict 4 PT018 [*] pytest-composite-assertion 4 D405 [*] capitalize-section-name 4 D416 [*] section-name-ends-in-colon 4 D419 [ ] empty-docstring - 4 FURB136 [*] if-expr-min-max 4 RUF003 [ ] ambiguous-unicode-character-comment 3 S604 [ ] call-with-shell-equals-true 3 S606 [ ] start-process-with-no-shell - 3 B009 [*] get-attr-with-constant + 3 FBT001 [ ] boolean-type-hint-positional-argument 3 B034 [ ] re-sub-positional-args 3 C403 [*] unnecessary-list-comprehension-set 3 DTZ002 [ ] call-datetime-today @@ -244,12 +229,8 @@ 3 PT009 [ ] pytest-unittest-assertion 3 N818 [ ] error-suffix-on-exception-name 3 D411 [*] no-blank-line-before-section - 3 F632 [*] is-literal 3 PLC0414 [*] useless-import-alias - 3 PLR2044 [*] empty-comment 3 PLW1641 [ ] eq-without-hash - 3 FURB105 [*] print-empty-string - 3 FURB116 [ ] f-string-number-format 3 TRY201 [*] verbose-raise 2 S403 [ ] suspicious-pickle-import 2 S406 [ ] suspicious-xml-sax-import @@ -268,13 +249,10 @@ 2 PLC2701 [ ] import-private-name 2 PLW1508 [ ] invalid-envvar-default 2 PLW1510 [*] subprocess-run-without-check - 2 FURB142 [*] for-loop-set-mutations - 2 FURB148 [*] unnecessary-enumerate 2 RUF002 [ ] ambiguous-unicode-character-docstring 2 RUF013 [*] implicit-optional 1 YTT204 [ ] sys-version-info-minor-cmp-int 1 S113 [ ] request-without-timeout - 1 FBT001 [ ] boolean-type-hint-positional-argument 1 B023 [ ] function-uses-loop-variable 1 B028 [ ] no-explicit-stacklevel 1 C400 [*] unnecessary-generator-list @@ -282,11 +260,9 @@ 1 PIE794 [*] duplicate-class-field-definition 1 PT004 [ ] pytest-missing-fixture-name-underscore 1 PT011 [ ] pytest-raises-too-broad - 1 SIM109 [*] compare-with-tuple 1 N804 [*] invalid-first-argument-name-for-class-method 1 N817 [ ] camelcase-imported-as-acronym 1 E731 [*] lambda-assignment - 1 W391 [*] too-many-newlines-at-end-of-file 1 D201 [*] no-blank-line-before-function 1 D204 [*] one-blank-line-after-class 1 D409 [*] section-underline-matches-section-length @@ -295,6 +271,3 @@ 1 PLR1733 [*] unnecessary-dict-index-lookup 1 PLW0406 [ ] import-self 1 UP018 [*] native-literals - 1 FURB131 [*] delete-full-slice - 1 FURB140 [*] reimplemented-starmap - 1 FURB192 [*] sorted-min-max ```