Fix warning in pytest (#4803)

Escape backslashes in pydocs containing '\*' (markdown escape sequence).
This removes the one warning I saw when running `pytest`:

    /mitmproxy/mitmproxy/http.py:97: DeprecationWarning: invalid escape sequence \*
This commit is contained in:
Matthew Hughes 2021-09-13 21:10:56 +01:00 committed by GitHub
parent 35596bd5e4
commit 8c03f7bf8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,7 +98,7 @@ class Headers(multidict.MultiDict): # type: ignore
*Args:* *Args:*
- *fields:* (optional) list of ``(name, value)`` header byte tuples, - *fields:* (optional) list of ``(name, value)`` header byte tuples,
e.g. ``[(b"Host", b"example.com")]``. All names and values must be bytes. e.g. ``[(b"Host", b"example.com")]``. All names and values must be bytes.
- *\*\*headers:* Additional headers to set. Will overwrite existing values from `fields`. - *\\*\\*headers:* Additional headers to set. Will overwrite existing values from `fields`.
For convenience, underscores in header names will be transformed to dashes - For convenience, underscores in header names will be transformed to dashes -
this behaviour does not extend to other methods. this behaviour does not extend to other methods.