diff --git a/cfg/file-name-conventions.yaml b/cfg/file-name-conventions.yaml index f9d56ad..c749ec3 100644 --- a/cfg/file-name-conventions.yaml +++ b/cfg/file-name-conventions.yaml @@ -7,12 +7,11 @@ filetypes: js: 'kebab-case' md: '*' move: 'snake_case' - py: 'kebab-case' + py: 'snake_case' rs: 'snake_case' toml: 'PascalCase' ts: 'kebab-case' yaml: 'kebab-case' ignore_files: - 'pyproject.toml' -- '__init__.py' ... diff --git a/cfg/pre-commit-config.yaml b/cfg/pre-commit-config.yaml index 1a343ca..0fcef3b 100644 --- a/cfg/pre-commit-config.yaml +++ b/cfg/pre-commit-config.yaml @@ -32,9 +32,9 @@ repos: - entry: | './src/sh/python-lint/run-in-poetry-subdir.sh' - 'poetry run python -m file-name-conventions' + 'poetry run python -m file_name_conventions' 'Please run src/sh/python-lint/format.sh and fix the errors.' - id: 'file-name-conventions' + id: 'file_name_conventions' language: 'script' name: 'check file name conventions' types: diff --git a/src/python/hooks/file-name-conventions.py b/src/python/hooks/file_name_conventions.py similarity index 100% rename from src/python/hooks/file-name-conventions.py rename to src/python/hooks/file_name_conventions.py diff --git a/src/python/hooks/format.py b/src/python/hooks/format.py index 01a9131..be9c6cf 100644 --- a/src/python/hooks/format.py +++ b/src/python/hooks/format.py @@ -33,7 +33,7 @@ def main(): "poetry run isort": ("", utils.is_python_file), "poetry run flake8": ("", utils.is_python_file), "poetry run mypy": ("", utils.is_python_file), - "poetry run python -m file-name-conventions": ("", lambda x: True), + "poetry run python -m file_name_conventions": ("", lambda x: True), } return_statuses = {k: "" for k in cmd_and_args.keys()} diff --git a/src/python/hooks/pyproject.toml b/src/python/hooks/pyproject.toml index 91a0df7..32a9b38 100644 --- a/src/python/hooks/pyproject.toml +++ b/src/python/hooks/pyproject.toml @@ -6,7 +6,7 @@ profile = "black" [tool.poetry] authors = ["Econia Labs "] description = "Python pre-commit hooks for Econia Labs projects." -name = "econia-python-hooks" +name = "econia_precommit" packages = [] version = "1.0.0"