-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Context
We are not using the modern annotation recommended in PEP 604. Ruff format even has a rule and autofix for this. https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/
Definition of done
Apply ruff-formatting throughout.
What must be done to consider the task complete?
Make sure all unit tests, and mypy tests, pass.
Pitfalls
None
- duplicates
-
PYTHON-6228 Enable ruff rules UP007 and UP045 to use `|` instead of Union and Optional
-
- Closed
-
- is duplicated by
-
PYTHON-4225 Type Hints in Stub Files: Convert Optional[d] to d | None
-
- Closed
-
- is related to
-
MOTOR-1249 Type Hints in Stub Files: Convert Optional[d] to d | None
-
- Backlog
-