The following issues were found
mitmproxy/coretypes/basethread.py
2 issues
Line: 1
Column: 1
import time
import threading
class BaseThread(threading.Thread):
def __init__(self, name, *args, **kwargs):
super().__init__(name=name, *args, **kwargs)
self._thread_started = time.time()
Reported by Pylint.
Line: 5
Column: 1
import threading
class BaseThread(threading.Thread):
def __init__(self, name, *args, **kwargs):
super().__init__(name=name, *args, **kwargs)
self._thread_started = time.time()
def _threadinfo(self):
Reported by Pylint.
docs/scripts/filters.py
2 issues
Line: 3
Column: 1
#!/usr/bin/env python3
from mitmproxy import flowfilter
print("<table class=\"table filtertable\"><tbody>")
for i in flowfilter.help:
print("<tr><th>%s</th><td>%s</td></tr>" % i)
print("</tbody></table>")
Reported by Pylint.
Line: 1
Column: 1
#!/usr/bin/env python3
from mitmproxy import flowfilter
print("<table class=\"table filtertable\"><tbody>")
for i in flowfilter.help:
print("<tr><th>%s</th><td>%s</td></tr>" % i)
print("</tbody></table>")
Reported by Pylint.
mitmproxy/net/server_spec.py
2 issues
Line: 11
Column: 1
from mitmproxy.net import check
class ServerSpec(NamedTuple):
scheme: Literal["http", "https"]
address: Tuple[str, int]
server_spec_re = re.compile(
Reported by Pylint.
Line: 41
Column: 5
*Raises:*
- ValueError, if the server specification is invalid.
"""
m = server_spec_re.match(server_spec)
if not m:
raise ValueError(f"Invalid server specification: {server_spec}")
if m.group("scheme"):
scheme = m.group("scheme")
Reported by Pylint.
mitmproxy/contentviews/image/__init__.py
2 issues
Line: 1
Column: 1
from .view import ViewImage
__all__ = ["ViewImage"]
Reported by Pylint.
Line: 1
Column: 1
from .view import ViewImage
__all__ = ["ViewImage"]
Reported by Pylint.
mitmproxy/platform/openbsd.py
2 issues
Line: 1
Column: 1
def original_addr(csock):
return csock.getsockname()
Reported by Pylint.
Line: 1
Column: 1
def original_addr(csock):
return csock.getsockname()
Reported by Pylint.
mitmproxy/proxy/context.py
2 issues
Line: 1
Column: 1
from typing import List, TYPE_CHECKING
from mitmproxy import connection
from mitmproxy.options import Options
if TYPE_CHECKING:
import mitmproxy.proxy.layer
Reported by Pylint.
Line: 30
Column: 5
self.server = connection.Server(None)
self.layers = []
def fork(self) -> "Context":
ret = Context(self.client, self.options)
ret.server = self.server
ret.layers = self.layers.copy()
return ret
Reported by Pylint.
test/mitmproxy/data/addonscripts/recorder/c.py
1 issues
Line: 1
Column: 1
import recorder
addons = [recorder.Recorder("c")]
Reported by Pylint.
test/mitmproxy/test_master.py
1 issues
Line: 1
Column: 3
# TODO: write tests
Reported by Pylint.
test/mitmproxy/test_options.py
1 issues
Line: 1
Column: 3
# TODO: write tests
Reported by Pylint.
examples/addons/anatomy2.py
1 issues
Line: 4
Column: 1
"""An addon using the abbreviated scripting syntax."""
def request(flow):
flow.request.headers["myheader"] = "value"
Reported by Pylint.