2021-11-03 12:37:59 +00:00
|
|
|
---
|
|
|
|
repos:
|
2021-11-04 11:28:36 +00:00
|
|
|
- repo: https://github.com/asottile/add-trailing-comma.git
|
|
|
|
rev: v2.0.1
|
|
|
|
hooks:
|
|
|
|
- id: add-trailing-comma
|
|
|
|
args:
|
|
|
|
- --py36-plus
|
2021-11-03 12:37:59 +00:00
|
|
|
|
2022-01-20 10:04:54 +00:00
|
|
|
- repo: https://github.com/timothycrosley/isort.git
|
2023-02-22 07:20:49 +00:00
|
|
|
rev: 5.12.0
|
2022-01-20 10:04:54 +00:00
|
|
|
hooks:
|
|
|
|
- id: isort
|
|
|
|
args:
|
|
|
|
- --honor-noqa
|
2021-11-03 12:37:59 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
|
|
|
|
rev: v1.1.7
|
|
|
|
hooks:
|
|
|
|
- id: remove-tabs
|
|
|
|
exclude: |
|
|
|
|
(?x)
|
|
|
|
^
|
|
|
|
helper/proxy\.pac|
|
|
|
|
Makefile|
|
|
|
|
proxy/common/pki\.py|
|
2022-01-20 10:04:54 +00:00
|
|
|
README\.md
|
2021-11-03 12:37:59 +00:00
|
|
|
$
|
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
|
|
|
rev: v4.0.1
|
|
|
|
hooks:
|
|
|
|
# Side-effects:
|
|
|
|
- id: trailing-whitespace
|
|
|
|
exclude: |
|
|
|
|
(?x)
|
|
|
|
^
|
|
|
|
dashboard/src/core/plugins/inspect_traffic\.json
|
|
|
|
$
|
|
|
|
- id: check-merge-conflict
|
|
|
|
- id: double-quote-string-fixer
|
|
|
|
exclude: |
|
|
|
|
(?x)
|
|
|
|
^
|
|
|
|
(
|
|
|
|
tests/(
|
|
|
|
http/exceptions/test_http_proxy_auth_failed|
|
|
|
|
plugin/test_http_proxy_plugins
|
|
|
|
)|
|
|
|
|
proxy/(
|
|
|
|
common/constants|
|
|
|
|
plugin/(cache/store/disk|filter_by_url_regex|proxy_pool)
|
|
|
|
)
|
|
|
|
)\.py
|
|
|
|
$
|
|
|
|
- id: end-of-file-fixer
|
|
|
|
exclude: |
|
|
|
|
(?x)
|
|
|
|
^
|
|
|
|
dashboard/(
|
|
|
|
src/core/plugins/inspect_traffic\.json|
|
|
|
|
static/bootstrap-4\.3\.1\.min\.(cs|j)s
|
2024-08-12 06:27:57 +00:00
|
|
|
)
|
2021-11-03 12:37:59 +00:00
|
|
|
$
|
|
|
|
# Non-modifying checks:
|
|
|
|
- id: name-tests-test
|
|
|
|
args:
|
|
|
|
- --django
|
|
|
|
exclude: >-
|
|
|
|
^tests/plugin/utils\.py$
|
|
|
|
files: >-
|
|
|
|
^tests/[^_].*\.py$
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-byte-order-marker
|
|
|
|
- id: check-case-conflict
|
|
|
|
# disabled due to pre-commit/pre-commit-hooks#159
|
2021-11-04 06:56:46 +00:00
|
|
|
# - id: check-docstring-first
|
2021-11-03 12:37:59 +00:00
|
|
|
- id: check-json
|
|
|
|
- id: check-symlinks
|
|
|
|
- id: check-yaml
|
|
|
|
- id: detect-private-key
|
|
|
|
|
|
|
|
# Heavy checks:
|
|
|
|
- id: check-ast
|
|
|
|
- id: debug-statements
|
|
|
|
|
|
|
|
- repo: https://github.com/PyCQA/pydocstyle.git
|
|
|
|
rev: 6.1.1
|
|
|
|
hooks:
|
|
|
|
- id: pydocstyle
|
|
|
|
additional_dependencies:
|
|
|
|
- toml
|
|
|
|
args:
|
|
|
|
- |-
|
|
|
|
--ignore=
|
|
|
|
D101,
|
|
|
|
D102,
|
|
|
|
D103,
|
|
|
|
D105,
|
|
|
|
D106,
|
|
|
|
D107,
|
|
|
|
D203,
|
|
|
|
D205,
|
|
|
|
D208,
|
|
|
|
D209,
|
|
|
|
D212,
|
|
|
|
D213,
|
|
|
|
D300,
|
|
|
|
D400,
|
|
|
|
D401,
|
|
|
|
D402,
|
|
|
|
D403,
|
|
|
|
D404,
|
|
|
|
D405,
|
|
|
|
D407,
|
|
|
|
D412,
|
|
|
|
D413,
|
|
|
|
D415,
|
|
|
|
|
|
|
|
- repo: https://github.com/codespell-project/codespell
|
|
|
|
rev: v2.1.0
|
|
|
|
hooks:
|
|
|
|
- id: codespell
|
2022-01-26 09:58:27 +00:00
|
|
|
exclude: >
|
|
|
|
(?x)^(
|
2022-01-26 14:20:12 +00:00
|
|
|
^.+\.ipynb$|
|
2022-01-26 09:58:27 +00:00
|
|
|
tests/http/test_responses\.py|
|
|
|
|
^.+\.min\.js$
|
|
|
|
)$
|
2021-11-03 12:37:59 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/adrienverge/yamllint.git
|
|
|
|
rev: v1.26.2
|
|
|
|
hooks:
|
|
|
|
- id: yamllint
|
|
|
|
args:
|
|
|
|
- --strict
|
|
|
|
types: [file, yaml]
|
|
|
|
|
|
|
|
- repo: https://github.com/PyCQA/flake8.git
|
|
|
|
rev: 3.9.2
|
|
|
|
hooks:
|
|
|
|
- id: flake8
|
2024-04-24 09:43:14 +00:00
|
|
|
language_version: python3.10
|
2021-11-03 12:37:59 +00:00
|
|
|
additional_dependencies:
|
|
|
|
- flake8-2020 >= 1.6.0
|
|
|
|
- flake8-docstrings >= 1.5.0
|
|
|
|
- flake8-pytest-style >= 1.2.2
|
2022-03-13 18:40:41 +00:00
|
|
|
- wemake-python-styleguide >= 0.16.1
|
2021-11-03 12:37:59 +00:00
|
|
|
|
|
|
|
- repo: https://github.com/pre-commit/mirrors-mypy.git
|
|
|
|
rev: v0.910
|
|
|
|
hooks:
|
|
|
|
- id: mypy
|
2021-11-04 19:50:26 +00:00
|
|
|
additional_dependencies:
|
2022-05-18 04:41:44 +00:00
|
|
|
- paramiko == 2.11.0
|
2021-11-04 19:50:26 +00:00
|
|
|
- types-paramiko == 2.7.3
|
2022-06-15 18:18:20 +00:00
|
|
|
- types-requests==2.27.30
|
2024-08-12 06:27:57 +00:00
|
|
|
# [tunnel]
|
2022-05-18 04:41:44 +00:00
|
|
|
- cryptography==36.0.2; python_version <= '3.6'
|
2021-11-13 21:16:07 +00:00
|
|
|
- types-setuptools == 57.4.2
|
Update project test dependencies to ensure green workflow (#1371)
* Use www.google.com for http2 tests
* Update README.md
Add missing tutorial's link
(cherry picked from commit e459f932cdb54c37ac6343470eed8581396b642b)
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* System packages for readthedocs
* Pin pyyaml, see https://github.com/yaml/pyyaml/issues/724\#issuecomment-1638587228
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Ignore flake8 S507
* precommit `pyyaml==5.3.1`
* follow https://github.com/yaml/pyyaml/issues/724
* pin to essentials_openapi==0.1.4 for blacksheep
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove blacksheep dep
* remove system_packages
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Check if tox upgrade helps with `ERROR: FAIL could not package project ` tox related issues
* Fix links
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Use `importlib.metadata` instead of `pkg_resources`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Just remove link from plugin docstring for now
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* pin `sphinxcontrib-applehelp==1.0.2` which is breaking spellcheck
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Pin `sphinxcontrib-*`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* pin `towncrier` too
* add kwargs as a spelling
* `_get_dist` backward compatible with 3.6
* Use `httpbingo.org` instead of `httpbin.org` in tests making network requests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Use `httpbingo` for reverse proxy plugin too which is tested in workflows
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* `importlib-metadata; python_version <= 3.7`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Integration test changes due to usage of httpbingo instead of httpbin
* `importlib-metadata; python_version <= 3.7` moved to build essentials and bypass reverse proxy integration test result verification for now
* Filter and ignore `DeprecationWarning` to make it work on 3.7
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* with deprecation ignore we dont need `importlib-metadata`
---------
Co-authored-by: Wermeille Bastien <bastien.wermeille@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-11 07:34:10 +00:00
|
|
|
- pyyaml==5.3.1
|
2024-08-12 06:27:57 +00:00
|
|
|
# [metrics]
|
2024-08-11 14:00:18 +00:00
|
|
|
- prometheus_client==0.20.0
|
2021-11-03 12:37:59 +00:00
|
|
|
args:
|
|
|
|
# FIXME: get rid of missing imports ignore
|
|
|
|
- --ignore-missing-imports
|
|
|
|
- --install-types
|
|
|
|
- --namespace-packages
|
|
|
|
- --non-interactive
|
|
|
|
- --pretty
|
|
|
|
- --show-column-numbers
|
|
|
|
- --show-error-codes
|
|
|
|
- --show-error-context
|
|
|
|
- --strict
|
|
|
|
- --strict-optional
|
2021-11-29 14:50:23 +00:00
|
|
|
- benchmark/
|
2021-11-03 12:37:59 +00:00
|
|
|
- examples/
|
2022-01-21 08:35:32 +00:00
|
|
|
- skeleton/
|
2021-11-03 12:37:59 +00:00
|
|
|
- proxy/
|
|
|
|
- tests/
|
|
|
|
pass_filenames: false
|
|
|
|
|
|
|
|
- repo: local
|
|
|
|
hooks:
|
|
|
|
- id: pylint
|
|
|
|
language: system
|
|
|
|
name: PyLint
|
|
|
|
files: \.py$
|
|
|
|
entry: python -m pylint
|
|
|
|
args: []
|
|
|
|
stages:
|
|
|
|
- manual
|