Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 22.12.0
rev: 23.1.0
hooks:
- id: black
args: [--safe]
- repo: https://github.com/asottile/blacken-docs
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:
Expand All @@ -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:
Expand Down
45 changes: 30 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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"
Expand Down
1 change: 0 additions & 1 deletion src/filelock/_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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"))'
Expand All @@ -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 =
Expand Down Expand Up @@ -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 =
Expand Down