Skip to content
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 app/cli/curation/electrical_cell_recording.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def curate_assets(
assets_dict: dict[ContentType, Asset] = {k: v[0] for k, v in assets.items()}
# Multiple assets: keep the nwb one if any.
if len(assets_dict) > 1:
if asset := assets_dict.get(ContentType.nwb, None):
if asset := assets_dict.get(ContentType.nwb):
msg = (
f"Multiple assets {sorted(assets_dict.keys())} for ElectricalCellRecording. "
f"{ContentType.nwb} was kept."
Expand Down
1 change: 0 additions & 1 deletion app/routers/emodel.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from fastapi import APIRouter

import app.service.electrical_cell_recording
import app.service.emodel
from app.routers.admin import router as admin_router

Expand Down
4 changes: 2 additions & 2 deletions app/routers/legacy/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def get_facets(aggs, musts, db_type, db):
models.append(aliased(db_type))
cur_alias = aliased(next(iter(models)))
initial_alias = cur_alias
property_group = PROPERTY_MAP.get(f"{target}.{property_}", None)
property_group = PROPERTY_MAP.get(f"{target}.{property_}")
facet_q = db.query(getattr(initial_alias, property_group), func.count().label("count"))
for model, join in zip(models[1:], joins, strict=False):
prev_alias = cur_alias
Expand Down Expand Up @@ -255,7 +255,7 @@ def add_predicates_to_query(query, must_terms, db_type, alias=None): # noqa: C9
cur_alias = initial_alias
else:
query_map = QUERY_PATH.get(target)
property_ = PROPERTY_MAP.get(f"{target}.{property_}", None)
property_ = PROPERTY_MAP.get(f"{target}.{property_}")
if not query_map or not property_:
raise HTTPException(
status_code=500,
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ builtins-ignorelist = ["license"]
"S101", # Use of `assert` detected
"SLF001", # private member access
]
"app/db/model.py" = [
"A003", # builtin-attribute-shadowing
]

[tool.ruff.lint.pydocstyle]
convention = "google"
Expand Down
Loading