mitmproxy/setup.cfg
mame82 480052f58b
Grpc contentview (#4851)
* Partial gRPC contentview prototype, not linted, no tests, not as add-on

* Linted (flake8)

* Save dev state

* Rewrote of protobuf parser, use decoding strategy, reduced rendered data. Parser uses  generators

* minor cleanup

* fix: preferred encoding was provided as function instead of value

* flake8: line length

* Backlinked message tree objects, temporary debug out

* Partial implementation of gRPC definitions. Save state to fix a cras (data invalidate in edit mode)

* hack: deal with missing exception handling for generator based content views

* gRPC/Protoparser descriptions (with test code)

* replaced manual gzip decoding with mitmproxy.net.encoding.decode

* Refactored typing imports

* Reafctoring

* distinguish request vs response definitions, separate view config from parser config

* Code cleaning, moved customized protobuf definitions to example addon

* final cleanup

* changelog

* Stubs for tests

* Fixed render_riority of addon example

* Started adding tests

* Work on tests

* mypy

* Added pseudo encoder to tests, to cover special decodings

* Example addon test added

* finalized tests, no 100 percent coverage possible, see comments un uncovered code

* minor adjustments

* fixup tests

* Typos

Co-authored-by: Maximilian Hils <git@maximilianhils.com>
2021-10-12 13:32:56 +02:00

75 lines
1.7 KiB
INI

[flake8]
max-line-length = 140
max-complexity = 25
ignore = E251,E252,C901,W292,W503,W504,W605,E722,E741,E126,F541
exclude = mitmproxy/contrib/*,test/mitmproxy/data/*,release/build/*
addons = file,open,basestring,xrange,unicode,long,cmp
[tool:pytest]
testpaths = test
addopts = --capture=no --color=yes
[coverage:run]
branch = False
omit = *contrib*, *tnetstring*, *platform*, *main.py
[coverage:report]
show_missing = True
exclude_lines =
pragma: no cover
raise NotImplementedError
raise AssertionError
if typing.TYPE_CHECKING:
if TYPE_CHECKING:
@overload
[mypy]
ignore_missing_imports = True
files = mitmproxy,examples/addons,release
[mypy-mitmproxy.contrib.*]
ignore_errors = True
[mypy-tornado.*]
ignore_errors = True
[mypy-test.*]
ignore_errors = True
# https://github.com/python/mypy/issues/3004
[mypy-http-modify-form,http-trailers]
ignore_errors = True
[tool:full_coverage]
exclude =
mitmproxy/tools/
release/hooks
[tool:individual_coverage]
exclude =
mitmproxy/addons/onboarding.py
mitmproxy/addons/termlog.py
mitmproxy/connections.py
mitmproxy/contentviews/base.py
mitmproxy/contentviews/grpc.py
mitmproxy/controller.py
mitmproxy/ctx.py
mitmproxy/exceptions.py
mitmproxy/flow.py
mitmproxy/io/io.py
mitmproxy/io/tnetstring.py
mitmproxy/log.py
mitmproxy/master.py
mitmproxy/net/check.py
mitmproxy/net/http/cookies.py
mitmproxy/net/http/message.py
mitmproxy/net/http/multipart.py
mitmproxy/net/tcp.py
mitmproxy/net/tls.py
mitmproxy/options.py
mitmproxy/proxy/config.py
mitmproxy/proxy/server.py
mitmproxy/proxy/layers/tls.py
mitmproxy/utils/bits.py
release/hooks