Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
chore(linting): don't require parentheses after pytest.fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
c0rydoras committed Apr 17, 2024
1 parent 62cdf0f commit 41bae8c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
5 changes: 4 additions & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,7 @@ combine-as-imports = true
ignore-fully-untyped = true

[lint.flake8-unused-arguments]
ignore-variadic-names = true
ignore-variadic-names = true

[lint.flake8-pytest-style]
fixture-parentheses = false
22 changes: 11 additions & 11 deletions timed/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def register_module(module):
register_module(tracking_factories)


@pytest.fixture()
@pytest.fixture
def auth_user(db):
return get_user_model().objects.create_user(
username="user",
Expand All @@ -37,7 +37,7 @@ def auth_user(db):
)


@pytest.fixture()
@pytest.fixture
def admin_user(db):
return get_user_model().objects.create_user(
username="admin",
Expand All @@ -49,7 +49,7 @@ def admin_user(db):
)


@pytest.fixture()
@pytest.fixture
def superadmin_user(db):
return get_user_model().objects.create_user(
username="superadmin",
Expand All @@ -61,7 +61,7 @@ def superadmin_user(db):
)


@pytest.fixture()
@pytest.fixture
def external_employee(db):
user = get_user_model().objects.create_user(
username="user",
Expand All @@ -75,7 +75,7 @@ def external_employee(db):
return user


@pytest.fixture()
@pytest.fixture
def internal_employee(db):
user = get_user_model().objects.create_user(
username="user",
Expand All @@ -90,12 +90,12 @@ def internal_employee(db):
return user


@pytest.fixture()
@pytest.fixture
def client():
return APIClient()


@pytest.fixture()
@pytest.fixture
def auth_client(auth_user):
"""Return instance of a APIClient that is logged in as test user."""
client = APIClient()
Expand All @@ -104,7 +104,7 @@ def auth_client(auth_user):
return client


@pytest.fixture()
@pytest.fixture
def admin_client(admin_user):
"""Return instance of a APIClient that is logged in as a staff user."""
client = APIClient()
Expand All @@ -113,7 +113,7 @@ def admin_client(admin_user):
return client


@pytest.fixture()
@pytest.fixture
def superadmin_client(superadmin_user):
"""Return instance of a APIClient that is logged in as superuser."""
client = APIClient()
Expand All @@ -122,7 +122,7 @@ def superadmin_client(superadmin_user):
return client


@pytest.fixture()
@pytest.fixture
def external_employee_client(external_employee):
"""Return instance of a APIClient that is logged in as external test user."""
client = APIClient()
Expand All @@ -131,7 +131,7 @@ def external_employee_client(external_employee):
return client


@pytest.fixture()
@pytest.fixture
def internal_employee_client(internal_employee):
"""Return instance of a APIClient that is logged in as external test user."""
client = APIClient()
Expand Down

0 comments on commit 41bae8c

Please sign in to comment.