Skip to content

Commit 3eb6523

Browse files
committed
fix: flake8 import order errors for typing.Set
1 parent bcb18a4 commit 3eb6523

4 files changed

Lines changed: 16 additions & 19 deletions

File tree

packages/google-auth/google/auth/transport/grpc.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,8 @@
1616

1717
from __future__ import absolute_import
1818

19-
from typing import Set
20-
21-
__lazy_modules__: Set[str] = {"grpc"}
22-
2319
import logging
20+
from typing import Set
2421

2522
from google.auth import exceptions
2623
from google.auth.transport import _mtls_helper
@@ -36,6 +33,8 @@
3633

3734
_LOGGER = logging.getLogger(__name__)
3835

36+
__lazy_modules__: Set[str] = {"grpc"}
37+
3938

4039
class AuthMetadataPlugin(grpc.AuthMetadataPlugin):
4140
"""A `gRPC AuthMetadataPlugin`_ that inserts the credentials into each

packages/google-auth/google/auth/transport/requests.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,12 @@
1616

1717
from __future__ import absolute_import
1818

19-
from typing import Set
20-
21-
__lazy_modules__: Set[str] = {"requests", "requests.adapters", "requests.exceptions"}
22-
2319
import functools
2420
import http.client as http_client
2521
import logging
2622
import numbers
2723
import time
28-
from typing import Optional
24+
from typing import Optional, Set
2925

3026
try:
3127
import requests
@@ -46,6 +42,8 @@
4642
import google.auth.transport._mtls_helper
4743
from google.oauth2 import service_account
4844

45+
__lazy_modules__: Set[str] = {"requests", "requests.adapters", "requests.exceptions"}
46+
4947
_LOGGER = logging.getLogger(__name__)
5048

5149
_DEFAULT_TIMEOUT = 120 # in seconds

packages/google-auth/google/auth/transport/urllib3.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,11 @@
1616

1717
from __future__ import absolute_import
1818

19-
from typing import Set
20-
21-
__lazy_modules__: Set[str] = {
22-
"urllib3",
23-
"urllib3.exceptions",
24-
"certifi",
25-
"packaging",
26-
"packaging.version",
27-
}
2819

2920
import http.client as http_client
3021
import logging
3122
import warnings
23+
from typing import Set
3224

3325
# Certifi is Mozilla's certificate bundle. Urllib3 needs a certificate bundle
3426
# to verify HTTPS requests, and certifi is the recommended and most reliable
@@ -64,6 +56,14 @@
6456
from google.auth import exceptions
6557
from google.auth import transport
6658
from google.auth.transport import _mtls_helper
59+
60+
__lazy_modules__: Set[str] = {
61+
"urllib3",
62+
"urllib3.exceptions",
63+
"certifi",
64+
"packaging",
65+
"packaging.version",
66+
}
6767
from google.oauth2 import service_account
6868

6969
if version.parse(urllib3.__version__) >= version.parse("2.0.0"): # pragma: NO COVER

packages/google-auth/noxfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"docs/conf.py",
3434
]
3535

36-
DEFAULT_PYTHON_VERSION = "3.14"
36+
DEFAULT_PYTHON_VERSION = "3.11"
3737

3838
# TODO(https://github.com/googleapis/gapic-generator-python/issues/2450):
3939
# Switch this to Python 3.15 alpha1

0 commit comments

Comments
 (0)