aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast/interpreter.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/ast/interpreter.py')
-rw-r--r--mesonbuild/ast/interpreter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py
index a82ba5d..a75c0b7 100644
--- a/mesonbuild/ast/interpreter.py
+++ b/mesonbuild/ast/interpreter.py
@@ -22,7 +22,7 @@ from .. import environment
from ..interpreterbase import InvalidArguments, BreakRequest, ContinueRequest
import os, sys
-from typing import List
+from typing import List, Optional
class DontCareObject(interpreterbase.InterpreterObject):
pass
@@ -46,9 +46,9 @@ ADD_SOURCE = 0
REMOVE_SOURCE = 1
class AstInterpreter(interpreterbase.InterpreterBase):
- def __init__(self, source_root: str, subdir: str, visitors: List[AstVisitor] = []):
+ def __init__(self, source_root: str, subdir: str, visitors: Optional[List[AstVisitor]] = None):
super().__init__(source_root, subdir)
- self.visitors = visitors
+ self.visitors = visitors if visitors is not None else []
self.visited_subdirs = {}
self.assignments = {}
self.assign_vals = {}