-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source: intelowlproject/IntelOwl#1470 updated pre-commit and fixed flake8 syntax error
- Loading branch information
1 parent
cfb7c1f
commit 2ea24db
Showing
5 changed files
with
90 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
[flake8] | ||
max-line-length = 160 | ||
exclude = | ||
Dockerfile | ||
docker-compose* | ||
scripts | ||
build | ||
venv* | ||
certego_django_apps/migrations | ||
max-line-length = 88 | ||
ignore = | ||
F821 # undefined name 'Rule' | ||
W503 # line break before binary operator | ||
E402 # module level import not at top of file | ||
W291 # trailing whitespace nightmare | ||
E203 # whitespace before ':' | ||
# line break before binary operator | ||
W503, | ||
# missing whitespace after ',' (caused by black style) | ||
E231, | ||
# invalid escape sequence (caused by regex) | ||
W605, | ||
exclude = | ||
Dockerfile, | ||
docker-compose*, | ||
venv, | ||
docs, | ||
migrations, | ||
virtualenv, | ||
ldap_config.py | ||
api_app/analyzers_manager/migrations/*(venv) | ||
example_project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,52 @@ | ||
repos: | ||
- repo: https://github.com/myint/autoflake | ||
rev: v1.4 | ||
hooks: | ||
- id: autoflake | ||
args: | ||
[ | ||
"--remove-all-unused-imports", | ||
"--remove-unused-variables", | ||
"--ignore-init-module-imports", | ||
"-i", | ||
] | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
rev: 23.7.0 | ||
hooks: | ||
- id: black | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 4.0.1 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.1.0 | ||
hooks: | ||
- id: flake8 | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "--filter-files", "--skip", "venv"] | ||
#- repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: master | ||
# hooks: | ||
# - id: mypy | ||
# additional_dependencies: | ||
# - django-stubs | ||
# - djangorestframework-stubs | ||
# args: [--no-strict-optional, --ignore-missing-imports] | ||
args: | ||
[ | ||
"--profile", | ||
"black", | ||
"--filter-files", | ||
"--skip", | ||
"venv", | ||
"--skip", | ||
"configuration/ldap_config.py", | ||
] | ||
- repo: https://github.com/pre-commit/mirrors-eslint | ||
rev: v8.46.0 | ||
hooks: | ||
- id: eslint | ||
additional_dependencies: | ||
- eslint@8.16.0 | ||
- eslint-config-airbnb@19.0.4 | ||
- eslint-config-prettier@8.5.0 | ||
- eslint-plugin-import@2.26.0 | ||
- eslint-plugin-jsx-a11y@6.5.1 | ||
- eslint-plugin-react@7.30.0 | ||
- eslint-plugin-react-hooks@4.5.0 | ||
args: ["--fix"] | ||
files: frontend/src/ | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v3.0.1 | ||
hooks: | ||
- id: prettier | ||
files: frontend/src/ | ||
- repo: https://github.com/awebdeveloper/pre-commit-stylelint | ||
rev: 0.0.2 | ||
hooks: | ||
- id: stylelint | ||
additional_dependencies: | ||
- stylelint@14.8.5 | ||
- stylelint-config-prettier@9.0.3 | ||
- stylelint-config-standard-scss@4.0.0 | ||
args: ["--fix"] | ||
files: frontend/src/styles/.*(css|scss)$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
certego_saas/apps/organization/migrations/0002_membership_is_admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("certego_saas_organization", "0001_initial"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="membership", | ||
name="is_admin", | ||
field=models.BooleanField(default=False), | ||
), | ||
] |