@@ -152,6 +152,7 @@ select = [
152
152
" F" , # pyflakes
153
153
" I" , # isort
154
154
" PIE" , # flake8-pie
155
+ " PTH" , # flake8-pathlib
155
156
" PYI" , # flake8-pyi
156
157
" UP" , # pyupgrade
157
158
" RUF" , # ruff
@@ -171,6 +172,21 @@ ignore = [
171
172
" D205" , # 1 blank line required between summary line and description
172
173
" D400" , # First line should end with a period
173
174
" D401" , # First line of docstring should be in imperative mood
175
+ " PTH100" , # `os.path.abspath()` should be replaced by `Path.resolve()`
176
+ " PTH103" , # `os.makedirs()` should be replaced by `Path.mkdir(parents=True)`
177
+ " PTH107" , # `os.remove()` should be replaced by `Path.unlink()`
178
+ " PTH108" , # `os.unlink()` should be replaced by `Path.unlink()`
179
+ " PTH109" , # `os.getcwd()` should be replaced by `Path.cwd()`
180
+ " PTH110" , # `os.path.exists()` should be replaced by `Path.exists()`
181
+ " PTH111" , # `os.path.expanduser()` should be replaced by `Path.expanduser()`
182
+ " PTH112" , # `os.path.isdir()` should be replaced by `Path.is_dir()`
183
+ " PTH113" , # `os.path.isfile()` should be replaced by `Path.is_file()`
184
+ " PTH118" , # `os.path.join()` should be replaced by `Path` with `/` operator
185
+ " PTH119" , # `os.path.basename()` should be replaced by `Path.name`
186
+ " PTH120" , # `os.path.dirname()` should be replaced by `Path.parent`
187
+ " PTH122" , # `os.path.splitext()` should be replaced by `Path.suffix`, `Path.stem`, and `Path.parent`
188
+ " PTH123" , # `open()` should be replaced by `Path.open()`
189
+ " PTH207" , # Replace `glob` with `Path.glob` or `Path.rglob`
174
190
" RUF012" , # mutable default values in class attributes
175
191
]
176
192
0 commit comments