summaryrefslogtreecommitdiffstats
path: root/SCons/Warnings.py
diff options
context:
space:
mode:
authorThaddeus Crews <repiteo@outlook.com>2024-11-13 19:10:12 (GMT)
committerThaddeus Crews <repiteo@outlook.com>2024-11-16 20:58:43 (GMT)
commit3829f4551edebee3e42864b19e6332b24af3eb93 (patch)
tree6ca07b12f8a14e705c00a198739d43cb46d6666e /SCons/Warnings.py
parentd1d5355b716644be649d99b16c6f2bf64e9f64e4 (diff)
downloadSCons-3829f4551edebee3e42864b19e6332b24af3eb93.zip
SCons-3829f4551edebee3e42864b19e6332b24af3eb93.tar.gz
SCons-3829f4551edebee3e42864b19e6332b24af3eb93.tar.bz2
Integrate `from __future__ import annotations`
Diffstat (limited to 'SCons/Warnings.py')
-rw-r--r--SCons/Warnings.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/SCons/Warnings.py b/SCons/Warnings.py
index d604659..b9f9cc1 100644
--- a/SCons/Warnings.py
+++ b/SCons/Warnings.py
@@ -61,8 +61,10 @@ Raising directly with an instance of a warning class bypasses the
framework and it will behave like an ordinary exception.
"""
+from __future__ import annotations
+
import sys
-from typing import Callable, Sequence, Optional
+from typing import Callable, Sequence
import SCons.Errors
@@ -75,7 +77,7 @@ _warningAsException: bool = False
# Function to emit the warning. Initialized by SCons/Main.py for regular use;
# the unit test will set to a capturing version for testing.
-_warningOut: Optional[Callable] = None
+_warningOut: Callable | None = None
class SConsWarning(SCons.Errors.UserError):