add FA, ICN, ISC, LOG, PIE and PYI linting
This commit is contained in:
@@ -36,7 +36,6 @@ def open_file(file_request: FileRequest) -> list[str] | None:
|
||||
Abstract api method to open a file dialog window.
|
||||
It must return the name of the selected file or None if no file was selected.
|
||||
"""
|
||||
pass
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -13,6 +13,7 @@ import errno
|
||||
import json
|
||||
import logging
|
||||
import socket
|
||||
import types
|
||||
from typing import Any
|
||||
|
||||
|
||||
@@ -153,7 +154,12 @@ class QEMUMonitorProtocol:
|
||||
# Implement context manager enter function.
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type: Any, exc_value: Any, exc_traceback: Any) -> bool:
|
||||
def __exit__(
|
||||
self,
|
||||
exc_type: type[BaseException] | None,
|
||||
exc_value: BaseException | None,
|
||||
traceback: types.TracebackType | None,
|
||||
) -> None:
|
||||
# Implement context manager exit function.
|
||||
self.close()
|
||||
return False
|
||||
|
||||
@@ -44,7 +44,7 @@ class CommandFormatter(logging.Formatter):
|
||||
colorcode = 0
|
||||
if record.levelno == logging.ERROR:
|
||||
colorcode = 31 # red
|
||||
if record.levelno == logging.WARN:
|
||||
if record.levelno == logging.WARNING:
|
||||
colorcode = 33 # yellow
|
||||
|
||||
color, prefix_color, color_reset = "", "", ""
|
||||
@@ -224,7 +224,6 @@ class Host:
|
||||
cmdlog.info(
|
||||
line, extra={"command_prefix": self.command_prefix}
|
||||
)
|
||||
pass
|
||||
else:
|
||||
cmdlog.error(
|
||||
line, extra={"command_prefix": self.command_prefix}
|
||||
|
||||
Reference in New Issue
Block a user