Skip to content

Commit

Permalink
add ! tweaks minor
Browse files Browse the repository at this point in the history
  • Loading branch information
vitali-yanushchyk-valor committed Sep 4, 2024
1 parent d790fdb commit 0352f8f
Show file tree
Hide file tree
Showing 12 changed files with 1,197 additions and 269 deletions.
4 changes: 1 addition & 3 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[flake8]
max-complexity = 12
max-line-length = 88
max-line-length = 120
exclude =
.*/
__pycache__
Expand All @@ -11,5 +11,3 @@ exclude =

per-file-ignores =
src/**/migrations/*.py:E501
src/**/upgrade.py:E731
src/**/upgrade.py:E731
35 changes: 30 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
.*
~*
Makefile
coverage.xml
*.sh
*.egg-info
__pycache__/
*.py[cod]
__pypackages__/

!tests/.coveragerc
!.dockerignore
!.gitignore
!.pdm-python
!.github
!.flake8
!.github
!.gitignore
!.gitlab/
!.tx/config
!.mypy.ini
!.gitlab-ci.yml
!.pre-commit-config.yaml
!.bumpversion.cfg
!.trivyignore
!docker/bin/*.sh
!bandit.yaml
/build
/dist
coverage.xml
Makefile
site
black.txt
flake8
act.*
.pdm-python
!tests/.coveragerc
!.pylintrc
!.isort.cfg
!.git
47 changes: 47 additions & 0 deletions .mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[mypy]
python_version = 3.12
files = src/
exclude = (management/|tests/|manage.py)

install_types = true
show_error_codes = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/stubs/:$MYPY_CONFIG_FILE_DIR/src/:"
strict = true
ignore_missing_imports = True
namespace_packages = true
;plugins =
; mypy_django_plugin.main

[mypy.plugins.django-stubs]
django_settings_module = "hope_country_workspace.config.settings"

[mypy-hope_country_workspace.*]
ignore_missing_imports = True
follow_imports = skip
disable_error_code = type-var,
truthy-function,
union-attr,
var-annotated,
valid-type,
misc,
attr-defined,
no-any-return,
return,


[mypy-strategy_field.*]
ignore_errors = True
[mypy-environ.*]
ignore_errors = True
[mypy-power_query.*]
ignore_errors = True
[mypy-django.*]
ignore_missing_imports = True
[mypy-adminactions.*]
ignore_missing_imports = True
[mypy-adminfilters.*]
ignore_missing_imports = True
[mypy-admin_extra_buttons.*]
ignore_missing_imports = True
[mypy-flags.*]
ignore_missing_imports = True
2 changes: 1 addition & 1 deletion .pdm-python
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Users/sax/Documents/data/PROGETTI/UNICEF/hope-country-workspace/.venv/bin/python
/usr/local/bin/python
30 changes: 30 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
repos:
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
stages: [commit]
- repo: https://github.com/ambv/black
rev: 24.4.2
hooks:
- id: black
args: [--config=pyproject.toml]
exclude: "migrations|snapshots"
stages: [commit]
- repo: https://github.com/PyCQA/flake8
rev: 7.1.0
hooks:
- id: flake8
args: [--config=.flake8]

additional_dependencies: [flake8-bugbear==22.9.23]
stages: [ commit ]
- repo: https://github.com/PyCQA/bandit
rev: '1.7.9' # Update me!
hooks:
- id: bandit
args: ["-c", "bandit.yaml"]
- repo: https://github.com/twisted/towncrier
rev: 23.11.0
hooks:
- id: towncrier-check
Loading

0 comments on commit 0352f8f

Please sign in to comment.