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

[BEAM-8280] no_annotations decorator #10904

Merged
merged 2 commits into from
Feb 20, 2020
Merged

[BEAM-8280] no_annotations decorator #10904

merged 2 commits into from
Feb 20, 2020

Conversation

udim
Copy link
Member

@udim udim commented Feb 19, 2020

Adds @decorators.no_annotations decorator to disable on a specific
function.

Split out of #10717


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

Post-Commit Tests Status (on master branch)

Lang SDK Apex Dataflow Flink Gearpump Samza Spark
Go Build Status --- --- Build Status --- --- Build Status
Java Build Status Build Status Build Status Build Status
Build Status
Build Status
Build Status Build Status Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
--- Build Status
Build Status
Build Status
Build Status
--- --- Build Status
XLang --- --- --- Build Status --- --- ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable Build Status Build Status
Build Status
Build Status Build Status
Portable --- Build Status --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

Adds `@decorators.no_annotations` decorator to disable on a specific
function.

Split out of apache#10717
@udim
Copy link
Member Author

udim commented Feb 19, 2020

R: @robertwb @kennknowles

@kennknowles kennknowles self-requested a review February 20, 2020 00:10
@@ -154,5 +156,23 @@ def fn(a, b=None, *args, foo, **kwargs):
decorators.getcallargs_forhints(fn, 5)


class DecoratorsTest(unittest.TestCase):
def test_no_annotations(self):
Copy link
Member

Choose a reason for hiding this comment

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

Better to split into three test methods.

Copy link
Member Author

Choose a reason for hiding this comment

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

It is one test. I'll rewrite it to make it clear. First it shows that the pipeline raises a TypeCheckError with annotations and then it shows no exceptions raised without them.

@udim udim merged commit a52f9b7 into apache:master Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants