Skip to content

Commit 51ab32d

Browse files
committed
Moved import to the bottom of file to prevent circular import
1 parent 773ed80 commit 51ab32d

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sentry_sdk/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ def removed_because_over_size_limit(cls):
392392
def substituted_because_contains_sensitive_data(cls):
393393
# type: () -> AnnotatedValue
394394
"""The actual value was removed because it contained sensitive information."""
395-
from sentry_sdk.consts import SENSITIVE_DATA_SUBSTITUTE
396395

397396
return AnnotatedValue(
398397
value=SENSITIVE_DATA_SUBSTITUTE,
@@ -1192,8 +1191,6 @@ def sanitize_url(url, remove_authority=True, remove_query_values=True):
11921191
parsed_url = urlsplit(url)
11931192
query_params = parse_qs(parsed_url.query, keep_blank_values=True)
11941193

1195-
from sentry_sdk.consts import SENSITIVE_DATA_SUBSTITUTE
1196-
11971194
# strip username:password (netloc can be usr:[email protected])
11981195
if remove_authority:
11991196
netloc_parts = parsed_url.netloc.split("@")
@@ -1273,3 +1270,7 @@ def nanosecond_time():
12731270
def nanosecond_time():
12741271
# type: () -> int
12751272
raise AttributeError
1273+
1274+
1275+
# prevent circular import
1276+
from sentry_sdk.consts import SENSITIVE_DATA_SUBSTITUTE

0 commit comments

Comments
 (0)