Skip to content

Commit 72156e4

Browse files
committed
Adjust script to cope with warning statement
1 parent bafcd6e commit 72156e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

py/dead_dml_methods.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ def traverse_ast(ast):
112112
def method_locations(path):
113113
from dml.toplevel import parse_file, determine_version
114114
from dml import logging, messages
115+
import dml.globals
116+
from dml import compat
117+
# needed to parse 1.2/utility.dml
118+
dml.globals.enabled_compat.add(compat.warning_statement)
115119
for warning in messages.warnings:
116120
logging.ignore_warning(warning)
117121

0 commit comments

Comments
 (0)