Merge pull request #8749 from beniwohli/fix-at-level-type-hints

updated type hints for caplog.at_level to match caplog.set_level
This commit is contained in:
Bruno Oliveira 2021-06-10 19:33:35 -03:00 committed by GitHub
commit 8010fb9f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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