Skip to content

Commit 4981462

Browse files
committed
Adjust script to cope with warning statement
1 parent ec114a8 commit 4981462

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
@@ -113,6 +113,10 @@ def traverse_ast(ast):
113113
def method_locations(path):
114114
from dml.toplevel import parse_file, determine_version
115115
from dml import logging, messages
116+
import dml.globals
117+
from dml import compat
118+
# needed to parse 1.2/utility.dml
119+
dml.globals.enabled_compat.add(compat.warning_statement)
116120
for warning in messages.warnings:
117121
logging.ignore_warning(warning)
118122

0 commit comments

Comments
 (0)