Commit 2c30f5c
committed
chore(ruff): Manual fixes (27 errors)
scripts/generate_gitlab.py:45:8: PTH113 `os.path.isfile()` should be replaced by `Path.is_file()`
scripts/generate_gitlab.py:60:19: SIM115 Use context handler for opening files
scripts/generate_gitlab.py:60:19: PTH123 `open()` should be replaced by `Path.open()`
scripts/generate_gitlab.py:75:15: PTH109 `os.getcwd()` should be replaced by `Path.cwd()`
scripts/generate_gitlab.py:93:15: TRY002 Create your own exception
scripts/generate_gitlab.py:93:15: TRY003 Avoid specifying long messages outside the exception class
src/vcspull/_internal/config_reader.py:105:19: SIM115 Use context handler for opening files
src/vcspull/_internal/config_reader.py:105:19: PTH123 `open()` should be replaced by `Path.open()`
src/vcspull/cli/sync.py:95:9: PERF203 `try`-`except` within a loop incurs performance overhead
src/vcspull/cli/sync.py:107:21: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling
src/vcspull/cli/sync.py:107:21: TRY200 Use `raise from` to specify exception cause
src/vcspull/cli/sync.py:147:19: TRY002 Create your own exception
src/vcspull/cli/sync.py:147:19: TRY003 Avoid specifying long messages outside the exception class
src/vcspull/config.py:31:45: B008 Do not perform function call `pathlib.Path.cwd` in argument defaults
src/vcspull/config.py:47:25: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/config.py:55:50: B008 Do not perform function call `pathlib.Path.cwd` in argument defaults
src/vcspull/config.py:145:32: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/config.py:147:32: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/config.py:214:29: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/config.py:230:52: B008 Do not perform function call `pathlib.Path.cwd` in argument defaults
src/vcspull/config.py:336:13: PERF401 Use a list comprehension to create a transformed list
src/vcspull/util.py:12:21: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/util.py:34:22: PTH118 `os.path.join()` should be replaced by `Path` with `/` operator
src/vcspull/util.py:41:16: PTH111 `os.path.expanduser()` should be replaced by `Path.expanduser()`
src/vcspull/util.py:42:12: PTH112 `os.path.isdir()` should be replaced by `Path.is_dir()`
tests/test_config_file.py:96:13: PERF401 Use a list comprehension to create a transformed list
tests/test_config_file.py:393:10: B017 `pytest.raises(Exception)` should be considered evil
Found 27 errors.1 parent 9628ac6 commit 2c30f5c
File tree
6 files changed
+59
-45
lines changed- scripts
- src/vcspull
- _internal
- cli
- tests
6 files changed
+59
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | | - | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | | - | |
| 46 | + | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | 65 | | |
65 | 66 | | |
| |||
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
75 | | - | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
| 79 | + | |
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| |||
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | | - | |
| 95 | + | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
96 | | - | |
| 95 | + | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
108 | 107 | | |
109 | 108 | | |
110 | 109 | | |
| |||
144 | 143 | | |
145 | 144 | | |
146 | 145 | | |
147 | | - | |
148 | | - | |
149 | | - | |
| 146 | + | |
150 | 147 | | |
151 | 148 | | |
152 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
53 | 57 | | |
54 | 58 | | |
55 | | - | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
| |||
135 | 143 | | |
136 | 144 | | |
137 | 145 | | |
138 | | - | |
| 146 | + | |
139 | 147 | | |
140 | 148 | | |
141 | 149 | | |
142 | 150 | | |
143 | 151 | | |
144 | 152 | | |
145 | | - | |
| 153 | + | |
146 | 154 | | |
147 | | - | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
167 | 175 | | |
168 | 176 | | |
169 | 177 | | |
170 | | - | |
171 | | - | |
| 178 | + | |
| 179 | + | |
172 | 180 | | |
173 | 181 | | |
174 | 182 | | |
| |||
211 | 219 | | |
212 | 220 | | |
213 | 221 | | |
214 | | - | |
| 222 | + | |
215 | 223 | | |
216 | 224 | | |
217 | 225 | | |
| |||
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
230 | | - | |
| 238 | + | |
| 239 | + | |
231 | 240 | | |
232 | 241 | | |
233 | 242 | | |
| |||
248 | 257 | | |
249 | 258 | | |
250 | 259 | | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
251 | 263 | | |
252 | 264 | | |
253 | 265 | | |
| |||
329 | 341 | | |
330 | 342 | | |
331 | 343 | | |
332 | | - | |
333 | 344 | | |
334 | | - | |
335 | | - | |
336 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
337 | 350 | | |
338 | 351 | | |
339 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
97 | 99 | | |
98 | 100 | | |
99 | 101 | | |
| |||
390 | 392 | | |
391 | 393 | | |
392 | 394 | | |
393 | | - | |
| 395 | + | |
394 | 396 | | |
0 commit comments