The following issues were found

mitmproxy/coretypes/basethread.py
2 issues
Missing module docstring
Error

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.

Missing class docstring
Error

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
Unable to import 'mitmproxy'
Error

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.

Missing module docstring
Error

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
Missing class docstring
Error

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.

Variable name "m" doesn't conform to snake_case naming style
Error

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
Unable to import '__init__.view'
Error

Line: 1 Column: 1

              from .view import ViewImage

__all__ = ["ViewImage"]

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              from .view import ViewImage

__all__ = ["ViewImage"]

            

Reported by Pylint.

mitmproxy/platform/openbsd.py
2 issues
Missing function or method docstring
Error

Line: 1 Column: 1

              def original_addr(csock):
    return csock.getsockname()

            

Reported by Pylint.

Missing module docstring
Error

Line: 1 Column: 1

              def original_addr(csock):
    return csock.getsockname()

            

Reported by Pylint.

mitmproxy/proxy/context.py
2 issues
Missing module docstring
Error

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.

Missing function or method docstring
Error

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
Missing module docstring
Error

Line: 1 Column: 1

              import recorder

addons = [recorder.Recorder("c")]

            

Reported by Pylint.

test/mitmproxy/test_master.py
1 issues
TODO: write tests
Error

Line: 1 Column: 3

              # TODO: write tests

            

Reported by Pylint.

test/mitmproxy/test_options.py
1 issues
TODO: write tests
Error

Line: 1 Column: 3

              # TODO: write tests

            

Reported by Pylint.

examples/addons/anatomy2.py
1 issues
Missing function or method docstring
Error

Line: 4 Column: 1

              """An addon using the abbreviated scripting syntax."""


def request(flow):
    flow.request.headers["myheader"] = "value"

            

Reported by Pylint.