This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SUBMARINE-1008. Submarine python code formatter and linter
### What is this PR for? Currently, submarine python code format doesn't work well. 1. Replace `yapf` with `black` 2. Upgrade `isort` 3. Use `flake8` linter 4. Format the code in dev-support, submarine-sdk and website 5. Only check lint in dev-support, submarine-sdk since python code in website has its' style. (import not at top of file) 6. Update the SDK development guide ### What type of PR is it? [Improvement] ### Todos ### What is the Jira issue? https://issues.apache.org/jira/browse/SUBMARINE-1008 ### How should this be tested? I have updated the ci in GitHub Actions. ### Screenshots (if appropriate) Original `dev-support/style-check/python/lint.sh` result. I have fixed all of the errors in the below images ![螢幕擷取畫面 2021-09-06 094648](https://user-images.githubusercontent.com/38066413/132158081-bdcfe866-08b6-44fa-a5d2-23f9cec3aaa9.png) ![image](https://user-images.githubusercontent.com/38066413/132158044-ae18abed-469f-4cf9-a866-b0144a8f2698.png) ### Questions: * Do the license files need updating? No * Are there breaking changes for older versions? Yes * Does this need new documentation? Yes Author: KUAN-HSUN-LI <[email protected]> Signed-off-by: Kevin <[email protected]> Closes #736 from KUAN-HSUN-LI/SUBMARINE-1008 and squashes the following commits: 157ac0e [KUAN-HSUN-LI] SUBMARINE-1008. Remove useless file and update the 0.6.0 docs 633cdc1 [KUAN-HSUN-LI] add License 643bb94 [KUAN-HSUN-LI] SUBMARINE-1008. Update development guide 0638f67 [KUAN-HSUN-LI] SUBMARINE-1008. Update linter in ci 8892b26 [KUAN-HSUN-LI] SUBMARINE-1008. Update develop guide 4e086e8 [KUAN-HSUN-LI] SUBMARINE-1008. Format with isort and black. Check through flake8 7f679fd [KUAN-HSUN-LI] SUBMARINE-1008. Setup black, isort and flake8
- Loading branch information
1 parent
f621a32
commit 6fa91e3
Showing
121 changed files
with
4,640 additions
and
4,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one or more | ||
# contributor license agreements. See the NOTICE file distributed with | ||
# this work for additional information regarding copyright ownership. | ||
# The ASF licenses this file to You under the Apache License, Version 2.0 | ||
# (the "License"); you may not use this file except in compliance with | ||
# the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
[flake8] | ||
max-line-length = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.