diff --git a/Pipfile b/Pipfile index 5a33f109..3e510142 100644 --- a/Pipfile +++ b/Pipfile @@ -11,7 +11,7 @@ pytest = "==8.0.0" pytest-benchmark = "==4" pytest-cov = "==4.1.0" mypy = "==1.8.0" -black = {version = "==23.12.1", markers="python_version >= '3.8'"} +black = {version = "==24.1.1", markers="python_version >= '3.8'"} tbump = "==6.11.0" sphinx = {version = "==7.2.6", markers="python_version >= '3.9'"} ruff = "==0.1.14" diff --git a/benchmarks/__init__.py b/benchmarks/__init__.py index 99a8d361..81fe5ccb 100644 --- a/benchmarks/__init__.py +++ b/benchmarks/__init__.py @@ -1,6 +1,5 @@ """MatchBoxes benchamr tests.""" - from collections import namedtuple Chair = namedtuple( diff --git a/benchmarks/test_matchbox_add.py b/benchmarks/test_matchbox_add.py index 285935bb..9df5f2c0 100644 --- a/benchmarks/test_matchbox_add.py +++ b/benchmarks/test_matchbox_add.py @@ -1,4 +1,5 @@ """Reference performance tests - adding entities to MatchBox.""" + from collections import namedtuple from typing import Any, Set, Tuple diff --git a/benchmarks/test_matchbox_match.py b/benchmarks/test_matchbox_match.py index 755650f3..1712b413 100644 --- a/benchmarks/test_matchbox_match.py +++ b/benchmarks/test_matchbox_match.py @@ -1,4 +1,5 @@ """Benchmark tests comparing different approaches to same problem - finiding fitting element.""" + from random import Random from typing import List, Optional, Set, Union diff --git a/docs/source/conf.py b/docs/source/conf.py index adbaea8f..93bccab2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -1,4 +1,5 @@ """Documentation configuration.""" + import os import pathlib import sys diff --git a/newsfragments/534.misc.rst b/newsfragments/534.misc.rst new file mode 100644 index 00000000..96d5129b --- /dev/null +++ b/newsfragments/534.misc.rst @@ -0,0 +1 @@ +Update code formatting with black 24.1 \ No newline at end of file diff --git a/tests/test_base.py b/tests/test_base.py index 1a9583c6..2a214d52 100644 --- a/tests/test_base.py +++ b/tests/test_base.py @@ -1,4 +1,5 @@ """Tests for basic functionality of MatchBox and basic data structure.""" + from collections import defaultdict from typing import Any, List, Union diff --git a/tests/test_match.py b/tests/test_match.py index 42d1e4a9..4868375c 100644 --- a/tests/test_match.py +++ b/tests/test_match.py @@ -1,4 +1,5 @@ """Tests for match method.""" + from typing import Any, List, Union import pytest diff --git a/tests/test_match_complex.py b/tests/test_match_complex.py index fe89b360..c18ee9c2 100644 --- a/tests/test_match_complex.py +++ b/tests/test_match_complex.py @@ -1,4 +1,5 @@ """Tests for complex examples of MatchBox.""" + from matchbox.box import MatchBox from tests import Entity