-
Notifications
You must be signed in to change notification settings - Fork 4
Reconfigure the linter and formatter correctly. And reflect it throughout. #127
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
Conversation
|
|
||
| [flake8] | ||
| max-line-length = 88 | ||
| extend-ignore = E203,E501 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E501は行の文字数チェックです。
このチェックは、ほとんどの場合はblackで88行にフォーマットされるため回避できます。長い文字列やコメント行などはblackが無視するための残りますが、モダンな開発環境では文字数の切りつめがそれほど重要でなく、切り詰めるためだけにコード変更を行うのは本末転倒だと考え、無効化しました。
| repos: | ||
| - repo: https://github.com/psf/black | ||
| rev: 20.8b1 | ||
| rev: 22.10.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#125 の問題。
issueに書いた回避策では pre-commit で動作しなかったため、バージョンアップで対処。
ueno-k-work
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
プロダクトコードのフォーマットが整っていなかったため確認したところ、black、isort、flake8、pre-commitの設定が適切でなく、正しく動作しづらい状態でした。
そこでそれぞれの設定の見直しと、全体を再フォーマットしました。
fix: #125