Skip to content

Commit

Permalink
feat: update for Python 3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
iCarossio committed Oct 4, 2023
1 parent ffd15a7 commit cc3670c
Show file tree
Hide file tree
Showing 13 changed files with 1,713 additions and 1,080 deletions.
31 changes: 6 additions & 25 deletions .hooks/pre-commit.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,19 @@
{
"type": "python",
"venvActivate": "./.venv/bin/activate",
"steps": [
{
"name": "autoflake",
"command": "autoflake -ri --remove-unused-variable --ignore-init-module-imports --remove-all-unused-imports pytemplate tests"
"from": "py-black"
},
{
"name": "isort",
"command": "isort -m 9 --line-length 160 pytemplate tests"
"from": "py-mypy"
},
{
"name": "unify",
"command": "unify -ri pytemplate tests"
"from": "py-pytest"
},
{
"name": "docformatter",
"command": "docformatter --wrap-summaries 160 --wrap-descriptions 160 -ri pytemplate tests"
"from": "py-ruff"
},
{
"name": "yapf",
"command": "yapf -ri pytemplate tests"
},
{
"name": "pylint",
"command": "pylint --load-plugins pylint_quotes pytemplate tests"
},
{
"name": "mypy",
"command": "mypy pytemplate tests"
},
{
"name": "pytest",
"command": "pytest tests"
"from": "py-yamllint"
}
]
}
}
Empty file added .hooks/shared/.gitkeep
Empty file.
5 changes: 5 additions & 0 deletions .hooks/shared/py-black.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "python: black",
"command": "poetry run black packages sdk services scanner",
"onlyOn": "**/*.py"
}
5 changes: 5 additions & 0 deletions .hooks/shared/py-mypy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "python: mypy",
"command": "poetry run mypy",
"onlyOn": "**/*.py"
}
5 changes: 5 additions & 0 deletions .hooks/shared/py-pytest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "python: pytest",
"command": "make test-python",
"onlyOn": "**/*.py"
}
5 changes: 5 additions & 0 deletions .hooks/shared/py-ruff.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "python: ruff",
"command": "poetry run ruff packages sdk services scanner",
"onlyOn": "**/*.py"
}
5 changes: 5 additions & 0 deletions .hooks/shared/py-yamllint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name": "python: yamllint",
"command": "poetry run yamllint packages/remediations/remediations -s",
"onlyOn": "**/*.yaml"
}
15 changes: 0 additions & 15 deletions .mypy.ini

This file was deleted.

57 changes: 0 additions & 57 deletions .pylintrc

This file was deleted.

Loading

0 comments on commit cc3670c

Please sign in to comment.