| 1 | [tool.ruff] |
| 2 | target-version = "py39" |
| 3 | line-length = 88 |
| 4 | |
| 5 | [tool.ruff.lint] |
| 6 | ignore = [ |
| 7 | "S311", |
| 8 | "F821", # undefined names are used for decorators |
| 9 | "S101", # use of assert detected |
| 10 | "S105", # too many false positives |
| 11 | "S104", # intended |
| 12 | "SLF001", # intended |
| 13 | "SIM109", # intended for cython |
| 14 | "SIM102", # intended for cython |
| 15 | "E501", # too many to fix, |
| 16 | "TC001", # too many to fix right now |
| 17 | "TID252", # intended |
| 18 | "PLC0414", # intended |
| 19 | "TRY003", # too many to fix |
| 20 | "PLR2004", # way too many to fix right now |
| 21 | "PLR0911", # api is public |
| 22 | "PYI036", # too many to fix |
| 23 | "PYI034", # too many to fix |
| 24 | "TC003", # too many to fix |
| 25 | "PYI024", # too many to fix |
| 26 | "PGH003", # too many to fix |
| 27 | ## should fix these sooner |
| 28 | "C901", # too many to fix right now |
| 29 | "B007", # too many to fix -- should fix sooner |
| 30 | "SIM103", # too many to fix -- should fix sooner |
| 31 | "SIM110", # too many to fix -- should fix sooner |
| 32 | "RUF012", # too many to fix -- should fix sooner |
| 33 | "TRY002", # too many to fix -- should fix sooner |
| 34 | "B904", # too many to fix -- should fix sooner |
| 35 | "PERF401", # too many to fix -- should fix sooner |
| 36 | "B904", # too many to fix -- should fix sooner |
| 37 | "PLR1704", # too many to fix -- should fix sooner |
| 38 | "B006", # too many to fix -- should fix sooner |
| 39 | "G004", # too many to fix -- should fix sooner |
| 40 | "PT015", # too many to fix -- should fix sooner |
| 41 | "B011", # too many to fix -- should fix sooner |
| 42 | "PLR1714", # too many to fix -- should fix sooner |
| 43 | "PLR0915", # too many to fix -- should fix sooner |
| 44 | "PERF102", # too many to fix -- should fix sooner |
| 45 | "TRY401", # too many to fix -- should fix sooner |
| 46 | "PLR0913", # too many to fix -- should fix sooner |
| 47 | "PLR0912", # too many to fix -- should fix sooner |
| 48 | "PERF203", # too many to fix -- should fix sooner |
| 49 | "G201", # too many to fix -- should fix sooner |
| 50 | "TRY301", # too many to fix -- should fix sooner |
| 51 | "B020", # too many to fix -- should fix sooner |
| 52 | "S314", # too many to fix -- should fix sooner |
| 53 | "RET504", # too many to fix -- should fix sooner |
| 54 | "SIM105", # too many to fix -- should fix sooner |
| 55 | "TRY300", # too many to fix -- should fix sooner |
| 56 | "PLW2901", # too many to fix -- should fix sooner |
| 57 | "PERF402", # too many to fix -- should fix sooner |
| 58 | |
| 59 | ] |
| 60 | select = [ |
| 61 | "ASYNC", # async rules |
| 62 | "B", # flake8-bugbear |
| 63 | "C9", # flake8-mcabbe |
| 64 | "C4", # flake8-comprehensions |
| 65 | "S", # flake8-bandit |
| 66 | "F", # pyflake |
| 67 | "E", # pycodestyle |
| 68 | "W", # pycodestyle |
| 69 | "UP", # pyupgrade |
| 70 | "I", # isort |
| 71 | "RUF", # ruff specific |
| 72 | "FLY", # flynt |
| 73 | "FURB", # refurb |
| 74 | "G", # flake8-logging-format , |
| 75 | "PERF", # Perflint |
| 76 | "PGH", # pygrep-hooks |
| 77 | "PIE", # flake8-pie |
| 78 | "PL", # pylint |
| 79 | "PT", # flake8-pytest-style |
| 80 | "PYI", # flake8-pyi |
| 81 | "RET", # flake8-return |
| 82 | "RSE", # flake8-raise , |
| 83 | "SIM", # flake8-simplify |
| 84 | "SLF", # flake8-self |
| 85 | "SLOT", # flake8-slots |
| 86 | "T100", # Trace found: {name} used |
| 87 | "T20", # flake8-print |
| 88 | "TC", # flake8-type-checking |
| 89 | "TID", # Tidy imports |
| 90 | "TRY", # tryceratops |
| 91 | ] |
| 92 | |
| 93 | |
| 94 | [tool.ruff.lint.per-file-ignores] |
| 95 | "tests/**/*" = [ |
| 96 | "D100", |
| 97 | "D101", |
| 98 | "D102", |
| 99 | "D103", |
| 100 | "D104", |
| 101 | "S101", |
| 102 | "S108", |
| 103 | "SLF001", |
| 104 | "PLW", # too many to fix |
| 105 | "TRY",# too many to fix right now |
| 106 | "PT",# too many to fix right now |
| 107 | "B",# too many to fix right now |
| 108 | "RET",# too many to fix right now |
| 109 | "PLR2004", # too many to fix right now |
| 110 | "PT011", # too many to fix right now |
| 111 | "PT006", # too many to fix right now |
| 112 | "PGH003", # too many to fix right now |
| 113 | "PT007", # too many to fix right now |
| 114 | "PT027", # too many to fix right now |
| 115 | "PLW0603" , # too many to fix right now |
| 116 | "PLR0915", # too many to fix right now |
| 117 | "FLY002", # too many to fix right now |
| 118 | "PT018", # too many to fix right now |
| 119 | "PLR0124", # too many to fix right now |
| 120 | "SIM202" , # too many to fix right now |
| 121 | "PT012" , # too many to fix right now |
| 122 | "TID252", # too many to fix right now |
| 123 | "PLR0913", # skip this one |
| 124 | "SIM102" , # too many to fix right now |
| 125 | "SIM108", # too many to fix right now |
| 126 | "TC003", # too many to fix right now |
| 127 | "TC002", # too many to fix right now |
| 128 | "T201", # too many to fix right now |
| 129 | ] |
| 130 | "bench/**/*" = [ |
| 131 | "T201", # intended |
| 132 | ] |
| 133 | "examples/**/*" = [ |
| 134 | "T201", # intended |
| 135 | "RSE102", # too many to fix |
| 136 | "C408", # too many to fix |
| 137 | "T203", # intended |
| 138 | ] |
| 139 | "flux_led/fluxled.py" = [ |
| 140 | "T201" # print ok |
| 141 | ] |
| 142 | |
| 143 | |
| 144 | [tool.coverage.run] |
| 145 | source = ["flux_led"] |
| 146 | plugins = ["covdefaults"] |
| 147 | omit = ["fluxled/fluxled.py", "examples/*", "*/dist-packages/*", "tests/*"] |
| 148 | |
| 149 | [tool.coverage.report] |
| 150 | fail_under = 75 |