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

[Study] Apply python formatter #17

Closed
chen-tf opened this issue Dec 5, 2022 · 1 comment
Closed

[Study] Apply python formatter #17

chen-tf opened this issue Dec 5, 2022 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@chen-tf
Copy link
Owner

chen-tf commented Dec 5, 2022

身為 開發者
我希望 有 formatter 可以幫助排版,讓大家的格式都可以統一
如此 協作起來才可以更順利

Definition of Done

  1. 要使用哪一個 formatter
  2. 如何下 command 檢查目前專案中是否有不符合規定的格式存在
@chen-tf chen-tf added the good first issue Good for newcomers label Dec 5, 2022
@w305jack
Copy link
Contributor

w305jack commented Dec 6, 2022

先列一下可以用的 Python Formatter。

  1. Formatter 御三家。
  1. black 指令基本上就一行。
# usage
$ black {source_file_or_directory}

# e.g.
$ black foo.py

reformatted foo.py

All done! ✨ 🍰 ✨
1 files reformatted.
  1. Linter。
  • flake8
  • pylint (個人開發上比較常用,Pycharm 有出 Plugin 的關係)

以上是先列出選項,順便詢問一下大家在開發上,比較偏好哪種搭配。

(上述的都能寫成 script 放在 CI/CD 裡)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

2 participants