Skip to content

Commit

Permalink
Reformat code with latest black
Browse files Browse the repository at this point in the history
  • Loading branch information
dlax committed Oct 8, 2024
1 parent cddd3ec commit df2abf8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pg-activity[psycopg,psycopg2,testing,typing]",
"black >= 24.2.0",
"black >= 24.10.0",
"check-manifest",
"codespell",
"flake8",
Expand Down
14 changes: 7 additions & 7 deletions tests/test_activities.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ def sys_get_proc(pid):
def test_mem_swap_load() -> None:
pmem = namedtuple("pmem", ["total", "free", "buffers", "cached"])
vmem = namedtuple("vmem", ["total", "free", "used"])
with patch(
"psutil.virtual_memory", return_value=pmem(45, 6, 6, 7)
) as virtual_memory, patch(
"psutil.swap_memory", return_value=vmem(8, 6, 2)
) as swap_memory, patch(
"os.getloadavg", return_value=(0.14, 0.27, 0.44)
) as getloadavg:
with (
patch(
"psutil.virtual_memory", return_value=pmem(45, 6, 6, 7)
) as virtual_memory,
patch("psutil.swap_memory", return_value=vmem(8, 6, 2)) as swap_memory,
patch("os.getloadavg", return_value=(0.14, 0.27, 0.44)) as getloadavg,
):
memory, swap, load = activities.mem_swap_load()
virtual_memory.assert_called_once_with()
swap_memory.assert_called_once_with()
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ commands =
skip_install = True
deps =
codespell
black >= 24.2.0
black >= 24.10.0
flake8
isort
pre-commit
Expand Down

0 comments on commit df2abf8

Please sign in to comment.