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 #34

Merged
merged 2 commits into from
Oct 22, 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.1
rev: v0.7.0
hooks:
- id: ruff
args: [ --fix ]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_elements.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


class TestQ4ElementK:
@pytest.fixture()
@pytest.fixture
def q4element_k_instance(self):
return Q4Element_K(e=1.0, nu=1 / 3, dx=0.5, dy=0.5)

Expand All @@ -16,7 +16,7 @@ def test_element(self, q4element_k_instance):


class TestQ4ElementT:
@pytest.fixture()
@pytest.fixture
def q4element_t_instance(self):
return Q4Element_T(k=1.0, dx=0.5, dy=0.5)

Expand Down
10 changes: 5 additions & 5 deletions tests/test_fea2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
from tofea.fea2d import FEA2D_K, FEA2D_T


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523523
return np.random.default_rng(seed)


class TestFEA2DK:
@pytest.fixture()
@pytest.fixture
def fea2d_k_instance(self):
fixed = np.zeros((5, 5, 2), dtype=bool)
fixed[0] = 1
return FEA2D_K(fixed)

@pytest.fixture()
@pytest.fixture
def x_and_b(self, fea2d_k_instance, rng):
x = rng.random(fea2d_k_instance.shape)
b = rng.random(fea2d_k_instance.fixed.shape)
Expand Down Expand Up @@ -68,13 +68,13 @@ def test_compliance_grads(self, fea2d_k_instance, x_and_b, rng):


class TestFEA2DT:
@pytest.fixture()
@pytest.fixture
def fea2d_t_instance(self):
fixed = np.zeros((5, 5), dtype=bool)
fixed[0, 0] = 1
return FEA2D_T(fixed)

@pytest.fixture()
@pytest.fixture
def x_and_b(self, fea2d_t_instance, rng):
x = rng.random(fea2d_t_instance.shape)
b = rng.random(fea2d_t_instance.fixed.shape)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from tofea.solvers import get_solver


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523525
return np.random.default_rng(seed)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tofea.solvers import get_solver


@pytest.fixture()
@pytest.fixture
def rng():
seed = 36523525
return np.random.default_rng(seed)
Expand Down
Loading