Write union types as X | Y where possible (#19111)

aka PEP 604, added in Python 3.10
This commit is contained in:
Andrew Ferrazzutti
2025-11-06 15:02:33 -05:00
committed by GitHub
parent 6790312831
commit fcac7e0282
465 changed files with 4034 additions and 4555 deletions

View File

@@ -22,7 +22,6 @@ import logging
import logging.config
import warnings
from io import StringIO
from typing import Optional
from unittest.mock import Mock
from pyperf import perf_counter
@@ -58,7 +57,7 @@ class LineCounter(LineOnlyReceiver):
class Factory(ServerFactory):
protocol = LineCounter
wait_for: int
on_done: Optional[Deferred]
on_done: Deferred | None
async def main(reactor: ISynapseReactor, loops: int) -> float: