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

Improve static typing #1021

Merged
merged 5 commits into from
Jul 25, 2024
Merged

Improve static typing #1021

merged 5 commits into from
Jul 25, 2024

Conversation

jdknight
Copy link
Member

  • adjust various module-check flags
  • drop supported image types class
  • add type hints
  • tox: default run mypy
  • workflows: add an mypy environment run

jdknight added 5 commits July 24, 2024 23:51
Updating checks for certain modules to have a dedicated boolean flag
over mixing a module/None type. This is a bit more explicit and also
helps avoid some static type checks.

Signed-off-by: James Knight <[email protected]>
There is no major advantage of defining a `ConfluenceSupportedImages`
helper class versus just attaching the supported images list to the
builder. This change helps use a type that matches the expected type
defined by Sphinx.

Signed-off-by: James Knight <[email protected]>
Adding a series of type hints into the extension's implementation. This
is an initial set of updates which corrects reports from a mypy run.

Signed-off-by: James Knight <[email protected]>
Attempt to improve static type checks by adding mypy to the default
environment set.

Signed-off-by: James Knight <[email protected]>
Adding a job dedicated to running mypy checks.

Signed-off-by: James Knight <[email protected]>
@jdknight jdknight merged commit 0633ad7 into main Jul 25, 2024
28 checks passed
@jdknight jdknight deleted the static-typing branch July 25, 2024 04:23
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.

1 participant