Skip to content

Commit 901a8b2

Browse files
committed
Removed unused imports
1 parent 3c00e12 commit 901a8b2

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

src/aws_encryption_sdk/keyring/multi_keyring.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@
2020
from aws_encryption_sdk.keyring.base import DecryptionMaterials, EncryptedDataKey, EncryptionMaterials, Keyring
2121

2222

23+
try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
24+
from typing import Iterable # noqa pylint: disable=unused-import
25+
except ImportError: # pragma: no cover
26+
# We only actually need these imports when running the mypy checks
27+
pass
28+
29+
2330
@attr.s
2431
class MultiKeyring(Keyring):
2532
"""Public class for Multi Keyring.

test/functional/test_f_multi_keyring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from cryptography.hazmat.backends import default_backend
1717
from cryptography.hazmat.primitives.asymmetric import rsa
1818

19-
from aws_encryption_sdk.identifiers import Algorithm, KeyringTraceFlag, WrappingAlgorithm
19+
from aws_encryption_sdk.identifiers import KeyringTraceFlag, WrappingAlgorithm
2020
from aws_encryption_sdk.internal.defaults import ALGORITHM
2121
from aws_encryption_sdk.keyring.multi_keyring import MultiKeyring
2222
from aws_encryption_sdk.keyring.raw_keyring import RawAESKeyring, RawRSAKeyring

test/unit/test_keyring_multi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
1313
"""Unit tests for Multi keyring."""
14-
import itertools
1514

1615
import pytest
1716
from mock import MagicMock

test/unit/unit_test_utils.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@
2626
from aws_encryption_sdk.materials_managers import DecryptionMaterials, EncryptionMaterials
2727
from aws_encryption_sdk.structures import EncryptedDataKey, KeyringTrace, MasterKeyInfo, RawDataKey
2828

29+
30+
try: # Python 3.5.0 and 3.5.1 have incompatible typing modules
31+
from typing import Iterable # noqa pylint: disable=unused-import
32+
except ImportError: # pragma: no cover
33+
# We only actually need these imports when running the mypy checks
34+
pass
35+
36+
2937
_ENCRYPTION_CONTEXT = {"encryption": "context", "values": "here"}
3038
_PROVIDER_ID = "Random Raw Keys"
3139
_KEY_ID = b"5325b043-5843-4629-869c-64794af77ada"

0 commit comments

Comments
 (0)