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

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

                Author: ASF GitHub Bot
            Created on: 10/Jul/18 05:59
            Start Date: 10/Jul/18 05:59
    Worklog Time Spent: 10m 
      Work Description: cclauss closed pull request #5901: [BEAM-3959] Add 
Python 3 undefined names to flake8
URL: https://github.com/apache/beam/pull/5901
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/sdks/python/scripts/run_mini_py3lint.sh 
b/sdks/python/scripts/run_mini_py3lint.sh
index 63e71771d73..0729c7ba2cf 100755
--- a/sdks/python/scripts/run_mini_py3lint.sh
+++ b/sdks/python/scripts/run_mini_py3lint.sh
@@ -48,5 +48,4 @@ if test $# -gt 0; then
 fi
 
 echo "Running flake8 for module $MODULE:"
-# TODO(BEAM-3959): Add F821 (undefined names) as soon as that test passes
-flake8 $MODULE --count --select=E9,F822,F823 --show-source --statistics
+flake8 $MODULE --count --select=E9,F821,F822,F823 --show-source --statistics


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 121239)
    Time Spent: 0.5h  (was: 20m)

> Eliminating Python "undefined names"
> ------------------------------------
>
>                 Key: BEAM-3959
>                 URL: https://issues.apache.org/jira/browse/BEAM-3959
>             Project: Beam
>          Issue Type: Bug
>          Components: sdk-py-core, sdk-py-harness
>            Reporter: cclauss
>            Priority: Minor
>   Original Estimate: 2m
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> My sense is that E901,E999,F821,F822,F823 are the "showstopper" flake8 issues 
> that can halt the runtime with a SyntaxError, NameError, etc. The other 
> flake8 issues are merely "style violations" -- useful for readability but 
> they do not effect runtime safety.
> Work done under https://issues.apache.org/jira/browse/BEAM-3738 has enabled 
> Jenkins to run linters on Python 3 code.  One of the advantages of the 
> *flake8* linter is that it can detect "undefined names" in Python code so it 
> has been added to the [Python 
> 2|https://github.com/apache/beam/tree/master/sdks/python/run_pylint.sh] and 
> [Python 
> 3|https://github.com/apache/beam/tree/master/sdks/python/run_mini_py3lint.sh] 
> test runs.
> https://github.com/apache/beam/pull/4798 currently lists 23 undefined names 
> when flake8 is run under Python 3.  Solutions to some of these undefined 
> names can be found in:
> * https://github.com/apache/beam/pull/4561
> * https://github.com/apache/beam/pull/4774
> * https://github.com/apache/beam/pull/4820
> Once the Beam codebase can pass a flake8 F821 test with no undefined names, 
> then F821 should be added to the the other "showstopper" issues as described 
> in https://github.com/apache/beam/pull/4798



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to