Skip to content

Commit c07ac42

Browse files
ci: Enable Ruff import ordering
1 parent d1fc138 commit c07ac42

294 files changed

Lines changed: 1340 additions & 1468 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ select = [
212212
"E", # pycodestyle errors (same as flake8 default)
213213
"W", # pycodestyle warnings (same as flake8 default)
214214
"F", # Pyflakes (same as flake8 default)
215+
"I",
215216
# Note: B and N rules are NOT enabled by default in flake8
216217
# They were only active through the plugins, which may not have been fully enabled
217218
]

scripts/init_serverless_sdk.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
"""
88

99
import os
10-
import sys
1110
import re
11+
import sys
12+
from typing import TYPE_CHECKING
1213

1314
import sentry_sdk
1415
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
1516

16-
from typing import TYPE_CHECKING
17-
1817
if TYPE_CHECKING:
1918
from typing import Any
2019

scripts/populate_tox/populate_tox.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,35 @@
44
See scripts/populate_tox/README.md for more info.
55
"""
66

7-
import re
87
import functools
98
import hashlib
109
import json
1110
import os
11+
import re
1212
import subprocess
1313
import sys
1414
import time
15-
from dataclasses import dataclass
1615
from bisect import bisect_left
1716
from collections import defaultdict
17+
from dataclasses import dataclass
1818
from datetime import datetime, timedelta, timezone # noqa: F401
1919
from importlib.metadata import PackageMetadata, distributions
20-
from packaging.specifiers import SpecifierSet
21-
from packaging.version import Version
2220
from pathlib import Path
2321
from typing import Optional, Union
2422

23+
from packaging.specifiers import SpecifierSet
24+
from packaging.version import Version
25+
2526
# Adding the scripts directory to PATH. This is necessary in order to be able
2627
# to import stuff from the split_tox_gh_actions script
2728
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
2829

2930
import requests
30-
from jinja2 import Environment, FileSystemLoader
31-
from sentry_sdk.integrations import _MIN_VERSIONS
32-
3331
from config import TEST_SUITE_CONFIG
32+
from jinja2 import Environment, FileSystemLoader
3433
from split_tox_gh_actions.split_tox_gh_actions import GROUPS
3534

35+
from sentry_sdk.integrations import _MIN_VERSIONS
3636

3737
# Set CUTOFF this to a datetime to ignore packages older than CUTOFF
3838
CUTOFF = None

scripts/ready_yet/main.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
import time
21
import re
32
import sys
4-
5-
import requests
6-
3+
import time
74
from collections import defaultdict
8-
95
from pathlib import Path
106

7+
import requests
118
from tox.config.cli.parse import get_options
12-
from tox.session.state import State
139
from tox.config.sets import CoreConfigSet
1410
from tox.config.source.tox_ini import ToxIni
11+
from tox.session.state import State
1512

1613
PYTHON_VERSION = "3.13"
1714

scripts/test-lambda-locally/lambda_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import logging
22
import os
3-
import sentry_sdk
43

4+
import sentry_sdk
55
from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration
66
from sentry_sdk.integrations.logging import LoggingIntegration
77

sentry_sdk/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
from sentry_sdk import profiler
2-
from sentry_sdk import metrics
3-
from sentry_sdk.scope import Scope
4-
from sentry_sdk.transport import Transport, HttpTransport
5-
from sentry_sdk.client import Client
6-
1+
from sentry_sdk import metrics, profiler
72
from sentry_sdk.api import * # noqa
3+
from sentry_sdk.client import Client
84
from sentry_sdk.consts import VERSION
5+
from sentry_sdk.scope import Scope
6+
from sentry_sdk.transport import HttpTransport, Transport
97

108
__all__ = [ # noqa
119
"Hub",

sentry_sdk/_batcher.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import os
22
import random
33
import threading
4-
from datetime import datetime, timezone
5-
from typing import TYPE_CHECKING, TypeVar, Generic
64
import weakref
5+
from datetime import datetime, timezone
6+
from typing import TYPE_CHECKING, Generic, TypeVar
77

8-
from sentry_sdk.utils import format_timestamp
98
from sentry_sdk.envelope import Envelope, Item, PayloadRef
9+
from sentry_sdk.utils import format_timestamp
1010

1111
if TYPE_CHECKING:
12-
from typing import Optional, Callable, Any
12+
from typing import Any, Callable, Optional
1313

1414
T = TypeVar("T")
1515

sentry_sdk/_compat.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import sys
2-
32
from typing import TYPE_CHECKING
43

54
if TYPE_CHECKING:
6-
from typing import Any
7-
from typing import TypeVar
5+
from typing import Any, TypeVar
86

97
T = TypeVar("T")
108

sentry_sdk/_init_implementation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import warnings
2-
32
from typing import TYPE_CHECKING
43

54
import sentry_sdk

sentry_sdk/_log_batcher.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
from typing import TYPE_CHECKING
22

33
from sentry_sdk._batcher import Batcher
4-
from sentry_sdk.utils import serialize_attribute
54
from sentry_sdk.envelope import Item, PayloadRef
5+
from sentry_sdk.utils import serialize_attribute
66

77
if TYPE_CHECKING:
88
from typing import Any
9+
910
from sentry_sdk._types import Log
1011

1112

0 commit comments

Comments
 (0)