secure-systems-lab / securesystemslib

Cryptographic and general-purpose routines for Secure Systems Lab projects at NYU
MIT License
46 stars 48 forks source link

Collection of suppressed Ruff Linter errors to review (noqa) #838

Open L77H opened 1 month ago

L77H commented 1 month ago

The following are currently suppressed linter errors, these should be reviewed and decided on if they can be resolved or kept suppressed with #noqa. This issue will be updated with more errors if when they come up.

PLW2901: redefined-loop-name https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/dsse.py#L63C1-L73C54

S603: subprocess-without-shell-equals-true https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/constants.py#L37-L45

N818: error-suffix-on-exception-name move this to exceptions.py? https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/signer/_azure_signer.py#L36-L37

PLR2004: magic-value-comparison https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/util.py https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/tests/test_gpg.py

PLW0603: global-statement https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/signer/_hsm_signer.py#L67

PLR0912: too-many-branches https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/common.py#L656-L902

PLR0915: too-many-statements https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/common.py#L656-L902

PLR0913: too-many-arguments https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/signer/_sigstore_signer.py#L37-L44

E402: module-import-not-at-top-of-file https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/dsa.py#L30C15-L33 https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/rsa.py#L29-L32 https://github.com/secure-systems-lab/securesystemslib/blob/db0a9a5afe9604f4e614e1979d0559832df64a08/securesystemslib/_gpg/util.py#L33-L36

lukpueh commented 1 month ago

I'm fine if we just suppress above linter warnings in the _gpg subpackage.