[ 
https://issues.apache.org/jira/browse/BEAM-8739?focusedWorklogId=371193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-371193
 ]

ASF GitHub Bot logged work on BEAM-8739:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Jan/20 23:27
            Start Date: 13/Jan/20 23:27
    Worklog Time Spent: 10m 
      Work Description: ibzib commented on pull request #10149: [BEAM-8739] 
Consistently use with Pipeline(...) syntax
URL: https://github.com/apache/beam/pull/10149#discussion_r366072456
 
 

 ##########
 File path: sdks/python/apache_beam/examples/snippets/snippets.py
 ##########
 @@ -111,30 +111,30 @@ def filter_words(unused_x):
   import apache_beam as beam
   from apache_beam.options.pipeline_options import PipelineOptions
 
-  p = beam.Pipeline(options=PipelineOptions())
-  # [END pipelines_constructing_creating]
+  with beam.Pipeline(options=PipelineOptions()) as p:
 
 Review comment:
   This will appear as a `with` statement without a body. Maybe we should add a 
`pass # your code here` or something?
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 371193)
    Time Spent: 1h 10m  (was: 1h)

> Consistently use with Pipeline(...) syntax
> ------------------------------------------
>
>                 Key: BEAM-8739
>                 URL: https://issues.apache.org/jira/browse/BEAM-8739
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core
>            Reporter: Robert Bradshaw
>            Assignee: Robert Bradshaw
>            Priority: Major
>          Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> I've run into a couple of tests that forgot to do p.run(). In addition, I'm 
> seeing new tests written in this old style. We should consistently use the 
> with syntax where possible for our examples and tests. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to