Skip to content
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

Merged
merged 3 commits into from Apr 27, 2021
Merged

Conversation

lisroach
Copy link
Contributor

@lisroach lisroach commented Apr 22, 2021

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

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 22, 2021
@thatch
Copy link
Contributor

thatch commented Apr 23, 2021

Consider updating requirements.txt to also depend on libcst>=0.3.18, where this name was added.

Comment on lines 177 to 179
if isinstance(replacement_node, cst.RemovalSentinel):
if isinstance(replacement_node, cst.RemovalSentinel) or isinstance(
replacement_node, cst.FlattenSentinel
):
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@jimmylai jimmylai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@jimmylai jimmylai merged commit b2fd854 into Instagram:master Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants