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

Fix ruff linting issue UP007: Using | for type annotations #1554

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

berroar
Copy link
Contributor

@berroar berroar commented Nov 22, 2024

What is the context of this PR?

Fixes all instances of the ruff linting issue UP007. This is where we have been using Optional[A] and Union[A, B] where we should be using A | None or A | B.

The only exception is where we have type aliases using types in "". We can't use | so these lines have been ignored.

How to review

Check all instances are fixed and that there are no linting errors.

Checklist

  • New static content marked up for translation
  • Newly defined schema content included in eq-translations repo

Copy link
Contributor

@petechd petechd left a comment

Choose a reason for hiding this comment

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

So many outdated type hints! I swear we had a ticket to fix those.

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