Skip to content

Commit 3baddbc

Browse files
committed
Use __all__ instead of noqa
Signed-off-by: David Black <[email protected]>
1 parent 3ec4308 commit 3baddbc

File tree

6 files changed

+38
-26
lines changed

6 files changed

+38
-26
lines changed

atlassian_jwt_auth/__init__.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
from atlassian_jwt_auth.algorithms import get_permitted_algorithm_names # noqa
1+
from atlassian_jwt_auth.algorithms import get_permitted_algorithm_names
22
from atlassian_jwt_auth.key import (
3-
HTTPSPublicKeyRetriever, # noqa
4-
KeyIdentifier, # noqa
3+
HTTPSPublicKeyRetriever,
4+
KeyIdentifier,
55
)
6-
from atlassian_jwt_auth.signer import ( # noqa
6+
from atlassian_jwt_auth.signer import (
77
create_signer,
88
create_signer_from_file_private_key_repository,
99
)
10-
from atlassian_jwt_auth.verifier import JWTAuthVerifier # noqa
10+
from atlassian_jwt_auth.verifier import JWTAuthVerifier
11+
12+
__all__ = [
13+
"get_permitted_algorithm_names",
14+
"HTTPSPublicKeyRetriever",
15+
"KeyIdentifier",
16+
"create_signer",
17+
"create_signer_from_file_private_key_repository",
18+
"JWTAuthVerifier",
19+
]
Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
"""Provide asyncio support"""
22

3-
import sys
4-
5-
if sys.version_info >= (3, 5):
6-
try:
7-
import aiohttp # noqa
8-
9-
from .auth import JWTAuth # noqa
10-
from .key import HTTPSPublicKeyRetriever # noqa
11-
from .verifier import JWTAuthVerifier # noqa
12-
except ImportError as e:
13-
import warnings
14-
15-
warnings.warn(str(e))
16-
17-
18-
del sys
3+
from .auth import JWTAuth
4+
from .key import HTTPSPublicKeyRetriever
5+
from .verifier import JWTAuthVerifier
6+
7+
__all__ = [
8+
"JWTAuth",
9+
"HTTPSPublicKeyRetriever",
10+
"JWTAuthVerifier",
11+
]

atlassian_jwt_auth/contrib/flask_app/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import warnings
22

3-
from .decorators import requires_asap # noqa
3+
from .decorators import requires_asap
4+
5+
__all__ = [
6+
"requires_asap",
7+
]
48

59
warnings.warn(
610
"The atlassian_jwt_auth.contrib.flask_app package is deprecated in 4.0.0 "
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
from .decorators import restrict_asap, with_asap # noqa
2-
from .middleware import OldStyleASAPMiddleware, asap_middleware # noqa
1+
from .decorators import restrict_asap, with_asap
2+
from .middleware import OldStyleASAPMiddleware, asap_middleware
3+
4+
__all__ = ["restrict_asap", "with_asap", "OldStyleASAPMiddleware", "asap_middleware"]
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .decorators import with_asap # noqa
1+
from .decorators import with_asap
2+
3+
__all__ = ["with_asap"]
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
from .middleware import ASAPMiddleware # noqa
1+
from .middleware import ASAPMiddleware
2+
3+
__all__ = ["ASAPMiddleware"]

0 commit comments

Comments
 (0)