|
4 | 4 | import sys |
5 | 5 | from datetime import datetime, timedelta |
6 | 6 | from typing import Any, Dict, Optional, Union |
7 | | -from typing_extensions import Unpack |
8 | 7 | from uuid import uuid4 |
9 | 8 |
|
10 | 9 | from dateutil.tz import tzutc |
11 | 10 | from six import string_types |
| 11 | +from typing_extensions import Unpack |
12 | 12 |
|
13 | | -from posthog.args import OptionalCaptureArgs, OptionalSetArgs, ID_TYPES, ExceptionArg |
| 13 | +from posthog.args import ID_TYPES, ExceptionArg, OptionalCaptureArgs, OptionalSetArgs |
14 | 14 | from posthog.consumer import Consumer |
| 15 | +from posthog.contexts import ( |
| 16 | + _get_current_context, |
| 17 | + get_capture_exception_code_variables_context, |
| 18 | + get_code_variables_ignore_patterns_context, |
| 19 | + get_code_variables_mask_patterns_context, |
| 20 | + get_context_distinct_id, |
| 21 | + get_context_session_id, |
| 22 | + new_context, |
| 23 | +) |
15 | 24 | from posthog.exception_capture import ExceptionCapture |
16 | 25 | from posthog.exception_utils import ( |
| 26 | + DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS, |
| 27 | + DEFAULT_CODE_VARIABLES_MASK_PATTERNS, |
17 | 28 | exc_info_from_error, |
| 29 | + exception_is_already_captured, |
18 | 30 | exceptions_from_error_tuple, |
19 | 31 | handle_in_app, |
20 | | - exception_is_already_captured, |
21 | 32 | mark_exception_as_captured, |
22 | 33 | try_attach_code_variables_to_frames, |
23 | | - DEFAULT_CODE_VARIABLES_MASK_PATTERNS, |
24 | | - DEFAULT_CODE_VARIABLES_IGNORE_PATTERNS, |
25 | 34 | ) |
26 | 35 | from posthog.feature_flags import ( |
27 | 36 | InconclusiveMatchError, |
|
38 | 47 | get, |
39 | 48 | remote_config, |
40 | 49 | ) |
41 | | -from posthog.contexts import ( |
42 | | - _get_current_context, |
43 | | - get_context_distinct_id, |
44 | | - get_context_session_id, |
45 | | - get_capture_exception_code_variables_context, |
46 | | - get_code_variables_mask_patterns_context, |
47 | | - get_code_variables_ignore_patterns_context, |
48 | | - new_context, |
49 | | -) |
50 | 50 | from posthog.types import ( |
51 | 51 | FeatureFlag, |
52 | 52 | FeatureFlagResult, |
@@ -2016,9 +2016,9 @@ def _initialize_flag_cache(self, cache_url): |
2016 | 2016 | return None |
2017 | 2017 |
|
2018 | 2018 | try: |
2019 | | - from urllib.parse import urlparse, parse_qs |
| 2019 | + from urllib.parse import parse_qs, urlparse |
2020 | 2020 | except ImportError: |
2021 | | - from urlparse import urlparse, parse_qs |
| 2021 | + from urlparse import parse_qs, urlparse |
2022 | 2022 |
|
2023 | 2023 | try: |
2024 | 2024 | parsed = urlparse(cache_url) |
|
0 commit comments