nghung270192 / colorama

Automatically exported from code.google.com/p/colorama
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

pylint errors #62

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I don't know if this is an issue with colorama or with pylint.

What steps will reproduce the problem?
1. Use colorama in a project
2. Use predefined colors
3. Run pylint on the code

Result:
E:143,18: Instance of 'AnsiCodes' has no 'RED' member (no-member)
E:143,64: Instance of 'AnsiCodes' has no 'RESET' member (no-member)
E:157,47: Instance of 'AnsiCodes' has no 'BRIGHT' member (no-member)
E:158,45: Instance of 'AnsiCodes' has no 'RESET_ALL' member (no-member)
E:172,49: Instance of 'AnsiCodes' has no 'BRIGHT' member (no-member)
E:173,45: Instance of 'AnsiCodes' has no 'RESET_ALL' member (no-member)
E:187,49: Instance of 'AnsiCodes' has no 'BRIGHT' member (no-member)
E:188,45: Instance of 'AnsiCodes' has no 'RESET_ALL' member (no-member)

What is the expected output? What do you see instead?
Code passes the check

What version of the product are you using? On what operating system?
0.3.1 on Windows via Anaconda

Please provide any additional information below.
I found a similar issue with a patch on the Chromium project:
https://codereview.chromium.org/10202010

Original issue reported on code.google.com by peter....@gmail.com on 12 Nov 2014 at 11:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
The problem is that those attributes are dynamically set with setattr. See 
http://docs.pylint.org/plugins.html#example for description of this problem. To 
fix it, the colorama file ansi.py could be reworked to avoid use of setattr.

Original comment by nickjaco...@gmail.com on 18 Dec 2014 at 11:11