Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .env.template

This file was deleted.

163 changes: 30 additions & 133 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
generated_checks/
generated_fixers/
output/

# Byte-compiled / optimized / DLL files
# Python
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
Expand All @@ -24,146 +16,51 @@ parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Virtual environments
.venv/
venv/
ENV/
env/

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# IDEs
.vscode/
.idea/
*.swp
*.swo
*~
.DS_Store

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
# Testing
.pytest_cache/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
htmlcov/
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
.pdm.toml
.pdm-python
.pdm-build/

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
# Type checking
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
# Ruff
.ruff_cache/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
# Pre-commit
.pre-commit-config.yaml.backup

# VS Code
.vscode/
# Project specific
working/
logs/
*.log

# Environment files
.env
.env.local
148 changes: 58 additions & 90 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,104 +1,72 @@
# Modern pre-commit configuration for Python 3.12+
# Install: pre-commit install
# Update hooks: pre-commit autoupdate
# Run manually: pre-commit run --all-files

repos:
## GENERAL
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
# Ruff - Fast Python linter and formatter (replaces Black, isort, flake8, pylint)
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.3
hooks:
- id: check-merge-conflict
- id: check-yaml
args: ["--unsafe"]
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
- id: pretty-format-json
args: ["--autofix", --no-sort-keys, --no-ensure-ascii]
# Run the linter
- id: ruff-check
args: [--fix]
# Run the formatter
- id: ruff-format

## TOML
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.13.0
# mypy - Static type checking
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.18.2
hooks:
- id: pretty-format-toml
args: [--autofix]
files: pyproject.toml
- id: mypy
additional_dependencies:
- typer
- gitpython
- jinja2
- pydantic
- claude-agent-sdk
args: [--ignore-missing-imports, --strict]

## BASH
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
## PYTHON
- repo: https://github.com/myint/autoflake
rev: v2.3.1
# pyupgrade - Automatically upgrade syntax for newer Python
- repo: https://github.com/asottile/pyupgrade
rev: v3.21.0
hooks:
- id: autoflake
args:
[
"--in-place",
"--remove-all-unused-imports",
"--remove-unused-variable",
]
- id: pyupgrade
args: [--py312-plus]

- repo: https://github.com/timothycrosley/isort
rev: 5.13.2
# pre-commit-hooks - Collection of useful hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: isort
args: ["--profile", "black"]
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-private-key

- repo: https://github.com/psf/black
rev: 24.4.2
# Bandit - Security linting for Python
- repo: https://github.com/PyCQA/bandit
rev: 1.8.6
hooks:
- id: black
- id: bandit
args: [-c, pyproject.toml]
additional_dependencies: ["bandit[toml]"]

- repo: https://github.com/pycqa/flake8
rev: 7.0.0
hooks:
- id: flake8
exclude: contrib
args: ["--ignore=E266,W503,E203,E501,W605"]
- repo: https://github.com/astral-sh/uv-pre-commit
# uv version.
rev: 0.6.16
hooks:
- id: uv-lock
- repo: https://github.com/hadolint/hadolint
rev: v2.13.0-beta
# interrogate - Docstring coverage checker
- repo: https://github.com/econchick/interrogate
rev: 1.7.0
hooks:
- id: hadolint
args: ["--ignore=DL3013"]
- id: interrogate
args: [--config=pyproject.toml]
pass_filenames: false

- repo: local
# Commitizen - Conventional commits
- repo: https://github.com/commitizen-tools/commitizen
rev: v4.9.1
hooks:
- id: pylint
name: pylint
entry: bash -c 'pylint --disable=W,C,R,E -j 0 -rn -sn core/'
language: system
files: '.*\.py'

- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'trufflehog --no-update git file://. --only-verified --fail'
# For running trufflehog in docker, use the following entry instead:
# entry: bash -c 'docker run -v "$(pwd):/workdir" -i --rm trufflesecurity/trufflehog:latest git file:///workdir --only-verified --fail'
language: system
stages: ["pre-commit", "pre-push"]

- id: bandit
name: bandit
description: "Bandit is a tool for finding common security issues in Python code"
entry: bash -c 'bandit -q -lll -x './.venv/' -r .'
language: system
files: '.*\.py'

- id: safety
name: safety
description: "Safety is a tool that checks your installed dependencies for known security vulnerabilities"
entry: bash -c 'safety check --ignore 70612'
language: system

- id: vulture
name: vulture
description: "Vulture finds unused code in Python programs."
entry: bash -c 'vulture --ignore-names "cls" --exclude ".venv" --min-confidence 100 .'
language: system
files: '.*\.py'
- id: commitizen
stages: [commit-msg]
Loading
Loading