PYTHON-6228ClosedDone
Enable ruff rules UP007 and UP045 to use `|` instead of Union and Optional
h3. *Context* Ruff's https://docs.astral.sh/ruff/rules/non-pep604-annotation-union/ and https://docs.astral.sh/ruff/rules/non-pep604-annotation-optional/ rules replace {{Union}} and {{Optional}} in type hints with {{|}} to improve readability. h3. *Definition of done* Remove the suppression of UP007 and UP045. h3. *Pitfalls* {color:#505f79}What should the implementer watch out for? What are the risks?{color}