Skip to content

Commit

Permalink
[ECO-1510] Use snake_case for Python files instead of kebab-case (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
xbtmatt authored Apr 5, 2024
1 parent 88ac773 commit 6257736
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions cfg/file-name-conventions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
...
4 changes: 2 additions & 2 deletions cfg/pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/python/hooks/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
Expand Down
2 changes: 1 addition & 1 deletion src/python/hooks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ profile = "black"
[tool.poetry]
authors = ["Econia Labs <[email protected]>"]
description = "Python pre-commit hooks for Econia Labs projects."
name = "econia-python-hooks"
name = "econia_precommit"
packages = []
version = "1.0.0"

Expand Down

0 comments on commit 6257736

Please sign in to comment.