Skip to content

Commit

Permalink
Update linters
Browse files Browse the repository at this point in the history
  • Loading branch information
manti-by committed Feb 12, 2024
1 parent c6d8a7a commit 5519155
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 44 deletions.
16 changes: 0 additions & 16 deletions .flake8

This file was deleted.

6 changes: 2 additions & 4 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
[settings]
default_section=THIRDPARTY
indent=' '
known_pinata=pinata
known_tests=pytest
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,PINATA,TESTS,LOCALFOLDER
sections=FUTURE,STDLIB,THIRDPARTY,FIRSTPARTY,TESTS,LOCALFOLDER
multi_line_output=3
line_length=120
include_trailing_comma=True
use_parentheses=True
skip=venv,env,migrations,.env,.venv

skip=venv,env,migrations,.env,.venv,__pycache__/,.pytest_cache/
30 changes: 9 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: fix-byte-order-marker
- id: check-ast
- id: check-docstring-first
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: debug-statements
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: pretty-format-json
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
Expand All @@ -16,23 +22,13 @@ repos:

- repo: local
hooks:
- id: isort
name: isort-local
entry: isort
language: python
types: [ python ]
exclude: .+/settings/.+
pass_filenames: true

- id: black
name: black-local
entry: black
language: python
language_version: python3.11
types: [python]
exclude: .+/settings/.+
pass_filenames: true

- id: prospector
name: prospector-local
entry: prospector --messages-only
Expand All @@ -41,19 +37,11 @@ repos:
exclude: .+/settings/.+
pass_filenames: true

- id: bandit
name: bandit
entry: bandit
language: python
language_version: python3
exclude: .+/tests/.+
types: [python]

- repo: https://github.com/thibaudcolas/curlylint
rev: v0.13.1
hooks:
- id: curlylint
types: [ file ]
files: \.html$
language_version: python3.11.1
files: \.(html|sls)$
language_version: python3.11
additional_dependencies: ['click<8.1']
2 changes: 1 addition & 1 deletion .prospector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ pydocstyle:
- D406 # Section name should end with a newline ('Examples', not 'Examples::')
- D407 # Missing dashed underline after section ('Examples')
- D412 # No blank lines allowed between a section header and its content ('Examples')
- N806 # variable in function should be lowercase (we are using `CACHE_PREFIX_KEY`)
- N806 # variable in function should be lowercase (we are using `CACHE_PREFIX_KEY`)
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2012 Alexander Chaika, https://manti.by
Copyright (c) 2006 Alexander Chaika, https://manti.by

All rights reserved.

Expand Down
30 changes: 30 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[tool.pytest.ini_options]
log_cli = true
log_cli_format = "%(levelname)s %(asctime)s %(message)s"
django_find_project = true
addopts = '-p no:warnings --color=yes --ds=db_benchmarks.core.settings'
norecursedirs = '''
.git
'''

[tool.black]
line-length = 120
target_version = ['py311']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
| build
| dist
)/
'''

[tool.curlylint.rules]
indent = 2
html_has_lang = true
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ DJANGO_SETTINGS_MODULE = semkov.settings.test
python_classes = *Test
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning
ignore::PendingDeprecationWarning

0 comments on commit 5519155

Please sign in to comment.