Skip to content

Commit

Permalink
Type-ignore mypy cases that are clearly false negatives
Browse files Browse the repository at this point in the history
This will likely be solved once we move remaining models to declarative
mapping.
  • Loading branch information
jdavcs committed Feb 7, 2024
1 parent 53a31c0 commit e0bd349
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ class History(Base, HasTags, Dictifiable, UsesAnnotations, HasName, Serializable
lambda: (
and_(
HistoryDatasetCollectionAssociation.history_id == History.id, # type: ignore[has-type]
not_(HistoryDatasetCollectionAssociation.deleted), # type: ignore[has-type]
not_(HistoryDatasetCollectionAssociation.deleted), # type: ignore[has-type, arg-type]
)
)
),
Expand All @@ -3042,7 +3042,7 @@ class History(Base, HasTags, Dictifiable, UsesAnnotations, HasName, Serializable
primaryjoin=(
lambda: and_(
HistoryDatasetCollectionAssociation.history_id == History.id, # type: ignore[has-type]
not_(HistoryDatasetCollectionAssociation.deleted), # type: ignore[has-type]
not_(HistoryDatasetCollectionAssociation.deleted), # type: ignore[has-type, arg-type]
HistoryDatasetCollectionAssociation.visible, # type: ignore[has-type]
)
),
Expand Down Expand Up @@ -3951,7 +3951,7 @@ class Dataset(Base, StorableObject, Serializable):
lambda: and_(
Dataset.id == HistoryDatasetAssociation.dataset_id, # type: ignore[attr-defined]
HistoryDatasetAssociation.deleted == false(), # type: ignore[has-type]
HistoryDatasetAssociation.purged == false(), # type: ignore[attr-defined]
HistoryDatasetAssociation.purged == false(), # type: ignore[attr-defined, arg-type]
)
),
viewonly=True,
Expand All @@ -3961,7 +3961,7 @@ class Dataset(Base, StorableObject, Serializable):
primaryjoin=(
lambda: and_(
Dataset.id == HistoryDatasetAssociation.dataset_id, # type: ignore[attr-defined]
HistoryDatasetAssociation.purged == true(), # type: ignore[attr-defined]
HistoryDatasetAssociation.purged == true(), # type: ignore[attr-defined, arg-type]
)
),
viewonly=True,
Expand Down Expand Up @@ -6034,7 +6034,9 @@ class LibraryInfoAssociation(Base, RepresentById):
library = relationship(
"Library",
primaryjoin=(
lambda: and_(LibraryInfoAssociation.library_id == Library.id, not_(LibraryInfoAssociation.deleted))
lambda: and_(
LibraryInfoAssociation.library_id == Library.id, not_(LibraryInfoAssociation.deleted)
) # type:ignore[arg-type]
),
)
template = relationship(
Expand Down Expand Up @@ -6331,7 +6333,7 @@ def attribute_columns(column_collection, attributes, nesting_level=None):
for entity in return_entities:
q = q.add_columns(entity)
if entity == DatasetCollectionElement:
q = q.filter(entity.id == dce.c.id)
q = q.filter(entity.id == dce.c.id) # type:ignore[arg-type]

q = q.order_by(*order_by_columns)
return q
Expand Down

0 comments on commit e0bd349

Please sign in to comment.