Skip to content

Commit

Permalink
Pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
shatakshiiii committed May 21, 2024
1 parent 7e5da7e commit 3677699
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ansible_navigator/action_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def _run_app(self, initial_interaction: Interaction) -> None:
:param initial_interaction: The initial interaction for app start
"""
interaction = None
while True:
if not self.steps:
self.steps.append(initial_interaction)
Expand Down
1 change: 1 addition & 0 deletions src/ansible_navigator/actions/doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def run(self, interaction: Interaction, app: AppPublic) -> Interaction | None:
self._prepare_to_run(app, interaction)

colon_prompt = self._interaction.action.match.groupdict()["params"]
source = None

Check warning on line 81 in src/ansible_navigator/actions/doc.py

View check run for this annotation

Codecov / codecov/patch

src/ansible_navigator/actions/doc.py#L81

Added line #L81 was not covered by tests

# Nothing provided at colon prompt and content is showing, get the task action
if interaction.content and not colon_prompt:
Expand Down
1 change: 1 addition & 0 deletions src/ansible_navigator/actions/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def generate_content_heading(
:param name: The name of the images menu
:returns: The heading
"""
text = ""

Check warning on line 109 in src/ansible_navigator/actions/images.py

View check run for this annotation

Codecov / codecov/patch

src/ansible_navigator/actions/images.py#L109

Added line #L109 was not covered by tests
if name == "image_menu":
text = (
f"{self.steps.previous.selected['first_column']}"
Expand Down
1 change: 1 addition & 0 deletions src/ansible_navigator/actions/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def run(self, interaction: Interaction, app: AppPublic) -> Interaction | None:
:returns: The pending interaction or none
"""
self._prepare_to_run(app, interaction)
initialized = False

if interaction.action.match.groupdict().get("run"):
self._logger.debug("run requested in interactive mode")
Expand Down
2 changes: 2 additions & 0 deletions src/ansible_navigator/data/catalog_collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,7 @@ def identify_missing(

def parse_args() -> tuple[argparse.Namespace, list[Path]]:
# pylint: disable=used-before-assignment
# pylint: disable=possibly-used-before-assignment
"""Parse the arguments from the command line.
:returns: The parsed arguments and all directories to search
Expand Down Expand Up @@ -594,6 +595,7 @@ def run_command(cmd: list[str]) -> dict[str, str]:
def main() -> dict[Any, Any]:
# pylint: disable=protected-access
# pylint: disable=used-before-assignment
# pylint: disable=possibly-used-before-assignment
"""Run the collection catalog process.
:returns: The results from the completed collection cataloging process
Expand Down
1 change: 1 addition & 0 deletions src/ansible_navigator/utils/print.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def color_lines(term_color_bits: int, tokenized: list[list[SimpleLinePart]]) ->
:param tokenized: The tokenized content
:returns: The ANSI string
"""
# pylint: disable=possibly-used-before-assignment
lines = []
for line in tokenized:
printable = ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def run(self, *args: Any, **kwargs: Any) -> None:
:param args: Positional arguments
:param kwargs: Keyword arguments
"""
# pylint: disable=possibly-used-before-assignment
if not self.content:
with self.settings_file_path.open("r", encoding="utf-8") as f:
try:
Expand Down

0 comments on commit 3677699

Please sign in to comment.