@@ -51,20 +51,20 @@ def _open_files() -> frozenset[str]:
5151
5252
5353@pytest .fixture (autouse = True )
54- def unclosed_files ():
54+ def unclosed_files () -> Generator [ None ] :
5555 fds = _open_files ()
5656 yield
5757 assert _open_files () == fds
5858
5959
6060@pytest .fixture (autouse = True )
61- def unclosed_threads (request ) :
61+ def unclosed_threads (request : pytest . FixtureRequest ) -> Generator [ None ] :
6262 # TODO(DI-1067): strict mode
6363 yield from thread_leaks .check_test (request , strict = False )
6464
6565
6666@pytest .fixture (autouse = True )
67- def validate_silo_mode ():
67+ def validate_silo_mode () -> Generator [ None ] :
6868 # NOTE! Hybrid cloud uses many mechanisms to simulate multiple different configurations of the application
6969 # during tests. It depends upon `override_settings` using the correct contextmanager behaviors and correct
7070 # thread handling in acceptance tests. If you hit one of these, it's possible either that cleanup logic has
@@ -83,23 +83,23 @@ def validate_silo_mode():
8383
8484
8585@pytest .fixture (autouse = True )
86- def setup_simulate_on_commit (request ) :
86+ def setup_simulate_on_commit (request : pytest . FixtureRequest ) -> Generator [ None ] :
8787 from sentry .testutils .hybrid_cloud import simulate_on_commit
8888
8989 with simulate_on_commit (request ):
9090 yield
9191
9292
9393@pytest .fixture (autouse = True )
94- def setup_enforce_monotonic_transactions (request ) :
94+ def setup_enforce_monotonic_transactions (request : pytest . FixtureRequest ) -> Generator [ None ] :
9595 from sentry .testutils .hybrid_cloud import enforce_no_cross_transaction_interactions
9696
9797 with enforce_no_cross_transaction_interactions ():
9898 yield
9999
100100
101101@pytest .fixture (autouse = True )
102- def audit_hybrid_cloud_writes_and_deletes (request ) :
102+ def audit_hybrid_cloud_writes_and_deletes (request : pytest . FixtureRequest ) -> Generator [ None ] :
103103 """
104104 Ensure that write operations on hybrid cloud foreign keys are recorded
105105 alongside outboxes or use a context manager to indicate that the
@@ -137,13 +137,13 @@ def audit_hybrid_cloud_writes_and_deletes(request):
137137
138138
139139@pytest .fixture (autouse = True )
140- def clear_caches ():
140+ def clear_caches () -> Generator [ None ] :
141141 yield
142142 cache .clear ()
143143
144144
145145@pytest .fixture (autouse = True )
146- def check_leaked_responses_mocks ():
146+ def check_leaked_responses_mocks () -> Generator [ None ] :
147147 yield
148148 leaked = responses .registered ()
149149 if leaked :
0 commit comments