Navigation Menu

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

Deprecate @rule(...) in favor of @rule #8360

Merged
merged 3 commits into from Sep 29, 2019

Conversation

Eric-Arellano
Copy link
Contributor

Implements #8338.

Copy link
Member

@jsirois jsirois 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 finishing this off.

empty_value=inspect.Signature.empty,
raise_type=MissingReturnTypeAnnotation

if len(args) != 1 and not inspect.isfunction(args[0]):
Copy link
Member

@jsirois jsirois Sep 29, 2019

Choose a reason for hiding this comment

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

I know you like this style. In this case though you're thrashing code just laid down. Did I violate a style guide? If so - all good. If not, seems worth establishing this there or thinking 2x before doing it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, looks like our style guide is silent on this style of early returns / inverted conditionals: https://www.pantsbuild.org/styleguide.html

Noted for the future about not whimsically changing it. Lmk if you'd like me to change back here - happy to.

@Eric-Arellano Eric-Arellano merged commit b7fa166 into pantsbuild:master Sep 29, 2019
@Eric-Arellano Eric-Arellano deleted the finish-typing-rules branch September 29, 2019 04:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants