this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

update pre-commit hooks and dependencies (#836)

* update pre-commit hooks and dependencies

* merge lint tools config

authored by

Aakash Singh and committed by
GitHub
23c81d1f 187d42c3

+90 -102
+5 -17
.editorconfig
··· 3 3 root = true 4 4 5 5 [*] 6 + indent_style = space 7 + indent_size = 2 6 8 charset = utf-8 7 9 end_of_line = lf 8 10 insert_final_newline = true 9 11 trim_trailing_whitespace = true 10 12 11 13 [*.{py,rst,ini}] 12 - indent_style = space 13 14 indent_size = 4 14 15 15 16 [*.py] 16 - line_length = 88 17 - known_first_party = care,config 18 - multi_line_output = 3 19 - default_section = THIRDPARTY 20 - recursive = true 17 + profile = black 21 18 skip = venv/ 22 19 skip_glob = **/migrations/*.py 23 - include_trailing_comma = true 24 - force_grid_wrap = 0 25 - use_parentheses = true 26 - 27 - [*.{html,css,scss,json,yml}] 28 - indent_style = space 29 - indent_size = 2 30 20 31 21 [*.md] 32 22 trim_trailing_whitespace = false 23 + indent_size = 4 33 24 34 25 [Makefile] 35 26 indent_style = tab 36 - 37 - [nginx.conf] 38 - indent_style = space 39 - indent_size = 2 27 + indent_size = 4
-2
.isort.cfg
··· 1 - [settings] 2 - line_length=120
+32 -39
.pre-commit-config.yaml
··· 4 4 5 5 repos: 6 6 - repo: https://github.com/pre-commit/pre-commit-hooks 7 - rev: main 7 + rev: v4.2.0 8 8 hooks: 9 - - id: trailing-whitespace 10 - files: (^|/)a/.+\.(py|html|sh|css|js)$ 11 9 - id: check-merge-conflict 12 - name: check for merge conflict 13 - description: Prevent accidentally commiting files with merge conflicts. 14 10 - id: end-of-file-fixer 15 - name: fix end of files. 16 - description: Ensures that a file is either empty, or ends with one newline. 17 - 18 - - repo: https://github.com/asottile/seed-isort-config 19 - rev: v2.1.0 20 - hooks: 21 - - id: seed-isort-config 11 + - id: check-yaml 12 + - id: trailing-whitespace 13 + args: [--markdown-linebreak-ext=md] 22 14 23 - - repo: https://github.com/pre-commit/mirrors-isort 24 - rev: v4.3.21 15 + - repo: https://github.com/PyCQA/isort 16 + rev: 5.10.1 25 17 hooks: 26 18 - id: isort 19 + args: ["--config=setup.cfg"] 20 + additional_dependencies: [flake8-isort] 27 21 28 - - repo: https://github.com/ambv/black 29 - rev: stable 22 + - repo: https://github.com/psf/black 23 + rev: 22.3.0 30 24 hooks: 31 25 - id: black 32 - args: [--line-length=120, --safe] 33 - language_version: python3 34 26 35 - - repo: https://github.com/myint/autoflake 36 - rev: v1.4 27 + - repo: https://github.com/PyCQA/flake8 28 + rev: 4.0.1 37 29 hooks: 38 - - id: autoflake 39 - args: [--in-place, --remove-all-unused-import] 30 + - id: flake8 31 + args: ["--config=setup.cfg"] 40 32 41 33 - repo: local 42 34 hooks: 43 - # - id: flake8 44 - # name: flake8 45 - # entry: flake8 46 - # language: python 47 - # types: [python] 48 - # args: ['--config=setup.cfg'] 49 - 50 - - id: pre-commit-django-migrations 51 - name: Check django migrations 52 - entry: python manage.py makemigrations --dry-run 35 + - id: migrations-check 36 + name: check for uncreated migrations. 37 + entry: python manage.py makemigrations --check --dry-run 53 38 language: system 54 39 types: [python] 55 40 pass_filenames: false 56 41 require_serial: true 57 - # - id: pre-commit-django-tests 58 - # name: Run Django unit tests 59 - # entry: python manage.py test --settings=config.settings.test -n 60 - # language: system 61 - # types: [python] 62 - # pass_filenames: false 63 - # require_serial: true 42 + 43 + #TODO: enable this once we have working tests 44 + # - id: tests 45 + # name: run tests 46 + # entry: python manage.py test --settings=config.settings.test -n 47 + # language: system 48 + # types: [python] 49 + # pass_filenames: false 50 + # require_serial: true 51 + # stages: ["push"] 52 + 53 + ci: 54 + autoupdate_schedule: weekly 55 + skip: [] 56 + submodules: false
-14
.pylintrc
··· 1 - [MASTER] 2 - load-plugins=pylint_django 3 - 4 - [FORMAT] 5 - max-line-length=120 6 - 7 - [MESSAGES CONTROL] 8 - disable=missing-docstring,invalid-name 9 - 10 - [DESIGN] 11 - max-parents=13 12 - 13 - [TYPECHECK] 14 - generated-members=REQUEST,acl_users,aq_parent,"[a-zA-Z]+_set{1,2}",save,delete
+4 -4
requirements/local.txt
··· 5 5 psycopg2-binary==2.8.4 # https://github.com/psycopg/psycopg2 6 6 # Code quality 7 7 # ------------------------------------------------------------------------------ 8 - flake8==3.7.9 # https://github.com/PyCQA/flake8 9 - flake8-isort==2.9.0 # https://github.com/gforcada/flake8-isort 8 + isort==5.10.1 # https://github.com/PyCQA/isort 9 + flake8==4.0.1 # https://github.com/PyCQA/flake8 10 + flake8-isort==4.1.1 # https://github.com/gforcada/flake8-isort 10 11 coverage==5.0.4 # https://github.com/nedbat/coveragepy 11 - black==19.10b0 # https://github.com/ambv/black 12 - pylint-django==2.0.14 # https://github.com/PyCQA/pylint-django 12 + black==22.3.0 # https://github.com/ambv/black 13 13 pre-commit==2.19.0 # https://github.com/pre-commit/pre-commit 14 14 # Django 15 15 # ------------------------------------------------------------------------------
+49 -26
setup.cfg
··· 1 1 [flake8] 2 - max-line-length = 120 3 - exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules 4 - extend-ignore = 5 - # See https://github.com/PyCQA/pycodestyle/issues/373 6 - E203, E231, 7 - 8 - [pycodestyle] 9 - max-line-length = 120 10 - exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules 11 - 12 - [mypy] 13 - python_version = 3.7 14 - check_untyped_defs = True 15 - ignore_missing_imports = True 16 - warn_unused_ignores = True 17 - warn_redundant_casts = True 18 - warn_unused_configs = True 19 - plugins = mypy_django_plugin.main 20 - 21 - [mypy.plugins.django-stubs] 22 - django_settings_module = config.settings.test 23 - 24 - [mypy-*.migrations.*] 25 - # Django migrations should not produce any errors: 26 - ignore_errors = True 2 + max-line-length = 88 3 + extend-ignore = E203,E501,E231 4 + exclude = 5 + .git, 6 + .gitignore, 7 + *.pot, 8 + *.py[co], 9 + __pycache__, 10 + .venv, 11 + */migrations/*, 12 + */static/CACHE/*, 13 + docs 27 14 28 15 [isort] 29 - known_third_party = allauth,boto3,celery,crispy_forms,dateparser,dateutil,django,django_filters,django_rest_passwordreset,djangoql,djqscsv,drf_extra_fields,drf_yasg,dry_rest_permissions,environ,fernet_fields,freezegun,hardcopy,healthy_django,jsonschema,jwt,location_field,multiselectfield,partial_index,phonenumber_field,phonenumbers,pytz,pywebpush,ratelimit,requests,rest_framework,rest_framework_nested,rest_framework_simplejwt,sentry_sdk,simple_history 16 + profile = black 17 + known_third_party = 18 + allauth, 19 + boto3, 20 + celery, 21 + crispy_forms, 22 + dateparser, 23 + dateutil, 24 + django, 25 + django_filters, 26 + django_rest_passwordreset, 27 + djangoql, 28 + djqscsv, 29 + drf_extra_fields, 30 + drf_yasg, 31 + dry_rest_permissions, 32 + environ, 33 + fernet_fields, 34 + freezegun, 35 + hardcopy, 36 + healthy_django, 37 + jsonschema, 38 + jwt, 39 + location_field, 40 + multiselectfield, 41 + partial_index, 42 + phonenumber_field, 43 + phonenumbers, 44 + pytz, 45 + pywebpush, 46 + ratelimit, 47 + requests, 48 + rest_framework, 49 + rest_framework_nested, 50 + rest_framework_simplejwt, 51 + sentry_sdk, 52 + simple_history