Repository navigation
Commit 6f37e7e
chore(lint): apply ruff's safe autofixes (Optional[X], __all__ order, regex flags) (#198)
* chore(lint): apply ruff's safe autofixes
Apply the mechanical, behavior-preserving fixes ruff reports so lint
can eventually block in CI (#114):
- UP045: Optional[X] -> X | None in cli.py and the assessments routes,
dropping the now-unused typing.Optional imports
- FURB167: re.S -> re.DOTALL in the dashboard tests
- RUF022: sort __all__ in agents, skills and targets packages
- UP037: unquote the RunRepository.__enter__ return annotation
Only annotations, __all__ order and regex flag names change; there is
no behavior change.
Fixes #165.
* chore(lint): finish #165's safe autofixes (import order, unused noqa, removesuffix)
- ruff check . --fix for I001, RUF100 and FURB188.
- Kept the reasons where an unused noqa was removed (S608, A002); the
nosec B310 comments for bandit stay.
- F401 on sast_dashboard.SKILL_ID is a re-export used by
routes/activities.py, so it keeps the import with a noqa instead of
deleting it.
- tests/fixtures is excluded from ruff: those files are byte-exact inputs
checked by SHA-256, so lint must not rewrite them.
- Left RunRepository.__enter__ to #196, which returns Self there.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: aitechnology <40792067+vsn411@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent 5db1681 commit 6f37e7e
23 files changed
Lines changed: 113 additions & 89 deletions
File tree
- fuzz
- src/secfoo
- agents
- skills
- targets
- web
- routes
- tests
- test_web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
| 136 | + | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
143 | | - | |
| 142 | + | |
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
10 | 10 | | |
11 | 11 | | |
0 commit comments