Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgillij committed Nov 7, 2021
1 parent b14cf2e commit 64278ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/amdfan/amdfan.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ class Card:
"""

HWMON_REGEX: str = r"^hwmon\d$"
AMD_FIELDS: List[str] = ["temp1_input", "pwm1_max", "pwm1_min", "pwm1_enable", "pwm1"]
AMD_FIELDS: List[str] = [
"temp1_input",
"pwm1_max",
"pwm1_min",
"pwm1_enable",
"pwm1",
]

def __init__(self, card_id: str) -> None:
self._id = card_id
Expand Down Expand Up @@ -330,7 +336,9 @@ def load_config(path) -> Callable:
default=False,
help="Prints out the amdfan.service file to use with systemd",
)
def cli(daemon: bool, monitor: bool, manual: bool, configuration: bool, service: bool) -> None:
def cli(
daemon: bool, monitor: bool, manual: bool, configuration: bool, service: bool
) -> None:
if daemon:
run_as_daemon()
elif monitor:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ def test_params(self):
result = runner.invoke(cli, service_param)
assert result.exit_code == 0
manual_param = "--manual"
result = runner.invoke(cli, manual_param, input='\n'.join(['card0', "25"]))
result = runner.invoke(cli, manual_param, input="\n".join(["card0", "25"]))
assert result.exception
assert result.exit_code == 1 # should be permission denied for non-root

0 comments on commit 64278ed

Please sign in to comment.