Skip to content

Commit

Permalink
jockey: update everything to pass CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
johnlettman committed Aug 17, 2024
1 parent 840a062 commit 0ea27ae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ disable-noqa = false
enable-extensions = [
'G', # flake8-logging-format
]
extend-ignore = ["E203"]
extend-exclude = [
'.github',
'.Python',
Expand Down
17 changes: 12 additions & 5 deletions src/jockey/__main__.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
#!/usr/bin/env python3
"""Jockey: a Juju query language to put all of your Juju objects at your fingertips."""
from argparse import ArgumentParser, FileType, Namespace
import sys
from argparse import Namespace, ArgumentParser, FileType
from typing import Optional, Sequence

from jockey.__init__ import __version__ as version
from jockey.core import ObjectType, filter_units, filter_machines, convert_object_abbreviation, list_abbreviations, \
FilterMode, parse_filter_string
from jockey.core import (
FilterMode,
ObjectType,
convert_object_abbreviation,
filter_machines,
filter_units,
list_abbreviations,
parse_filter_string,
)
from jockey.status_keeper import cache_juju_status, read_local_juju_status_file, retrieve_juju_cache

from jockey.status_keeper import cache_juju_status, retrieve_juju_cache, read_local_juju_status_file

INFO_MESSAGE = f"""
+----+
Expand Down Expand Up @@ -81,7 +88,7 @@ def parse_args(argv: Optional[Sequence[str]]) -> Namespace:
# Add object type argument
parser.add_argument(
"object",
help=f"Choose an object type to query or 'info'",
help="Choose an object type to query or 'info'",
)

# Add filters as positional arguments
Expand Down
4 changes: 1 addition & 3 deletions src/jockey/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ def list_abbreviations() -> str:
return "\n".join([header, *lines])




@dataclass
class JockeyFilter:
obj_type: ObjectType
Expand Down Expand Up @@ -433,7 +431,7 @@ def application_to_units(status: JujuStatus, app_name: str) -> Generator[str, No
units (Generator[str])
All units of the given application.
"""
for application, data in status["applications"].items():
for application, _ in status["applications"].items():

if application != app_name:
continue
Expand Down

0 comments on commit 0ea27ae

Please sign in to comment.