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

Enable ignore-without-code mypy error code #18898

Merged
merged 1 commit into from
Sep 26, 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 lib/galaxy/celery/base_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class GalaxyTaskBeforeStartUserRateLimitPostgres(GalaxyTaskBeforeStartUserRateLi
We take advantage of efficiencies in its dialect.
"""

def calculate_task_start_time( # type: ignore
def calculate_task_start_time(
self, user_id: int, sa_session: galaxy_scoped_session, task_interval_secs: float, now: datetime.datetime
) -> datetime.datetime:
with transaction(sa_session):
Expand Down
2 changes: 1 addition & 1 deletion lib/galaxy/schema/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -3338,7 +3338,7 @@ class HDACustom(HDADetailed):
# TODO: Fix this workaround for partial_model not supporting UUID fields for some reason.
# The error otherwise is: `PydanticUserError: 'UuidVersion' cannot annotate 'nullable'.`
# Also ignoring mypy complaints about the type redefinition.
uuid: Optional[UUID4] # type: ignore
uuid: Optional[UUID4] # type: ignore[assignment]

# Add fields that are not part of any view here
visualizations: Annotated[
Expand Down
6 changes: 3 additions & 3 deletions lib/galaxy/webapps/galaxy/api/history_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
List,
Literal,
Optional,
Set,
Union,
)

Expand Down Expand Up @@ -335,11 +336,10 @@ def parse_content_types(types: Union[List[str], str]) -> List[HistoryContentType
def parse_dataset_details(details: Optional[str]):
"""Parses the different values that the `dataset_details` parameter
can have from a string."""
dataset_details = None
if details is not None and details != "all":
dataset_details = set(util.listify(details))
dataset_details: Union[None, Set[str], str] = set(util.listify(details))
else: # either None or 'all'
dataset_details = details # type: ignore
dataset_details = details
return dataset_details


Expand Down
1 change: 1 addition & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[mypy]
enable_error_code = ignore-without-code
plugins = pydantic.mypy
show_error_codes = True
ignore_missing_imports = True
Expand Down
4 changes: 2 additions & 2 deletions tools/filters/sff_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
fake_sff_name = "fake_sff_name"

# readname as key: lines with matches from SSAHA, one best match
ssahapematches = {} # type: ignore
ssahapematches = {} # type: ignore[var-annotated]
# linker readname as key: length of linker sequence
linkerlengths = {} # type: ignore
linkerlengths = {} # type: ignore[var-annotated]

# set to true if something really fishy is going on with the sequences
stern_warning = False
Expand Down
Loading