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}

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.