D5844: check-py3-compat: provide filename to ast.parse()

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Mon Feb 4 18:38:12 EST 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG01417ca7f2e2: check-py3-compat: provide filename to ast.parse() (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5844?vs=13771&id=13798

REVISION DETAIL
  https://phab.mercurial-scm.org/D5844

AFFECTED FILES
  contrib/check-py3-compat.py

CHANGE DETAILS

diff --git a/contrib/check-py3-compat.py b/contrib/check-py3-compat.py
--- a/contrib/check-py3-compat.py
+++ b/contrib/check-py3-compat.py
@@ -45,7 +45,7 @@
         content = fh.read()
 
     try:
-        ast.parse(content)
+        ast.parse(content, filename=f)
     except SyntaxError as e:
         print('%s: invalid syntax: %s' % (f, e))
         return



To: indygreg, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list