tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 8bacc1dad170a9a29633d95c91a4139af6a2bfe7
parent 4795f2d3a0df72d0e51a51eb1fbafdc68bfbc77c
Author: George Kadianakis <desnacked@riseup.net>
Date:   Tue,  5 Mar 2019 15:01:07 +0200

practracker: Improve documentation in problem.py .

Diffstat:
Mscripts/maint/practracker/problem.py | 25+++++++++++++++++++++++++
1 file changed, 25 insertions(+), 0 deletions(-)

diff --git a/scripts/maint/practracker/problem.py b/scripts/maint/practracker/problem.py @@ -53,6 +53,10 @@ class ProblemVault(object): return False class Problem(object): + """ + A generic problem in our source code. See the subclasses below for the + specific problems we are trying to tackle. + """ def __init__(self, problem_type, problem_location, metric_value): self.problem_location = problem_location self.metric_value = int(metric_value) @@ -72,14 +76,35 @@ class Problem(object): return "problem %s %s %s" % (self.problem_type, self.problem_location, self.metric_value) class FileSizeProblem(Problem): + """ + Denotes a problem with the size of a .c file. + + The 'problem_location' is the filesystem path of the .c file, and the + 'metric_value' is the number of lines in the .c file. + """ def __init__(self, problem_location, metric_value): super(FileSizeProblem, self).__init__("file-size", problem_location, metric_value) class IncludeCountProblem(Problem): + """ + Denotes a problem with the number of #includes in a .c file. + + The 'problem_location' is the filesystem path of the .c file, and the + 'metric_value' is the number of #includes in the .c file. + """ def __init__(self, problem_location, metric_value): super(IncludeCountProblem, self).__init__("include-count", problem_location, metric_value) class FunctionSizeProblem(Problem): + """ + Denotes a problem with a size of a function in a .c file. + + The 'problem_location' is "<path>:<function>()" where <path> is the + filesystem path of the .c file and <function> is the name of the offending + function. + + The 'metric_value' is the size of the offending function in lines. + """ def __init__(self, problem_location, metric_value): super(FunctionSizeProblem, self).__init__("function-size", problem_location, metric_value)