diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e27ea8a..6e3d155 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.1.0 + rev: 26.3.1 hooks: - id: black @@ -15,6 +15,6 @@ repos: - id: check-json - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.12 + rev: v0.15.10 hooks: - id: ruff diff --git a/install-poetry.py b/install-poetry.py index f222f0c..29ad14c 100644 --- a/install-poetry.py +++ b/install-poetry.py @@ -23,8 +23,8 @@ For full documentation, visit https://python-poetry.org/docs/#installation. """ -import sys +import sys # Eager version check so we fail nicely before possible syntax errors if sys.version_info < (3, 6): # noqa: UP036 @@ -50,7 +50,6 @@ from urllib.request import Request from urllib.request import urlopen - SHELL = os.getenv("SHELL", "") WINDOWS = sys.platform.startswith("win") or (sys.platform == "cli" and os.name == "nt") MINGW = sysconfig.get_platform().startswith("mingw") @@ -535,7 +534,7 @@ def run(self) -> int: version = self._path else: try: - version, current_version = self.get_version() + version, _current_version = self.get_version() except ValueError: return 1 diff --git a/pyproject.toml b/pyproject.toml index 6abfcb9..0cafec0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,12 @@ [tool.ruff] fix = true +line-length = 88 +target-version = "py37" + +[tool.ruff.lint] unfixable = [ "ERA", # do not autoremove commented out code ] -target-version = "py37" -line-length = 88 extend-select = [ "B", # flake8-bugbear "C4", # flake8-comprehensions @@ -20,10 +22,9 @@ extend-select = [ "UP", # pyupgrade ] -[tool.ruff.flake8-tidy-imports] +[tool.ruff.lint.flake8-tidy-imports] ban-relative-imports = "all" -[tool.ruff.isort] +[tool.ruff.lint.isort] force-single-line = true lines-between-types = 1 -lines-after-imports = 2