From 18ccbb4814a29cc0978e17951ad84e7964b0ebbd Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Mon, 30 Sep 2024 12:08:00 +0500 Subject: [PATCH] Bump tool versions. --- .pre-commit-config.yaml | 4 ++-- itemloaders/__init__.py | 4 ++-- tox.ini | 15 +++++++++++---- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e631fe..b0f0ff5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: black language_version: python3 repo: https://github.com/ambv/black - rev: 24.4.0 + rev: 24.8.0 - hooks: - id: isort language_version: python3 @@ -21,4 +21,4 @@ repos: - flake8-docstrings - flake8-string-format repo: https://github.com/pycqa/flake8 - rev: 7.0.0 + rev: 7.1.1 diff --git a/itemloaders/__init__.py b/itemloaders/__init__.py index d90d5f4..5f037a7 100644 --- a/itemloaders/__init__.py +++ b/itemloaders/__init__.py @@ -219,7 +219,7 @@ def add_value( """ value = self.get_value(value, *processors, re=re, **kw) if value is None: - return + return self if not field_name: for k, v in value.items(): self._add_value(k, v) @@ -244,7 +244,7 @@ def replace_value( """ value = self.get_value(value, *processors, re=re, **kw) if value is None: - return + return self if not field_name: for k, v in value.items(): self._replace_value(k, v) diff --git a/tox.ini b/tox.ini index ee32ddb..09de7a1 100644 --- a/tox.ini +++ b/tox.ini @@ -40,8 +40,8 @@ commands = [testenv:twinecheck] basepython = python3 deps = - twine==5.0.0 - build==1.2.1 + twine==5.1.1 + build==1.2.2 commands = python -m build --sdist twine check dist/* @@ -49,8 +49,15 @@ commands = [testenv:typing] basepython = python3 deps = - mypy==1.10.0 - types-attrs==19.1.0 + mypy==1.11.2 + attrs>=18.2.0 types-jmespath==1.0.2.20240106 commands = mypy --strict --ignore-missing-imports --implicit-reexport {posargs:itemloaders tests} + +[testenv:pre-commit] +basepython = python3 +deps = + pre-commit +commands = + pre-commit run {posargs:--all-files}