Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #11

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: requirements-txt-fixer
- id: check-added-large-files
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
- repo: https://github.com/Pierre-Sassoulas/black-disable-checker
Expand All @@ -34,7 +34,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.6
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
6 changes: 3 additions & 3 deletions tests/algorithms/sorting_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
from nrw.datastructures import ComparableContentT, List


@pytest.fixture()
@pytest.fixture
def empty_list() -> List[int]:
return List()


@pytest.fixture()
@pytest.fixture
def sorted_list() -> List[int]:
lst: List[int] = List()
lst.append(1)
Expand All @@ -33,7 +33,7 @@ def sorted_list() -> List[int]:
return lst


@pytest.fixture()
@pytest.fixture
def unsorted_list() -> List[int]:
lst: List[int] = List()
lst.append(3)
Expand Down
4 changes: 2 additions & 2 deletions tests/algorithms/traversal_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from nrw.datastructures import List


@pytest.fixture()
@pytest.fixture
def bst() -> BinarySearchTree[int]:
tree: BinarySearchTree[int] = BinarySearchTree()
tree.insert(5)
Expand All @@ -25,7 +25,7 @@ def bst() -> BinarySearchTree[int]:
return tree


@pytest.fixture()
@pytest.fixture
def binary_tree() -> BinaryTree[int]:
tree: BinaryTree[int] = BinaryTree()
tree.content = 5
Expand Down
2 changes: 1 addition & 1 deletion tests/database/msaccess_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from pathlib import Path


@pytest.fixture()
@pytest.fixture
def msaccess_db(tmp_path: Path) -> Iterator[str]:
test_db: Path = tmp_path / "test.accdb"
test_db.touch()
Expand Down
4 changes: 2 additions & 2 deletions tests/datastructures/binary_search_tree_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
from nrw.datastructures._binary_search_tree import _BSTNode


@pytest.fixture()
@pytest.fixture
def empty_bst() -> BinarySearchTree[int]:
return BinarySearchTree()


@pytest.fixture()
@pytest.fixture
def sample_bst() -> BinarySearchTree[int]:
bst: BinarySearchTree[int] = BinarySearchTree()
bst._node = _BSTNode(1)
Expand Down
2 changes: 1 addition & 1 deletion tests/datastructures/edge_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from nrw.datastructures import Edge, Vertex


@pytest.fixture()
@pytest.fixture
def sample_edge() -> Edge:
vertex_a: Vertex = Vertex("A")
vertex_b: Vertex = Vertex("B")
Expand Down
2 changes: 1 addition & 1 deletion tests/datastructures/graph_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from nrw.datastructures import Edge, Graph, List, Vertex


@pytest.fixture()
@pytest.fixture
def graph() -> Graph:
return Graph()

Expand Down
6 changes: 3 additions & 3 deletions tests/datastructures/list_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
from nrw.datastructures._list import _ListNode


@pytest.fixture()
@pytest.fixture
def sample_node() -> _ListNode[int]:
return _ListNode(1)


@pytest.fixture()
@pytest.fixture
def empty_list() -> List[int]:
return List()


@pytest.fixture()
@pytest.fixture
def sample_list() -> List[int]:
lst: List[int] = List()
lst.append(1)
Expand Down
14 changes: 7 additions & 7 deletions tests/network_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ def process_message(self, message: str) -> None:
assert message == "Hello to you"


@pytest.mark.networktest()
@pytest.mark.networktest
def test_connection_without_running_server() -> None:
conn: Connection = Connection(LOCALHOST, random_port())
conn.send("Hello")
assert conn.receive() is None
conn.close()


@pytest.mark.networktest()
@pytest.mark.networktest
def test_client_without_running_server() -> None:
client: HelloClient = HelloClient(LOCALHOST, random_port())
assert not client.is_connected
Expand All @@ -74,7 +74,7 @@ def test_client_without_running_server() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port=port)
Expand All @@ -92,7 +92,7 @@ def test_close_connection_first() -> None:
assert not server.is_open


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_server_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port=port)
Expand All @@ -110,7 +110,7 @@ def test_close_server_first() -> None:
assert not server.is_open


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_client_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down Expand Up @@ -140,7 +140,7 @@ def test_close_client_connection_first() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_close_server_connection_first() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down Expand Up @@ -171,7 +171,7 @@ def test_close_server_connection_first() -> None:
assert not client.is_connected


@pytest.mark.networktest()
@pytest.mark.networktest
def test_server_with_two_connected_clients() -> None:
port: int = random_port()
server: HelloServer = HelloServer(port)
Expand Down
Loading