Skip to content

Conversation

@cclauss
Copy link

@cclauss cclauss commented Aug 24, 2018

What changes were proposed in this pull request?

Prevent linters from raising undefined name '__version__' by initializing the variable before setting it via a call to exec(). This is the last remaining issue related to the work done in #20838

How was this patch tested?

  • $ python2 -m flake8 . --count --select=E9,F82 --show-source --statistics
  • $ python3 -m flake8 . --count --select=E9,F82 --show-source --statistics

Please review http://spark.apache.org/contributing.html before opening a pull request.

Prevent linters from raising __undefined name '\_\_version\_\_'__ by initializing the variable before setting it via a call to __exec()__.  This is the last remaining issue related to the work done in apache#20838
@holdenk
Copy link
Contributor

holdenk commented Aug 24, 2018

Jenkins, ok to test.
LGTM pending Jenkins.
We should add a follow up to add these linter rules to ./dev/lint-python

@HyukjinKwon
Copy link
Member

It should have been better fixed together rather then 3 PRs to fix the same instances.

@HyukjinKwon
Copy link
Member

ok to test

file=sys.stderr)
sys.exit(-1)

__version__ = "Unknown" # Prevent linters from raising 'undefined name'
Copy link
Member

Choose a reason for hiding this comment

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

Shall we simply noqa for VERSION = __version__? looks weird we have a version defined as Unknown to fix lint errors.

@cclauss cclauss closed this Aug 25, 2018
@cclauss cclauss deleted the patch-1 branch August 25, 2018 05:19
@SparkQA
Copy link

SparkQA commented Aug 25, 2018

Test build #95243 has finished for PR 22214 at commit a077542.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

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.

4 participants