Skip to content

Commit

Permalink
Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed Jul 11, 2023
1 parent 203130d commit b32f5e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ ignore = [
'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`
'PLC1901', # `self.fs_source == ""` can be simplified to `not self.fs_source` as an empty string is falsey
Expand Down
5 changes: 1 addition & 4 deletions src/ansible_navigator/utils/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,12 @@ def to_lines(self, color: bool, width: int, with_prefix: bool) -> list[str]:
initial_indent=str(self.prefix) if with_prefix else indent,
subsequent_indent=indent,
)
printable = []
lines = message.splitlines()

start_color = self.color if color else ""
end_color = Color.END if color else ""

for line in lines:
printable.append(f"{start_color}{line}{end_color}")

printable = [f"{start_color}{line}{end_color}" for line in lines]
return printable


Expand Down

0 comments on commit b32f5e4

Please sign in to comment.