Skip to content

Add type annotations to most functions#1966

Merged
psavery merged 2 commits intomasterfrom
type-annotations
Feb 24, 2026
Merged

Add type annotations to most functions#1966
psavery merged 2 commits intomasterfrom
type-annotations

Conversation

@psavery
Copy link
Copy Markdown
Collaborator

@psavery psavery commented Feb 23, 2026

This adds type annotations and fixes mypy errors.

There are several places where Any is used where it doesn't actually need to be used, and a few places where # type: ignore is used as well, but overall, this is a substantial improvement over before, where there was no typing. We can fix some of the minor issues later.

This adds type annotations and fixes mypy errors.

There are several places where `Any` is used where it doesn't actually
need to be used, and a few places where `# type: ignore` is used as
well, but overall, this is a substantial improvement over before,
where there was no typing. We can fix some of the minor issues
later.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@psavery psavery requested a review from bnmajor February 23, 2026 21:43
Even though mypy thinks these should be bytes, they actually need
to be strings.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Copy link
Copy Markdown
Collaborator

@bnmajor bnmajor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me!

@psavery psavery merged commit 833d4aa into master Feb 24, 2026
10 checks passed
@psavery psavery deleted the type-annotations branch February 24, 2026 15:41
psavery added a commit that referenced this pull request Mar 3, 2026
This fixes an issue introduced in PR #1966

The masks having an empty string as the name meant that they were not saved.
We need to allow them to be `None` instead.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants