From e71f42acf17a5ff29b4dbd1d28b7105d8ab88772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 5 Feb 2023 13:03:54 -0800 Subject: [PATCH] Bump deps and tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Committed via https://github.com/asottile/all-repos Signed-off-by: Bernát Gábor --- .pre-commit-config.yaml | 10 ++++----- pyproject.toml | 45 +++++++++++++++++++++++++++-------------- src/filelock/_api.py | 1 - tox.ini | 8 ++++---- 4 files changed, 39 insertions(+), 25 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fa10805..cfbdd7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: hooks: - id: isort - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black args: [--safe] @@ -34,7 +34,7 @@ repos: rev: 1.13.0 hooks: - id: blacken-docs - additional_dependencies: [black==22.12] + additional_dependencies: [black==23.1] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: @@ -49,16 +49,16 @@ repos: hooks: - id: flake8 additional_dependencies: - - flake8-bugbear==22.12.6 + - flake8-bugbear==23.1.20 - flake8-comprehensions==3.10.1 - flake8-pytest-style==1.6 - flake8-spellcheck==0.28 - - flake8-unused-arguments==0.0.12 + - flake8-unused-arguments==0.0.13 - flake8-noqa==1.3 - pep8-naming==0.13.3 - flake8-pyproject==1.2.2 - repo: https://github.com/pre-commit/mirrors-prettier - rev: "v3.0.0-alpha.4" + rev: "v2.7.1" hooks: - id: prettier additional_dependencies: diff --git a/pyproject.toml b/pyproject.toml index c0baeef..f3421b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,27 +1,24 @@ [build-system] build-backend = "hatchling.build" -requires = ["hatchling>=1.11.1", "hatch-vcs>=0.3"] +requires = [ + "hatch-vcs>=0.3", + "hatchling>=1.12.2", +] [project] name = "filelock" description = "A platform independent file lock." readme = "README.md" +keywords = [ + "application", + "cache", + "directory", + "log", + "user", +] license = "Unlicense" maintainers = [{ name = "Bernát Gábor", email = "gaborjbernat@gmail.com" }] -urls.Documentation = "https://py-filelock.readthedocs.io" -urls.Homepage = "https://github.com/tox-dev/py-filelock" -urls.Source = "https://github.com/tox-dev/py-filelock" -urls.Tracker = "https://github.com/tox-dev/py-filelock/issues" requires-python = ">=3.7" -optional-dependencies.testing = [ - "covdefaults>=2.2.2", - "coverage>=7.0.1", - "pytest>=7.2", - "pytest-cov>=4", - "pytest-timeout>=2.1", -] -optional-dependencies.docs = ["furo>=2022.12.7", "sphinx>=5.3", "sphinx-autodoc-typehints>=1.19.5"] -keywords = ["application", "cache", "directory", "log", "user"] classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -34,7 +31,25 @@ classifiers = [ "Topic :: Software Development :: Libraries", "Topic :: System", ] -dynamic = ["version"] +dynamic = [ + "version", +] +optional-dependencies.docs = [ + "furo>=2022.12.7", + "sphinx>=6.1.3", + "sphinx-autodoc-typehints!=1.23.4,>=1.22", +] +optional-dependencies.testing = [ + "covdefaults>=2.2.2", + "coverage>=7.1", + "pytest>=7.2.1", + "pytest-cov>=4", + "pytest-timeout>=2.1", +] +urls.Documentation = "https://py-filelock.readthedocs.io" +urls.Homepage = "https://github.com/tox-dev/py-filelock" +urls.Source = "https://github.com/tox-dev/py-filelock" +urls.Tracker = "https://github.com/tox-dev/py-filelock/issues" [tool.hatch] build.hooks.vcs.version-file = "src/filelock/version.py" diff --git a/src/filelock/_api.py b/src/filelock/_api.py index 273b82e..1f04662 100644 --- a/src/filelock/_api.py +++ b/src/filelock/_api.py @@ -199,7 +199,6 @@ def release(self, force: bool = False) -> None: :param force: If true, the lock counter is ignored and the lock is released in every case/ """ with self._thread_lock: - if self.is_locked: self._lock_counter -= 1 diff --git a/tox.ini b/tox.ini index 1b0dc05..7ffc456 100644 --- a/tox.ini +++ b/tox.ini @@ -39,7 +39,7 @@ passenv = basepython = python3.10 skip_install = true deps = - pre-commit>=2.21 + pre-commit>=3.0.4 commands = pre-commit run --all-files --show-diff-on-failure python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))' @@ -63,8 +63,8 @@ setenv = skip_install = true deps = covdefaults>=2.2.2 - coverage[toml]>=7.0.1 - diff-cover>=7.3 + coverage[toml]>=7.1 + diff-cover>=7.4 extras = parallel_show_output = true commands = @@ -93,7 +93,7 @@ commands = description = check that the long description is valid (need for PyPI) skip_install = true deps = - build[virtualenv]>=0.9 + build[virtualenv]>=0.10 twine>=4.0.2 extras = commands =