diff --git a/.github/workflows/python-lint.yml b/.github/workflows/python-lint.yml new file mode 100644 index 0000000..db3dcd1 --- /dev/null +++ b/.github/workflows/python-lint.yml @@ -0,0 +1,31 @@ +name: Python Lint + +on: + push: + branches: [main] + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + cache: 'pip' + + - name: Install tooling + run: pip install black ruff bandit + + - name: Black — code format check + run: black --check . + + - name: Ruff — style & bug lint + run: ruff check . + + - name: Bandit — security scan + run: bandit -r . + + \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..95fbd52 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,10 @@ +[tool.black] +line-length = 100 + +[tool.ruff] +select = ["E", "F", "B"] # style & bug rules +line-length = 100 +ignore = ["E501"] # long lines handled by Black + +[tool.bandit] +skips = ["B101"] # adjust to taste