Skip to content

Commit

Permalink
moved lint flags so linting works
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanhausen committed Jun 5, 2024
1 parent 66b5ffc commit 8dafb68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 1 addition & 3 deletions biodb/apps/catalog/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from catalog.models import Dataset
from django.contrib.auth import get_user_model
from django.core.management import call_command
from uploader.tests.conftest import (
from uploader.tests.conftest import ( # noqa: F401
SimpleQueryFactory,
array_measurement_types,
bio_sample_types,
Expand All @@ -13,8 +13,6 @@
observables,
sql_views,
)

# noqa: F401
from user.models import Center as UserCenter

User = get_user_model()
Expand Down
10 changes: 4 additions & 6 deletions biodb/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,11 @@
EXPLORER_DEFAULT_CONNECTION = "bsr"

# Note: The following perms are duplicated in biodb.urls.
EXPLORER_PERMISSION_VIEW = lambda r: (
r.user.is_active # noqa: E731
and r.user.is_staff
EXPLORER_PERMISSION_VIEW = lambda r: ( # noqa: E731
r.user.is_active and r.user.is_staff
) and (r.user.is_sqluser_view or r.user.is_sqluser_change or r.user.is_superuser)
EXPLORER_PERMISSION_CHANGE = lambda r: (
r.user.is_active # noqa: E731
and r.user.is_staff
EXPLORER_PERMISSION_CHANGE = lambda r: ( # noqa: E731
r.user.is_active and r.user.is_staff
) and (r.user.is_sqluser_change or r.user.is_superuser)

EXPLORER_DEFAULT_ROWS = 1000
Expand Down

0 comments on commit 8dafb68

Please sign in to comment.