mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-24 09:48:39 +08:00
Enable Ruff flake8-use-pathlib (PTH) (autofix only) (#13750)
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import Final
|
||||
# installed into the user's virtual env, so we can't determine the path
|
||||
# to typeshed. Installing ts_utils editable would solve that, see
|
||||
# https://github.com/python/typeshed/pull/12806.
|
||||
TS_BASE_PATH: Final = Path("")
|
||||
TS_BASE_PATH: Final = Path()
|
||||
STDLIB_PATH: Final = TS_BASE_PATH / "stdlib"
|
||||
STUBS_PATH: Final = TS_BASE_PATH / "stubs"
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ select = [
|
||||
"FURB169", # Compare the identities of `{object}` and None instead of their respective types
|
||||
"FURB177", # Prefer `Path.cwd()` over `Path().resolve()` for current-directory lookups
|
||||
"FURB187", # Use of assignment of `reversed` on list `{name}`
|
||||
# Autofixable flake8-use-pathlib only
|
||||
"PTH201", # Do not pass the current directory explicitly to `Path`
|
||||
"PTH210", # Invalid suffix passed to `.with_suffix()`
|
||||
# PYI: only enable rules that have autofixes and that we always want to fix (even manually),
|
||||
# avoids duplicate # noqa with flake8-pyi
|
||||
"PYI009", # Empty body should contain `...`, not pass
|
||||
|
||||
Reference in New Issue
Block a user