File tree Expand file tree Collapse file tree 6 files changed +23
-23
lines changed
Expand file tree Collapse file tree 6 files changed +23
-23
lines changed Original file line number Diff line number Diff line change 1616 - id : check-yaml
1717
1818- repo : https://github.com/astral-sh/ruff-pre-commit
19- rev : v0.8.6
19+ rev : v0.9.8
2020 hooks :
2121 - id : ruff
2222 args : [--fix, --exit-non-zero-on-fix, --show-fixes]
3131
3232# Type checking
3333- repo : https://github.com/pre-commit/mirrors-mypy
34- rev : v1.14.1
34+ rev : v1.15.0
3535 hooks :
3636 - id : mypy
3737 files : ' src/.*\.py$'
Original file line number Diff line number Diff line change @@ -109,9 +109,9 @@ def __getitem__(self, key):
109109 self ._transport_factory = workflows .transport .lookup (transport )
110110 else :
111111 self ._transport_factory = transport
112- assert hasattr (
113- self . _transport_factory , "__call__ "
114- ), "No valid transport factory given"
112+ assert hasattr (self . _transport_factory , "__call__" ), (
113+ "No valid transport factory given "
114+ )
115115 self ._transport = self ._transport_factory ()
116116 assert self ._transport .connect (), "Could not connect to transport layer"
117117
Original file line number Diff line number Diff line change @@ -999,9 +999,9 @@ def subscribe_temporary(
999999 def _declare_subscribe_queue_in_thread ():
10001000 try :
10011001 if result .set_running_or_notify_cancel ():
1002- assert (
1003- subscription_id not in self ._subscriptions
1004- ), f"Subscription request { subscription_id } rejected due to existing subscription { self . _subscriptions [ subscription_id ] } "
1002+ assert subscription_id not in self . _subscriptions , (
1003+ f"Subscription request { subscription_id } rejected due to existing subscription { self ._subscriptions [ subscription_id ] } "
1004+ )
10051005 temporary_queue_name = (
10061006 self ._get_shared_channel ()
10071007 .queue_declare (
@@ -1543,9 +1543,9 @@ def _add_subscription_in_thread(
15431543 """
15441544 try :
15451545 if result .set_running_or_notify_cancel ():
1546- assert (
1547- subscription_id not in self ._subscriptions
1548- ), f"Subscription request { subscription_id } rejected due to existing subscription { self . _subscriptions [ subscription_id ] } "
1546+ assert subscription_id not in self . _subscriptions , (
1547+ f"Subscription request { subscription_id } rejected due to existing subscription { self ._subscriptions [ subscription_id ] } "
1548+ )
15491549 self ._add_subscription (subscription_id , subscription )
15501550 result .set_result (self ._subscriptions [subscription_id ].queue )
15511551 except BaseException as e :
Original file line number Diff line number Diff line change @@ -306,13 +306,13 @@ def test_replacing_parameters_in_recipe_with_datastructures():
306306 A .apply_parameters (replacements )
307307
308308 assert A .recipe [2 ]["list" ] == replacements ["some-list" ]
309- assert (
310- A . recipe [ 2 ][ " list" ] is not replacements [ "some-list" ]
311- ), "same list returned, not copied"
309+ assert A . recipe [ 2 ][ "list" ] is not replacements [ "some-list" ], (
310+ "same list returned, not copied"
311+ )
312312 assert A .recipe [2 ]["dictionary" ] == replacements ["nested" ]
313- assert (
314- A . recipe [ 2 ][ " dictionary" ] is not replacements [ "nested" ]
315- ), "same dictionary returned, not copied"
313+ assert A . recipe [ 2 ][ "dictionary" ] is not replacements [ "nested" ], (
314+ "same dictionary returned, not copied"
315+ )
316316 assert (
317317 A .recipe [2 ]["dictionary" ]["some-dictionary" ]
318318 is not replacements ["nested" ]["some-dictionary" ]
Original file line number Diff line number Diff line change @@ -1309,9 +1309,9 @@ def test_full_stack_temporary_queue_roundtrip(pikatransport):
13091309
13101310 def assert_not_seen_before (ts : TemporarySubscription ):
13111311 assert ts .subscription_id , "Temporary subscription is missing an ID"
1312- assert (
1313- ts . subscription_id not in known_subscriptions
1314- ), "Duplicate subscription ID"
1312+ assert ts . subscription_id not in known_subscriptions , (
1313+ "Duplicate subscription ID"
1314+ )
13151315 assert ts .queue_name , "Temporary queue does not have a name"
13161316 assert ts .queue_name not in known_queues , "Duplicate temporary queue name"
13171317 known_subscriptions .add (ts .subscription_id )
Original file line number Diff line number Diff line change @@ -600,9 +600,9 @@ def test_subscribe_to_temporary_queue(mockstomp):
600600
601601 def assert_not_seen_before (ts : TemporarySubscription ):
602602 assert ts .subscription_id , "Temporary subscription is missing an ID"
603- assert (
604- ts . subscription_id not in known_subscriptions
605- ), "Duplicate subscription ID"
603+ assert ts . subscription_id not in known_subscriptions , (
604+ "Duplicate subscription ID"
605+ )
606606 assert ts .queue_name , "Temporary queue does not have a name"
607607 assert ts .queue_name not in known_queues , "Duplicate temporary queue name"
608608 known_subscriptions .add (ts .subscription_id )
You can’t perform that action at this time.
0 commit comments