summaryrefslogtreecommitdiff
path: root/test/log
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-21 14:29:20 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-01-21 20:47:24 +0200
commitafbf0ec626db43b0117d28ef4f9b825a7d19929a (patch)
treec5ddfb6da7069e50a66f36313f2f4a75e4e94a9a /test/log
parent8e1e10283a4149a7a052c718f077a15aba2c1a64 (diff)
utils: checkstyle.py: Fix "protected" members in Commit class
The Commit class and subclasses were reworked in commit 4f5d17f3a4f5 ("utils: checkstyle.py: Make title and files properties of commit class") with the introduction of members of the base class that were meant to be protected (not used externally, but accessible by subclasses). They have been named with a '__' prefix for this purpose, which was a bad choice as Python effectively replaces a leading '__' with a literal '__classname__' prefix to make them private (https://docs.python.org/3/tutorial/classes.html#private-variables). The members accessed in the derived classes are thus different from the ones in the base class. Fix this by replacing the double underscore prefix with a single underscore, which is a "weak internal use indicator" (as specified in https://www.python.org/dev/peps/pep-0008/), closer to the protected access specifier of C++. Reported-by: Umang Jain <email@uajain.com> Reported-by: Naushir Patuck <naush@raspberrypi.com> Fixes: 4f5d17f3a4f5 ("utils: checkstyle.py: Make title and files properties of commit class") Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Tested-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com>
Diffstat (limited to 'test/log')
0 files changed, 0 insertions, 0 deletions