diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2018-10-16 09:56:40 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-16 09:56:40 +0900 |
commit | be2b86cc15a2f5fca1581c25ebf2db9a189dbc41 (patch) | |
tree | 07ace712b6137c3a878ff6ab309bbefbd35397dc /sphinx/util/logging.py | |
parent | 8c56fd87479291e2e6b901d3ed44e889d27801da (diff) | |
parent | a77f3519fa11793f939e4a28947e57df9afde793 (diff) | |
download | sphinx-git-be2b86cc15a2f5fca1581c25ebf2db9a189dbc41.tar.gz |
Merge pull request #5537 from tk0miya/mypy-0.641
Fix mypy violations
Diffstat (limited to 'sphinx/util/logging.py')
-rw-r--r-- | sphinx/util/logging.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/util/logging.py b/sphinx/util/logging.py index 9e7c7ec9b..09cef4b48 100644 --- a/sphinx/util/logging.py +++ b/sphinx/util/logging.py @@ -154,7 +154,7 @@ class SphinxLoggerAdapter(logging.LoggerAdapter): def handle(self, record): # type: (logging.LogRecord) -> None - self.logger.handle(record) # type: ignore + self.logger.handle(record) class WarningStreamHandler(logging.StreamHandler): @@ -439,7 +439,8 @@ class SphinxLogRecordTranslator(logging.Filter): def filter(self, record): # type: ignore # type: (SphinxWarningLogRecord) -> bool if isinstance(record, logging.LogRecord): - record.__class__ = self.LogRecordClass # force subclassing to handle location + # force subclassing to handle location + record.__class__ = self.LogRecordClass # type: ignore location = getattr(record, 'location', None) if isinstance(location, tuple): |