Repository: spark
Updated Branches:
  refs/heads/master ad43e2c1e -> 5cdb8a23d


[SPARK-23698][PYTHON][FOLLOWUP] Resolve undefiend names in setup.py

## What changes were proposed in this pull request?

`__version__` in `setup.py` is currently being dynamically read by `exec`; so 
the linter complains. Better just switch it off for this line for now.

**Before:**

```bash
$ python -m flake8 . --count --select=E9,F82 --show-source --statistics
./setup.py:37:11: F821 undefined name '__version__'
VERSION = __version__
          ^
1     F821 undefined name '__version__'
1
```

**After:**

```bash
$ python -m flake8 . --count --select=E9,F82 --show-source --statistics
0
```

## How was this patch tested?

Manually tested.

Closes #22235 from HyukjinKwon/SPARK-23698.

Authored-by: hyukjinkwon <[email protected]>
Signed-off-by: hyukjinkwon <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/5cdb8a23
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/5cdb8a23
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/5cdb8a23

Branch: refs/heads/master
Commit: 5cdb8a23df6f269d6be0bf3536e9af9e29c4a05f
Parents: ad43e2c
Author: hyukjinkwon <[email protected]>
Authored: Mon Aug 27 10:02:31 2018 +0800
Committer: hyukjinkwon <[email protected]>
Committed: Mon Aug 27 10:02:31 2018 +0800

----------------------------------------------------------------------
 python/setup.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/5cdb8a23/python/setup.py
----------------------------------------------------------------------
diff --git a/python/setup.py b/python/setup.py
index 45eb74e..c447f2d 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -34,7 +34,7 @@ except IOError:
     print("Failed to load PySpark version file for packaging. You must be in 
Spark's python dir.",
           file=sys.stderr)
     sys.exit(-1)
-VERSION = __version__
+VERSION = __version__  # noqa
 # A temporary path so we can access above the Python project root and fetch 
scripts and jars we need
 TEMP_PATH = "deps"
 SPARK_HOME = os.path.abspath("../")


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to