]> git.ipfire.org Git - thirdparty/bind9.git/commit
Replace Optional["T"] with "T | None"
authorŠtěpán Balážik <stepan@isc.org>
Fri, 20 Feb 2026 14:03:16 +0000 (15:03 +0100)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 20 Feb 2026 14:17:32 +0000 (15:17 +0100)
commit1d5924c82fcf8f55d339bbf0a40c31e5f10c635e
tree008fcf8d8167e51d9795358fe104ade784a24b10
parentfe38515ad064637957e1e6e55ed91ed8cb3f8dc4
Replace Optional["T"] with "T | None"

In Python 3.10 strings don't support the | operator, so ruff doesn't
attempt to fix these. Quote the entire type specification to avoid the
typing.Optional import.

Alternatives I considered:
- leaving it as is (only use of Optional in the code base)
- using `from future import __annotations__` (replacing one import with
  another one)
bin/tests/system/bailiwick/bailiwick_ans.py