New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sentinel type error #187
Sentinel type error #187
Conversation
Consider updating requirements.txt to also depend on libcst>=0.3.18, where this name was added. |
fixit/common/autofix.py
Outdated
if isinstance(replacement_node, cst.RemovalSentinel): | ||
if isinstance(replacement_node, cst.RemovalSentinel) or isinstance( | ||
replacement_node, cst.FlattenSentinel | ||
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox -e autofix
should fix the lint warning on this line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add python -m fixit.cli.apply_fix {posargs:.}
to the autofix target and then run it?
https://github.com/Instagram/Fixit/blob/master/tox.ini#L28-L34
That can make future development easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tox -e autofix
actually does not fix this line, which is strange. I'll update it by hand and add it to the tox.ini
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!
Summary
Pyre is broken on master due to changes in the latest version of LibCST. This fixes by adding
cst.FlattenSentinel
to some function calls.#186
Test Plan
pyre --preserve-pythonpath check