Skip to content

Commit 3135117

Browse files
committed
chore(mypy): address leftovers
1 parent a9e7ca5 commit 3135117

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

aws_lambda_powertools/tracing/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import numbers
33
import traceback
44
from contextlib import contextmanager
5-
from typing import Any, Generator, List, NoReturn, Optional, Set, Union
5+
from typing import Any, Generator, List, NoReturn, Optional, Sequence, Union
66

77

88
class BaseSegment(abc.ABC):
@@ -74,7 +74,7 @@ def add_exception(self, exception: BaseException, stack: List[traceback.StackSum
7474

7575

7676
class BaseProvider(abc.ABC):
77-
@abc.abstractmethod # type: ignore
77+
@abc.abstractmethod
7878
@contextmanager
7979
def in_subsegment(self, name=None, **kwargs) -> Generator[BaseSegment, None, None]:
8080
"""Return a subsegment context manger.
@@ -87,7 +87,7 @@ def in_subsegment(self, name=None, **kwargs) -> Generator[BaseSegment, None, Non
8787
Optional parameters to be propagated to segment
8888
"""
8989

90-
@abc.abstractmethod # type: ignore
90+
@abc.abstractmethod
9191
@contextmanager
9292
def in_subsegment_async(self, name=None, **kwargs) -> Generator[BaseSegment, None, None]:
9393
"""Return a subsegment async context manger.
@@ -131,7 +131,7 @@ def put_metadata(self, key: str, value: Any, namespace: str = "default") -> NoRe
131131
"""
132132

133133
@abc.abstractmethod
134-
def patch(self, modules: Set[str]) -> NoReturn:
134+
def patch(self, modules: Sequence[str]) -> NoReturn:
135135
"""Instrument a set of supported libraries
136136
137137
Parameters

mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ ignore_missing_imports = True
4040

4141
[mypy-orjson]
4242
ignore_missing_imports = True
43+
44+
[mypy-aiohttp]
45+
ignore_missing_imports = True

0 commit comments

Comments
 (0)