Skip to content

Commit

Permalink
Address some of the ruff exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed May 13, 2024
1 parent bc6d28b commit 6beab39
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/ansible_navigator/actions/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
2 changes: 1 addition & 1 deletion src/ansible_navigator/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6beab39

Please sign in to comment.