Skip to content

[SPARK-41865][INFRA][3.2] Use pycodestyle to 2.7.0 to fix pycodestyle errors #39374

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

Closed
wants to merge 1 commit into from
Closed

Conversation

dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jan 4, 2023

What changes were proposed in this pull request?

branch-3.2 has been broken for a while with false-positive failures.

pycodestyle checks failed:
./python/pyspark/broadcast.py:102:23: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_context.py:166:19: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_pandas_udf_grouped_agg.py:512:15: E275 missing whitespace after keyword
./python/pyspark/sql/pandas/conversion.py:174:20: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:662:60: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:694:60: E275 missing whitespace after keyword
./python/pyspark/ml/tests/test_tuning.py:203:23: E275 missing whitespace after keyword
./python/pyspark/worker.py:583:27: E275 missing whitespace after keyword
Error: Process completed with exit code 1.

Why are the changes needed?

To fix pycodestyle. Apache Spark expects 2.7.0 like the following.

MINIMUM_PYCODESTYLE="2.7.0"

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass pycodestyle.

Screenshot 2023-01-03 at 5 20 57 PM

@github-actions github-actions bot added the INFRA label Jan 4, 2023
@dongjoon-hyun
Copy link
Member Author

dongjoon-hyun commented Jan 4, 2023

Thank you, @HyukjinKwon . Although I checked this locally, I'll merge this after pycodestyle passes in CI.
After this PR, I'll try to fix mypy failures too in a separate PR.

@dongjoon-hyun
Copy link
Member Author

Oh, in CIs, all linters passed. I'll update the PR description and merge this.

Screenshot 2023-01-03 at 5 20 57 PM

dongjoon-hyun added a commit that referenced this pull request Jan 4, 2023
… errors

### What changes were proposed in this pull request?

`branch-3.2` has been broken for a while with false-positive failures.
- https://github.com/apache/spark/actions/runs/3833643461/jobs/6525303096
```
pycodestyle checks failed:
./python/pyspark/broadcast.py:102:23: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_context.py:166:19: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_pandas_udf_grouped_agg.py:512:15: E275 missing whitespace after keyword
./python/pyspark/sql/pandas/conversion.py:174:20: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:662:60: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:694:60: E275 missing whitespace after keyword
./python/pyspark/ml/tests/test_tuning.py:203:23: E275 missing whitespace after keyword
./python/pyspark/worker.py:583:27: E275 missing whitespace after keyword
Error: Process completed with exit code 1.
```

### Why are the changes needed?

To fix `pycodestyle`.  Apache Spark expects `2.7.0` like the following.

https://github.com/apache/spark/blob/ad2d42709abfc8f8ad27f836c811a4b75ef32ee9/dev/lint-python#L25

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass `pycodestyle`.

![Screenshot 2023-01-03 at 5 20 57 PM](https://user-images.githubusercontent.com/9700541/210467357-63626c33-966d-44cb-876e-933499f086ad.png)

Closes #39374 from dongjoon-hyun/SPARK-41865.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
@dongjoon-hyun dongjoon-hyun deleted the SPARK-41865 branch January 4, 2023 01:22
@dongjoon-hyun
Copy link
Member Author

It seems that SparkR has new issues.

R doc generation failed (RuntimeError)

sunchao pushed a commit to sunchao/spark that referenced this pull request Jun 2, 2023
… errors

### What changes were proposed in this pull request?

`branch-3.2` has been broken for a while with false-positive failures.
- https://github.com/apache/spark/actions/runs/3833643461/jobs/6525303096
```
pycodestyle checks failed:
./python/pyspark/broadcast.py:102:23: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_context.py:166:19: E275 missing whitespace after keyword
./python/pyspark/sql/tests/test_pandas_udf_grouped_agg.py:512:15: E275 missing whitespace after keyword
./python/pyspark/sql/pandas/conversion.py:174:20: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:662:60: E275 missing whitespace after keyword
./python/pyspark/sql/readwriter.py:694:60: E275 missing whitespace after keyword
./python/pyspark/ml/tests/test_tuning.py:203:23: E275 missing whitespace after keyword
./python/pyspark/worker.py:583:27: E275 missing whitespace after keyword
Error: Process completed with exit code 1.
```

### Why are the changes needed?

To fix `pycodestyle`.  Apache Spark expects `2.7.0` like the following.

https://github.com/apache/spark/blob/ad2d42709abfc8f8ad27f836c811a4b75ef32ee9/dev/lint-python#L25

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass `pycodestyle`.

![Screenshot 2023-01-03 at 5 20 57 PM](https://user-images.githubusercontent.com/9700541/210467357-63626c33-966d-44cb-876e-933499f086ad.png)

Closes apache#39374 from dongjoon-hyun/SPARK-41865.

Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
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