Skip to content

Commit

Permalink
Run ruff and black on code
Browse files Browse the repository at this point in the history
  • Loading branch information
madeddie committed May 16, 2024
1 parent a595f44 commit e555cc0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
17 changes: 5 additions & 12 deletions tests/test_tyora.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ class TestFindLink:
valid_return = {"href": "somelink", "text": "sometext"}

def test_find_link_success(self) -> None:
assert (
tyora.find_link(self.valid_html, self.valid_xpath)
== self.valid_return
)
assert tyora.find_link(self.valid_html, self.valid_xpath) == self.valid_return

def test_find_link_bad_xpath(self) -> None:
assert tyora.find_link(self.valid_html, self.invalid_xpath) == {}
Expand Down Expand Up @@ -84,17 +81,13 @@ def test_login_failed(mock_session: tyora.Session) -> None:


# TODO: functions that use user input or read or write files
def test_create_config() -> None:
...
def test_create_config() -> None: ...


def test_write_config() -> None:
...
def test_write_config() -> None: ...


def test_read_config() -> None:
...
def test_read_config() -> None: ...


def test_get_cookiejar() -> None:
...
def test_get_cookiejar() -> None: ...
8 changes: 5 additions & 3 deletions tyora.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,11 @@ def parse_task_list(html: AnyStr) -> list[Task]:
task = Task(
id=item_id,
name=item_name,
state=TaskState.COMPLETE
if "full" in item_class
else TaskState.INCOMPLETE,
state=(
TaskState.COMPLETE
if "full" in item_class
else TaskState.INCOMPLETE
),
)
task_list.append(task)

Expand Down

0 comments on commit e555cc0

Please sign in to comment.