updated type hints for caplog.at_level to match caplog.set_level

The underlying logging API accepts the log level both as int and
as string.
This commit is contained in:
Benjamin Wohlwend 2021-06-10 09:34:54 +02:00
parent 992eabc29e
commit 58036d463d
No known key found for this signature in database
GPG Key ID: A017B5130EAA4DFB
1 changed files with 1 additions and 1 deletions

View File

@ -451,7 +451,7 @@ class LogCaptureFixture:
@contextmanager @contextmanager
def at_level( def at_level(
self, level: int, logger: Optional[str] = None self, level: Union[int, str], logger: Optional[str] = None
) -> Generator[None, None, None]: ) -> Generator[None, None, None]:
"""Context manager that sets the level for capturing of logs. After """Context manager that sets the level for capturing of logs. After
the end of the 'with' statement the level is restored to its original the end of the 'with' statement the level is restored to its original