Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ! tweaks minor #19

Merged
merged 1 commit into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 0 additions & 1 deletion .pdm-python

This file was deleted.

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
Loading