diff --git a/pyproject.toml b/pyproject.toml index e7f9e6354..43f524729 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -299,16 +299,13 @@ ignore = [ 'FIX001', # Line contains FIXME 'FIX002', # Line contains TODO 'INP001', # File `docs/_ext/regenerate_docs.py` is part of an implicit namespace package. Add an `__init__.py`. - 'N802', # Function name `formatTime` should be lowercase 'N806', # Variable `FType` in function should be lowercase 'N812', # Lowercase `__version_collection_doc_cache__` imported as non-lowercase `VERSION_CDC` 'N813', # Camelcase `Action` imported as lowercase `stdout_action` 'N817', # CamelCase `Constants` imported as acronym `C` 'PERF203', # `try`-`except` within a loop incurs performance overhead 'PGH003', # Use specific rule codes when ignoring type issues - 'PIE810', # [*] Call `startswith` once with a `tuple` 'PD011', # https://github.com/astral-sh/ruff/issues/2229 - 'PLC1901', # `self.fs_source == ""` can be simplified to `not self.fs_source` as an empty string is falsey 'PLR0911', # Too many return statements (8 > 6) 'PLR0912', # Too many branches (13 > 12) 'PLR0913', # Too many arguments to function call (7 > 5) diff --git a/src/ansible_navigator/actions/run.py b/src/ansible_navigator/actions/run.py index 01a1c8247..1258aea3f 100644 --- a/src/ansible_navigator/actions/run.py +++ b/src/ansible_navigator/actions/run.py @@ -425,7 +425,7 @@ def _init_replay(self) -> bool: return False version = data.get("version", "") - if version.startswith("1.") or version.startswith("2."): + if version.startswith("1.", "2."): try: stdout = data["stdout"] if self.mode == "interactive": diff --git a/src/ansible_navigator/logger.py b/src/ansible_navigator/logger.py index 43fb982e7..968f66390 100644 --- a/src/ansible_navigator/logger.py +++ b/src/ansible_navigator/logger.py @@ -28,7 +28,7 @@ def __init__(self, *args: Any, **kwargs: Any) -> None: self._time_zone = kwargs.pop("time_zone") super().__init__(*args, **kwargs) - def formatTime(self, record: logging.LogRecord, _datefmt: str | None = None) -> str: + def format_time(self, record: logging.LogRecord, _datefmt: str | None = None) -> str: """Format the log timestamp. :param record: The log record