From b12fa626520aa581e53deca76f622f547cfb3ff0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 20:15:12 -0700 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#3300) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 8 ++++---- docs/conf.py | 2 +- pyproject.toml | 9 ++++----- src/tox/execute/local_sub_process/__init__.py | 2 +- tasks/release.py | 2 +- tox.ini | 4 ++-- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e58b6bbc..ae74fcfa7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.28.5 + rev: 0.28.6 hooks: - id: check-github-workflows args: [ "--verbose" ] @@ -20,17 +20,17 @@ repos: - id: tox-ini-fmt args: ["-p", "fix"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: "2.1.3" + rev: "2.1.4" hooks: - id: pyproject-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.4.10" + rev: "v0.5.0" hooks: - id: ruff-format - id: ruff args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"] - repo: https://github.com/asottile/blacken-docs - rev: 1.16.0 + rev: 1.18.0 hooks: - id: blacken-docs additional_dependencies: [black==24.4.2] diff --git a/docs/conf.py b/docs/conf.py index 0fc66485e..7b551875b 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -98,7 +98,7 @@ def setup(app: Sphinx) -> None: root, exe = here.parent, Path(sys.executable) towncrier = exe.with_name(f"towncrier{exe.suffix}") cmd = [str(towncrier), "build", "--draft", "--version", "NEXT"] - new = check_output(cmd, cwd=root, text=True, stderr=subprocess.DEVNULL) # noqa: S603 + new = check_output(cmd, cwd=root, text=True, stderr=subprocess.DEVNULL) (root / "docs" / "_draft.rst").write_text("" if "No significant changes" in new else new) class PatchedPythonDomain(PythonDomain): diff --git a/pyproject.toml b/pyproject.toml index ca8b08425..21bf402ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,13 +54,11 @@ dependencies = [ "chardet>=5.2", "colorama>=0.4.6", "filelock>=3.15.4", - "importlib-metadata>=7.2; python_version<'3.8'", "packaging>=24.1", "platformdirs>=4.2.2", "pluggy>=1.5", "pyproject-api>=1.7.1", "tomli>=2.0.1; python_version<'3.11'", - "typing-extensions>=4.12.2; python_version<'3.8'", "virtualenv>=20.26.3", ] optional-dependencies.docs = [ @@ -78,7 +76,7 @@ optional-dependencies.testing = [ "covdefaults>=2.3", "detect-test-pollution>=1.2", "devpi-process>=1", - "diff-cover>=9", + "diff-cover>=9.1", "distlib>=0.3.8", "flaky>=3.8.1", "hatch-vcs>=0.4", @@ -89,8 +87,8 @@ optional-dependencies.testing = [ "pytest-mock>=3.14", "pytest-xdist>=3.6.1", "re-assert>=1.1", - "setuptools>=70.1", - "time-machine>=2.14.1; implementation_name!='pypy'", + "setuptools>=70.2", + "time-machine>=2.14.2; implementation_name!='pypy'", "wheel>=0.43", ] urls.Documentation = "https://tox.wiki" @@ -136,6 +134,7 @@ lint.ignore = [ "PLR0917", ## Too many positional arguments "S104", # Possible binding to all interfaces "S404", # Using subprocess is alright. + "S603", # Using subprocess is alright. ] lint.per-file-ignores."tests/**/*.py" = [ "D", # don't care about documentation in tests diff --git a/src/tox/execute/local_sub_process/__init__.py b/src/tox/execute/local_sub_process/__init__.py index 3a1671d5d..c90825d36 100644 --- a/src/tox/execute/local_sub_process/__init__.py +++ b/src/tox/execute/local_sub_process/__init__.py @@ -206,7 +206,7 @@ def __enter__(self) -> ExecuteStatus: stdout, stderr = self.get_stream_file_no("stdout"), self.get_stream_file_no("stderr") try: self.process = process = Popen( - self.cmd, # noqa: S603 + self.cmd, stdout=next(stdout), stderr=next(stderr), stdin={StdinSource.USER: None, StdinSource.OFF: DEVNULL, StdinSource.API: PIPE}[self.request.stdin], diff --git a/tasks/release.py b/tasks/release.py index b8283a7db..931e7d233 100644 --- a/tasks/release.py +++ b/tasks/release.py @@ -57,7 +57,7 @@ def get_upstream(repo: Repo) -> Remote: def release_changelog(repo: Repo, version: Version) -> Commit: print("generate release commit") # noqa: T201 - check_call(["towncrier", "build", "--yes", "--version", version.public], cwd=str(ROOT_SRC_DIR)) # noqa: S607, S603 + check_call(["towncrier", "build", "--yes", "--version", version.public], cwd=str(ROOT_SRC_DIR)) # noqa: S607 return repo.index.commit(f"release {version}") diff --git a/tox.ini b/tox.ini index a654b0c6c..3e1ce61ee 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,7 @@ commands = [testenv:type] description = run type check on code base deps = - mypy==1.10 + mypy==1.10.1 types-cachetools>=5.3.0.7 types-chardet>=5.0.4.6 commands = @@ -73,7 +73,7 @@ skip_install = true deps = build[virtualenv]>=1.2.1 check-wheel-contents>=0.6 - twine>=5.1 + twine>=5.1.1 commands = python -m build -o {envtmpdir} -s -w . twine check {envtmpdir}{/}*