Repository: metricq/metricq-python (language: python)

Issue:
black/ci is broken
new major version 23 is incompatible.


Discussion / hints:

Fix patch:
diff --git a/examples/metricq_drain.py b/examples/metricq_drain.py
index bfe76f6d..dc1d8979 100755
--- a/examples/metricq_drain.py
+++ b/examples/metricq_drain.py
@@ -39,7 +39,6 @@ async def client() -> None:
         metrics=["dummy.source"],
         expires=3600,
     ) as subscription:
-
         await asyncio.sleep(10)
 
         counter = 0
diff --git a/setup.cfg b/setup.cfg
index 4b4544a8..b05fcf87 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -42,7 +42,7 @@ tools =
     numpy
     termplotlib
 lint =
-    black
+    black ~= 23.1.0
     flake8
     isort ~= 5.0
     check-manifest


Test patch:
diff --git a/tests/test_interval_source.py b/tests/test_interval_source.py
index 621ca0b0..e6d39857 100644
--- a/tests/test_interval_source.py
+++ b/tests/test_interval_source.py
@@ -19,7 +19,6 @@ async def update(self) -> None:
 
 @pytest.fixture
 def interval_source() -> Generator[IntervalSource, None, None]:
-
     with patch("metricq.interval_source.IntervalSource.rpc"):
         source = _TestIntervalSource(
             token="source-interval-test", management_url="amqps://test.invalid"
diff --git a/tests/test_source.py b/tests/test_source.py
index 96cb0c0a..871e08bf 100644
--- a/tests/test_source.py
+++ b/tests/test_source.py
@@ -17,7 +17,6 @@ async def task(self) -> None:
 
 @pytest.fixture
 def source() -> Generator[Source, None, None]:
-
     with patch("metricq.source.Source.rpc"):
         source = _TestSource(token="source-test", management_url="amqps://test.invalid")
         yield source
diff --git a/tests/test_types.py b/tests/test_types.py
index de004ce7..93f6ae3c 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -66,7 +66,6 @@ def test_timedelta_to_string(
     time_delta_1h: Timedelta,
     time_delta_1d: Timedelta,
 ) -> None:
-
     assert time_delta_random.precise_string == "8295638928ns"
     assert time_delta_1us.precise_string == "1μs"
     assert time_delta_1ms.precise_string == "1ms"