Skip to content

Commit

Permalink
Format using ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Sep 2, 2024
1 parent 9423692 commit a9dde4f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
18 changes: 6 additions & 12 deletions check_systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,13 +665,11 @@ def set_user(self, user: bool) -> None:
self._user = user

@abstractmethod
def get_unit(self, name: str) -> Source.Unit:
...
def get_unit(self, name: str) -> Source.Unit: ...

@property
@abstractmethod
def _all_units(self) -> Generator[Source.Unit, Any, None]:
...
def _all_units(self) -> Generator[Source.Unit, Any, None]: ...

@property
def units(self) -> Source.Cache[Source.Unit]:
Expand All @@ -682,13 +680,11 @@ def units(self) -> Source.Cache[Source.Unit]:

@property
@abstractmethod
def startup_time(self) -> float | None:
...
def startup_time(self) -> float | None: ...

@property
@abstractmethod
def _all_timers(self) -> list[Source.Timer]:
...
def _all_timers(self) -> list[Source.Timer]: ...

@property
def timers(self) -> Source.Cache[Source.Timer]:
Expand Down Expand Up @@ -1397,12 +1393,10 @@ def __delitem__(self, index: int | slice) -> None:
del self.unit_types[index]

@overload
def __setitem__(self, index: int, unit_type: str) -> None:
...
def __setitem__(self, index: int, unit_type: str) -> None: ...

@overload
def __setitem__(self, index: slice, unit_type: Iterable[str]) -> None:
...
def __setitem__(self, index: slice, unit_type: Iterable[str]) -> None: ...

def __setitem__(self, index: int | slice, unit_type: str | Iterable[str]) -> None:
if isinstance(index, int) and isinstance(unit_type, str):
Expand Down
1 change: 1 addition & 0 deletions tests/test_argparse.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Test the command line interface. The CLI interface is implemented with
argparse."""

from __future__ import annotations

import io
Expand Down
1 change: 1 addition & 0 deletions tests/test_data_source_cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit tests"""

from __future__ import annotations

from unittest.mock import patch
Expand Down

0 comments on commit a9dde4f

Please sign in to comment.