Skip to content

Commit 3ebbfc4

Browse files
Copilottausbn
andauthored
Python: Sort attributes in unknown-field diagnostics
Co-authored-by: tausbn <1104778+tausbn@users.noreply.github.com>
1 parent 76015a7 commit 3ebbfc4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎python/extractor/semmle/python/parser/tsg_parser.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def parse(path, logger):
364364
if field.startswith("_"): continue
365365
if field == "ctx": continue
366366
if field != "parenthesised" and field not in expected_fields:
367-
logger.warning("Unknown field {} found among {} in node {}\n".format(field, attrs, id))
367+
logger.warning("Unknown field {} found among {} in node {}\n".format(field, _format_node_attributes(attrs), id))
368368

369369
# For fields that point to other AST nodes.
370370
if isinstance(val, Node):

0 commit comments

Comments
 (0)