Skip to content

Commit

Permalink
type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipskevin committed Oct 2, 2024
1 parent fc2a108 commit fb48541
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion encryption_jwt/encryptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import base64
import logging
import os
import typing

from botocore.exceptions import ClientError
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
Expand All @@ -27,7 +28,7 @@ def boto_session(self):

return self._boto_session

async def encrypt(self, data: bytes) -> tuple[bytes, bytes]:
async def encrypt(self, data: bytes) -> typing.Tuple[bytes, bytes]:
"""Encrypt data using a key from KMS."""
# The keys are rotated automatically by KMS, so fetch a new key to encrypt the data.
data_key_encrypted, data_key_plaintext = await self.__create_data_key(
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1" }

[tool.poetry.group.encryption_jwt]
optional = true
dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1", pyjwt = "^2.9.0", aioboto3 = "^13.1.1", "requests" = "^2.32.3" }
dependencies = { cryptography = "^38.0.1", aiohttp = "^3.8.1", pyjwt = "^2.9.0", aioboto3 = "^13.1.1", "requests" = "^2.32.3", "types-requests": "^2.32.0" }

[tool.poetry.group.gevent]
optional = true
Expand Down

0 comments on commit fb48541

Please sign in to comment.