diff --git a/pycallgraph/output/output.py b/pycallgraph/output/output.py index 662d563..f6f3efa 100644 --- a/pycallgraph/output/output.py +++ b/pycallgraph/output/output.py @@ -116,7 +116,7 @@ def debug(self, text): self.processor.config.log_debug(text) @classmethod - def add_output_file(cls, subparser, defaults, help): + def add_output_file(cls, subparser, defaults, help): # noqa: A002 subparser.add_argument( '-o', '--output-file', type=str, default=defaults.output_file, help=help, diff --git a/pycallgraph/pycallgraph.py b/pycallgraph/pycallgraph.py index 6af5428..73e018b 100644 --- a/pycallgraph/pycallgraph.py +++ b/pycallgraph/pycallgraph.py @@ -33,7 +33,7 @@ def __init__(self, output=None, config=None): def __enter__(self): self.start() - def __exit__(self, type, value, traceback): + def __exit__(self, type, value, traceback): # noqa: A002 self.done() def get_tracer_class(self): diff --git a/pycallgraph/tracer.py b/pycallgraph/tracer.py index ffcab15..f83cf42 100644 --- a/pycallgraph/tracer.py +++ b/pycallgraph/tracer.py @@ -372,4 +372,5 @@ def wrapper(*rest): return wrapper + inspect.getmodule = simple_memoize(inspect.getmodule)