8000 fix some lint things (#3783) · getsentry/sentry-python@c29382d · GitHub
[go: up one dir, main page]

Skip to content

Commit c29382d

Browse files
authored
fix some lint things (#3783)
1 parent 1c147e9 commit c29382d

File tree

4 files changed

+1
-53
lines changed

4 files changed

+1
-53
lines changed

sentry_sdk/_init_implementation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import warnings
2-
31
from typing import TYPE_CHECKING
42

53
import sentry_sdk

sentry_sdk/integrations/aiohttp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def _prepopulate_attributes(request):
390390
attributes["server.address"] = request.host
391391

392392
try:
393-
url = f"{request.scheme}://{request.host}{request.path}"
393+
url = f"{request.scheme}://{request.host}{request.path}" # noqa: E231
394394
if request.query_string:
395395
attributes["url.full"] = f"{url}?{request.query_string}"
396396
except Exception:

tests/test_api.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import pytest
22
from unittest import mock
33

4-
import sentry_sdk
54
from sentry_sdk import (
65
capture_exception,
76
continue_trace,

tests/test_utils.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -60,55 +60,6 @@ def _normalize_distribution_name(name):
6060
return re.sub(r"[-_.]+", "-", name).lower()
6161

6262

63-
@pytest.mark.parametrize(
64-
("input_str", "expected_output"),
65-
(
66-
(
67-
"2021-01-01T00:00:00.000000Z",
68-
datetime(2021, 1, 1, tzinfo=timezone.utc),
69-
), # UTC time
70-
(
71-
"2021-01-01T00:00:00.000000",
72-
datetime(2021, 1, 1).astimezone(timezone.utc),
73-
), # No TZ -- assume local but convert to UTC
74-
(
75-
"2021-01-01T00:00:00Z",
76-
datetime(2021, 1, 1, tzinfo=timezone.utc),
77-
), # UTC - No milliseconds
78-
(
79-
"2021-01-01T00:00:00.000000+00:00",
80-
datetime(2021, 1, 1, tzinfo=timezone.utc),
81-
),
82-
(
83-
"2021-01-01T00:00:00.000000-00:00",
84-
datetime(2021, 1, 1, tzinfo=timezone.utc),
85-
),
86-
(
87-
"2021-01-01T00:00:00.000000+0000",
88-
datetime(2021, 1, 1, tzinfo=timezone.utc),
89-
),
90-
(
91-
"2021-01-01T00:00:00.000000-0000",
92-
datetime(2021, 1, 1, tzinfo=timezone.utc),
93-
),
94-
(
95-
"2020-12-31T00:00:00.000000+02:00",
96-
datetime(2020, 12, 31, tzinfo=timezone(timedelta(hours=2))),
97-
), # UTC+2 time
98-
(
99-
"2020-12-31T00:00:00.000000-0200",
100-
datetime(2020, 12, 31, tzinfo=timezone(timedelta(hours=-2))),
101-
), # UTC-2 time
102-
(
103-
"2020-12-31T00:00:00-0200",
104-
datetime(2020, 12, 31, tzinfo=timezone(timedelta(hours=-2))),
105-
), # UTC-2 time - no milliseconds
106-
),
107-
)
108-
def test_datetime_from_isoformat(input_str, expected_output):
109-
assert datetime_from_isoformat(input_str) == expected_output, input_str
110-
111-
11263
@pytest.mark.parametrize(
11364
"env_var_value,strict,expected",
11465
[

0 commit comments

Comments
 (0)
0