pylint question - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: pylint question (/thread-25323.html) |
pylint question - dcollett - Mar-26-2020 Hi, everyone. Here's my short snippet of code: """ Module docstring goes here """ class Robot(): """ Class docstring goes here """ def __init__(self, x_axis=0, y_axis=0): """ Function/method docstring goes here """ self.x_axis = x_axis self.y_axis = y_axis def move_robot(self, x_increment=1, y_increment=1): """ Function/method docstring goes here """ self.x_axis += x_increment self.y_axis += y_increment robot01 = Robot(4, 7) print('\nrobot01 x,y =', robot01.x_axis, robot01.y_axis)It runs fine. However, when I run it through pylint, it gives it a score of 7.78/10 for two reasons I don't understand: Quote:pylint testrobot.py 1. What does it mean "too few public methods"? 2. Why should robot01 be in UPPER_CASE naming style? Thanks for your help! David |