Skip to content

Commit a74be6e

Browse files
committed
remove stuff from old pr
1 parent 5fc38a6 commit a74be6e

File tree

5 files changed

+9
-88
lines changed

5 files changed

+9
-88
lines changed

pyproject.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ warn_unused_ignores = true
6666
warn_redundant_casts = true
6767
enable_error_code = ["ignore-without-code"]
6868

69-
7069
[tool.django-stubs]
7170
django_settings_module = "sentry.conf.server_mypy"
7271

@@ -258,7 +257,6 @@ module = [
258257
"sentry.auth.providers.saml2.views",
259258
"sentry.auth.system",
260259
"sentry.auth.view",
261-
"sentry.buffer.redis",
262260
"sentry.db.mixin",
263261
"sentry.db.models.manager.base",
264262
"sentry.db.models.paranoia",
@@ -407,7 +405,6 @@ module = [
407405
"sentry.plugins.providers.repository",
408406
"sentry.profiles.task",
409407
"sentry.profiles.utils",
410-
"sentry.quotas.redis",
411408
"sentry.receivers.releases",
412409
"sentry.receivers.sentry_apps",
413410
"sentry.release_health.metrics_sessions_v2",
@@ -589,14 +586,10 @@ module = [
589586
"tests.sentry.ingest.test_slicing",
590587
"tests.sentry.integrations.github.test_client",
591588
"tests.sentry.integrations.slack.test_requests",
592-
"tests.sentry.issues.endpoints.test_group_events",
593-
"tests.sentry.issues.endpoints.test_organization_group_index",
594589
"tests.sentry.issues.test_utils",
595590
"tests.sentry.models.test_organizationmember",
596591
"tests.sentry.replays.test_project_replay_recording_segment_index",
597-
"tests.sentry.tasks.test_daily_summary",
598592
"tests.sentry.tasks.test_post_process",
599-
"tools.mypy_helpers.make_module_ignores",
600593
]
601594
disable_error_code = [
602595
"arg-type",
@@ -611,7 +604,6 @@ disable_error_code = [
611604
"misc",
612605
"operator",
613606
"override",
614-
"possibly-undefined",
615607
"return-value",
616608
"typeddict-item",
617609
"typeddict-unknown-key",

src/sentry/issues/grouptype.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def add(self, group_type: type[GroupType]) -> None:
4949
raise ValueError(
5050
f"A group type with the type_id {group_type.type_id} has already been registered."
5151
)
52-
5352
self._registry[group_type.type_id] = group_type
5453
self._slug_lookup[group_type.slug] = group_type
5554
self._category_lookup[group_type.category].add(group_type.type_id)

src/sentry/issues/ingest.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ def materialize_metadata(occurrence: IssueOccurrence, event: Event) -> Occurrenc
137137
event_metadata["title"] = occurrence.issue_title
138138
event_metadata["value"] = occurrence.subtitle
139139
event_metadata["initial_priority"] = occurrence.initial_issue_priority
140+
140141
if occurrence.type == FeedbackGroup:
141142
# TODO: Should feedbacks be their own event type, so above call to event.get_event_medata
142143
# could populate this instead?
@@ -198,14 +199,14 @@ def save_issue_from_occurrence(
198199
metrics.incr("issues.issue.dropped.rate_limiting")
199200
return None
200201

201-
with (
202-
sentry_sdk.start_span(op="issues.save_issue_from_occurrence.transaction") as span,
203-
metrics.timer(
204-
"issues.save_issue_from_occurrence.transaction",
205-
tags={"platform": event.platform or "unknown", "type": occurrence.type.type_id},
206-
sample_rate=1.0,
207-
) as metric_tags,
208-
transaction.atomic(router.db_for_write(GroupHash)),
202+
with sentry_sdk.start_span(
203+
op="issues.save_issue_from_occurrence.transaction"
204+
) as span, metrics.timer(
205+
"issues.save_issue_from_occurrence.transaction",
206+
tags={"platform": event.platform or "unknown", "type": occurrence.type.type_id},
207+
sample_rate=1.0,
208+
) as metric_tags, transaction.atomic(
209+
router.db_for_write(GroupHash)
209210
):
210211
group, is_new = _save_grouphash_and_group(
211212
project, event, new_grouphash, **cast(Mapping[str, Any], issue_kwargs)

tools/mypy_helpers/make_module_ignores.py

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -57,51 +57,6 @@ def main() -> int:
5757
with open("pyproject.toml", "w") as f:
5858
f.write(before + begin + generated + end + rest)
5959

60-
# # begin possibly_undefined fixer
61-
shutil.rmtree(".mypy_cache", ignore_errors=True)
62-
63-
codes = set()
64-
filenames = set()
65-
out = subprocess.run(
66-
(
67-
sys.executable,
68-
"-m",
69-
"tools.mypy_helpers.mypy_without_ignore_possibly_undefined",
70-
*sys.argv[1:],
71-
),
72-
capture_output=True,
73-
)
74-
for line in out.stdout.decode().splitlines():
75-
filename, _, _ = line.partition(":")
76-
if filename.endswith(".py"):
77-
filenames.add(filename)
78-
if match is not None:
79-
codes.add(match[1])
80-
81-
os.makedirs(".artifacts", exist_ok=True)
82-
with open(".artifacts/mypy-all", "wb") as f:
83-
f.write(out.stdout)
84-
85-
mods = []
86-
for filename in sorted(filenames):
87-
# TODO: removeprefix / removesuffix python 3.9+
88-
if filename.endswith(".py"):
89-
filename = filename[: -len(".py")]
90-
if filename.startswith("src/"):
91-
filename = filename[len("src/") :]
92-
if filename.endswith("/__init__"):
93-
filename = filename[: -len("/__init__")]
94-
mods.append(filename.replace("/", "."))
95-
mods_s = "".join(f' "{mod}",\n' for mod in mods)
96-
generated = f"[[tool.mypy.overrides]]\n" f"module = [\n{mods_s}]\n"
97-
with open("pyproject.toml") as f:
98-
src = f.read()
99-
msg = "sentry modules with possibly undefined variables"
100-
before, begin, rest = src.partition(f"# begin: {msg}\n")
101-
_, end, rest = rest.partition(f"# end: {msg}\n")
102-
with open("pyproject.toml", "w") as f:
103-
f.write(before + begin + generated + end + rest)
104-
10560
return 0
10661

10762

tools/mypy_helpers/mypy_without_ignore_possibly_undefined.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)