chore: add pre-commit hooks and flake8-bandit ruff rules#170
Merged
Conversation
Introduce a pre-commit configuration running ruff (lint + format) and the standard pre-commit-hooks. Expand the ruff rule set to cover flake8 (E/W/F), flake8-django (DJ) and flake8-bandit (S); ignore S101 in tests/conftest. Vendored static assets under web/static/ are excluded from the generic whitespace/EOF hooks. Hand-maintained files are normalised one-off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uno-Takashi
added a commit
to d-party/d-party
that referenced
this pull request
Jun 21, 2026
…ckend - devcontainer: Python 3.14, Node 26, and `pre-commit install` for the backend submodule on create. - bump backend submodule to include pre-commit + flake8-bandit ruff rules (d-party/backend#170). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Uno-Takashi
added a commit
to d-party/d-party
that referenced
this pull request
Jun 21, 2026
…ckend (#3) - devcontainer: Python 3.14, Node 26, and `pre-commit install` for the backend submodule on create. - bump backend submodule to include pre-commit + flake8-bandit ruff rules (d-party/backend#170). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
pre-commit を導入し、ruff のルールに flake8 系プラグインを追加します。
変更点
.pre-commit-config.yaml(新規)astral-sh/ruff-pre-commit@v0.15.18…ruff-check --fix+ruff-formatpre-commit/pre-commit-hooks@v6.0.0… whitespace / EOF / yaml / toml / json / merge-conflict / large-fileexclude: ^web/static/で jQuery・Bootstrap・Flickity 等のベンダー minified 資産を整形対象外にpyproject.toml— ruffselectを拡張W(pycodestyle 警告),S(flake8-bandit)を追加E/F(flake8 本体),DJ(flake8-django),I/UP/B/C4は維持conftest.pyではS101(assert)を除外.gitignore等)の行末・EOF 正規化(内容差分なし)検証
pre-commit run --all-files→ 全フック Passedruff check(S/W 含む, 33 ファイル)→ 違反ゼロ🤖 Generated with Claude Code