master
Josiah 3 years ago
parent dae25290a3
commit 741745c673

@ -5,12 +5,14 @@ force_grid_wrap = 0
use_parentheses = true
line_length = 100
[tool.pylint]
max-line-length=100
[tool.pylint.messages_control]
max-line-length = 100
disable = ["C0330"]
[tool.black]
line-length = 100
target-version = ['py38']
target-version = ['py39']
include = '\.pyi?$'
exclude = '''
@ -34,16 +36,13 @@ exclude = '''
[tool.mypy]
follow_imports = silent
strict_optional = True
warn_redundant_casts = True
warn_unused_ignores = True
disallow_any_generics = True
check_untyped_defs = True
no_implicit_reexport = True
disallow_untyped_defs = True
ignore_missing_imports = True
[tool.mypy-tests.*]
ignore_errors = True
python_version = "3.9"
follow_imports = 'silent'
strict_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
disallow_any_generics = true
check_untyped_defs = true
no_implicit_reexport = true
disallow_untyped_defs = true
ignore_missing_imports = true

@ -0,0 +1,26 @@
# Security Python Template
This template is used by the SecOps team to start off new projects.
## Getting started
Make sure this is run inside a git repo.
Install prereqs
```shell
pipenv shell
pipenv install -d isort mypy pylint pre-commit
pipenv install -d --pre black
```
Configure pre-commit
``` shell
pre-commit install
pre-commit autoupdate
```
Since this is the first time running any linters in your project, you probably want to run it against your whole project:
`pre-commit run --all-files`
Going forward, pre-commit and its hooks will be run ahead of every commit you make.
## Common issues
1. You really need to be inside a git repo or pre-commit will not work.
2. If you modify `pyproject.toml` make sure your syntax is correct; many linters will error in arcane ways due to an improperly titled section.
Loading…
Cancel
Save