diff --git a/pyproject.toml b/pyproject.toml index db4e5501b289..22f662fc3a0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,16 @@ select = [ "E", # pycodestyle Error "F", # Pyflakes "W", # pycodestyle Warning + # Most refurb rules are in preview and can be opinionated, + # consider them individually as they come out of preview (last check: 0.8.4) + "FURB105", # Unnecessary empty string passed to `print` + "FURB129", # Instead of calling `readlines()`, iterate over file object directly + "FURB136", # Replace `if` expression with `{min_max}` call + "FURB167", # Use of regular expression alias `re.{}` + "FURB168", # Prefer `is` operator over `isinstance` to check if an object is `None` + "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}` # PYI: only enable rules that have autofixes and that we always want to fix (even manually), # avoids duplicate # noqa with flake8-pyi and flake8-noqa flagging `PYI` codes # See https://github.com/plinss/flake8-noqa/issues/22 diff --git a/scripts/create_baseline_stubs.py b/scripts/create_baseline_stubs.py index 69f5d2b307e3..46de29b026c7 100755 --- a/scripts/create_baseline_stubs.py +++ b/scripts/create_baseline_stubs.py @@ -218,7 +218,7 @@ def main() -> None: info = get_installed_package_info(project) if info is None: print(f'Error: "{project}" is not installed', file=sys.stderr) - print("", file=sys.stderr) + print(file=sys.stderr) print(f'Suggestion: Run "python3 -m pip install {project}" and try again', file=sys.stderr) sys.exit(1) project, version = info