Skip to content

Commit 020407e

Browse files
ref: black 24.x manual forward compatibility (#78713)
fixes flake8 errors when reformatted by black 24.x `: ...` generally means "stubbed out" and is intended for typing overloads -- for real classes `: pass` makes more sense. pycodestyle and black disagree on the formatting for "stubbed classes" (pycodestyle has a specialization for stubbed functions but not classes) <!-- Describe your PR here. -->
1 parent 091c6bb commit 020407e

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/sentry/models/files/abstractfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ def read(self, n=-1):
204204
# Django doesn't permit models to have parent classes that are Generic
205205
# this kludge lets satisfy both mypy and django
206206
class _Parent(Generic[BlobIndexType, BlobType]):
207-
...
207+
pass
208208

209209
else:
210210

src/sentry/models/files/abstractfileblob.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# Django doesn't permit models to have parent classes that are Generic
3232
# this kludge lets satisfy both mypy and django
3333
class _Parent(Generic[BlobOwnerType]):
34-
...
34+
pass
3535

3636
else:
3737

src/sentry/replays/consumers/recording_buffered.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def cast_payload_from_bytes(x: bytes) -> Any:
101101

102102

103103
class BufferCommitFailed(Exception):
104-
...
104+
pass
105105

106106

107107
class RecordingBufferedStrategyFactory(ProcessingStrategyFactory[KafkaPayload]):

src/sentry/replays/lib/http.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55

66
class MalformedRangeHeader(Exception):
7-
...
7+
pass
88

99

1010
class UnsatisfiableRange(Exception):
11-
...
11+
pass
1212

1313

1414
class RangeProtocol(Protocol):

src/sentry/snuba/metrics/mqb_query_transformer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
class MQBQueryTransformationException(Exception):
25-
...
25+
pass
2626

2727

2828
def _get_derived_op_metric_field_from_snuba_function(function: Function):

src/sentry/snuba/metrics/utils.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -431,27 +431,27 @@ def combine_dictionary_of_list_values(main_dict, other_dict):
431431

432432

433433
class MetricDoesNotExistException(Exception):
434-
...
434+
pass
435435

436436

437437
class MetricDoesNotExistInIndexer(Exception):
438-
...
438+
pass
439439

440440

441441
class DerivedMetricException(Exception, ABC):
442-
...
442+
pass
443443

444444

445445
class DerivedMetricParseException(DerivedMetricException):
446-
...
446+
pass
447447

448448

449449
class NotSupportedOverCompositeEntityException(DerivedMetricException):
450-
...
450+
pass
451451

452452

453453
class OrderByNotSupportedOverCompositeEntityException(NotSupportedOverCompositeEntityException):
454-
...
454+
pass
455455

456456

457457
@overload

tests/sentry/models/test_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def test_long_email(self):
578578

579579
@apply_feature_flag_on_cls("organizations:set-commits-updated")
580580
class SetCommitsTestUpdated(SetCommitsTestCase):
581-
...
581+
pass
582582

583583

584584
class SetRefsTest(SetRefsTestCase):

tests/sentry/tasks/test_commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def test_fetch_error_random_exception_integration(self):
291291

292292
@apply_feature_flag_on_cls("organizations:set-commits-updated")
293293
class FetchCommitsTestUpdated(FetchCommitsTest):
294-
...
294+
pass
295295

296296

297297
@control_silo_test

0 commit comments

Comments
 (0)