Skip to content
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

[Subtask] Add auto formatter for client-python #3206

Closed
noidname01 opened this issue Apr 29, 2024 · 0 comments · Fixed by #3254
Closed

[Subtask] Add auto formatter for client-python #3206

noidname01 opened this issue Apr 29, 2024 · 0 comments · Fixed by #3254
Assignees
Labels
subtask Subtasks of umbrella issue

Comments

@noidname01
Copy link
Collaborator

Describe the subtask

  • There is no any auto formatter for client-python, we should add one and integrate it into git pre-commit hook, to make sure coding style is always followed.

Parent issue

#2590

@noidname01 noidname01 added the subtask Subtasks of umbrella issue label Apr 29, 2024
@noidname01 noidname01 changed the title [Subtask] Add auto formatter and pre-commit hook for client-python [Subtask] Add auto formatter for client-python May 2, 2024
xunliu pushed a commit that referenced this issue May 10, 2024
### What changes were proposed in this pull request?

* Add Black as code formatter, it enforce the coding style with 
	1. trailing commas and whitespaces
	2. unified quotation marks(")
	3. new lines
	4. max line length
	5. indents
* Aligned with Pylint Rules
* Add Black into Gradle and form a code formatting pipeline (pipInstall
-> Black -> Pylint), this pipeline will run implicitly in `build` and
`test` gradle tasks.

> Note that Black still can't format long entire string exceeding `max
line length` without enabling unstable features, please handle long
strings with caution and make Pylint to ignore them if they are really
necessary.

### Why are the changes needed?

Fix: #3206, #3203 

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

No

### How was this patch tested?

No

---------

Co-authored-by: TimWang <tim.wang@pranaq.com>
noidname01 added a commit to noidname01/gravitino that referenced this issue May 10, 2024
…pache#3254)

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

* Add Black as code formatter, it enforce the coding style with 
	1. trailing commas and whitespaces
	2. unified quotation marks(")
	3. new lines
	4. max line length
	5. indents
* Aligned with Pylint Rules
* Add Black into Gradle and form a code formatting pipeline (pipInstall
-> Black -> Pylint), this pipeline will run implicitly in `build` and
`test` gradle tasks.

> Note that Black still can't format long entire string exceeding `max
line length` without enabling unstable features, please handle long
strings with caution and make Pylint to ignore them if they are really
necessary.

### Why are the changes needed?

Fix: apache#3206, apache#3203 

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

No

### How was this patch tested?

No

---------

Co-authored-by: TimWang <tim.wang@pranaq.com>
jerryshao pushed a commit that referenced this issue May 10, 2024
#3325)

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

* Add Black as code formatter, it enforce the coding style with 
	1. trailing commas and whitespaces
	2. unified quotation marks(")
	3. new lines
	4. max line length
	5. indents
* Aligned with Pylint Rules
* Add Black into Gradle and form a code formatting pipeline (pipInstall
-> Black -> Pylint), this pipeline will run implicitly in `build` and
`test` gradle tasks.

> Note that Black still can't format long entire string exceeding `max
line length` without enabling unstable features, please handle long
strings with caution and make Pylint to ignore them if they are really
necessary.

### Why are the changes needed?

Fix: #3206, #3203 

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

No

### How was this patch tested?

No

Co-authored-by: TimWang <tim.wang@pranaq.com>
diqiu50 pushed a commit to diqiu50/gravitino that referenced this issue Jun 13, 2024
…pache#3254)

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

* Add Black as code formatter, it enforce the coding style with 
	1. trailing commas and whitespaces
	2. unified quotation marks(")
	3. new lines
	4. max line length
	5. indents
* Aligned with Pylint Rules
* Add Black into Gradle and form a code formatting pipeline (pipInstall
-> Black -> Pylint), this pipeline will run implicitly in `build` and
`test` gradle tasks.

> Note that Black still can't format long entire string exceeding `max
line length` without enabling unstable features, please handle long
strings with caution and make Pylint to ignore them if they are really
necessary.

### Why are the changes needed?

Fix: apache#3206, apache#3203 

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

No

### How was this patch tested?

No

---------

Co-authored-by: TimWang <tim.wang@pranaq.com>
coolderli pushed a commit that referenced this issue Dec 17, 2024
### What changes were proposed in this pull request?

* Add Black as code formatter, it enforce the coding style with
	1. trailing commas and whitespaces
	2. unified quotation marks(")
	3. new lines
	4. max line length
	5. indents
* Aligned with Pylint Rules
* Add Black into Gradle and form a code formatting pipeline (pipInstall
-> Black -> Pylint), this pipeline will run implicitly in `build` and
`test` gradle tasks.

> Note that Black still can't format long entire string exceeding `max
line length` without enabling unstable features, please handle long
strings with caution and make Pylint to ignore them if they are really
necessary.

### Why are the changes needed?

Fix: #3206, #3203

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

No

### How was this patch tested?

No

---------

Co-authored-by: TimWang <tim.wang@pranaq.com>
(cherry picked from commit a88a361)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
subtask Subtasks of umbrella issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants