| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Please fix test failures.
|
Sorry, something went wrong.
|
Fixed lint failures (and missing annotation). |
Sorry, something went wrong.
| except SyntaxError as e: | ||
| if errors: | ||
| errors.set_file('<input>' if fnam is None else fnam) | ||
| errors.report(e.lineno, e.msg) # type: ignore |
There was a problem hiding this comment.
Remind me what we're ignoring here again?
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not sure what we were ignoring here before, because it works without it... except when I combine the except clauses. It looks like then it's taking the join of the two exceptions as the type of e (instead of the Union) and gives me:
mypy/fastparse.py:73: error: "Exception" has no attribute "lineno" mypy/fastparse.py:73: error: "Exception" has no attribute "msg"
Sorry, something went wrong.
There was a problem hiding this comment.
Perhaps related to #1610 (which hasn't been merged yet)?
Sorry, something went wrong.
There was a problem hiding this comment.
Yep! That PR (after it's fixed up a bit more) should fix this.
Sorry, something went wrong.
|
Looks okay, but I'll leave it up to @JukkaL to decide whether to merge this before or after the 0.4.2 release. |
Sorry, something went wrong.
|
Rebase on master and remove now-unnecessary # type: ignore |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Gives errors with the appropriate line number (instead of unhelpful stack traces) on syntax errors or invalid AST nodes in type comments. E.g.:
syntax error: x = None # type: a : b
invalid AST node: x = None # type: a + b