Skip to content

Commit 28ab2d9

Browse files
authored
Merge pull request #7 from adamchainz/issue_6_yaml.parse
Use yaml.parse to allow special YAML tags
2 parents b3fd53e + f4b9ed5 commit 28ab2d9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

linter.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ def check(self, code, filename):
3232
yaml = self.module
3333

3434
try:
35-
for x in yaml.safe_load_all(code):
36-
# exhausting generator so all documents are checked
37-
pass
35+
list(yaml.parse(code, Loader=yaml.BaseLoader))
3836
except yaml.error.YAMLError as exc:
3937
if persist.settings.get('debug'):
4038
persist.printf('{} - {} : {}'.format(self.name, type(exc), exc))

0 commit comments

Comments
 (0)