diff options
author | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-25 12:23:11 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@sonymobile.com> | 2012-10-30 10:28:20 +0900 |
commit | 1d947b30342163b723c96db563967323535fef45 (patch) | |
tree | b6b02d02df01792b356b9e50ceeaadcaf3a2e8c5 /color.py | |
parent | 2d113f35460051823ea54d61c5c939565518f969 (diff) | |
download | git-repo-1d947b30342163b723c96db563967323535fef45.tar.gz |
Even more coding style cleanup
Fixing some more pylint warnings:
W1401: Anomalous backslash in string
W0623: Redefining name 'name' from outer scope
W0702: No exception type(s) specified
E0102: name: function already defined line n
Change-Id: I5afcdb4771ce210390a79981937806e30900a93c
Diffstat (limited to 'color.py')
-rw-r--r-- | color.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -36,7 +36,8 @@ ATTRS = {None :-1, | |||
36 | 'blink' : 5, | 36 | 'blink' : 5, |
37 | 'reverse': 7} | 37 | 'reverse': 7} |
38 | 38 | ||
39 | RESET = "\033[m" | 39 | RESET = "\033[m" # pylint: disable=W1401 |
40 | # backslash is not anomalous | ||
40 | 41 | ||
41 | def is_color(s): | 42 | def is_color(s): |
42 | return s in COLORS | 43 | return s in COLORS |
@@ -51,7 +52,7 @@ def _Color(fg = None, bg = None, attr = None): | |||
51 | 52 | ||
52 | if attr >= 0 or fg >= 0 or bg >= 0: | 53 | if attr >= 0 or fg >= 0 or bg >= 0: |
53 | need_sep = False | 54 | need_sep = False |
54 | code = "\033[" | 55 | code = "\033[" #pylint: disable=W1401 |
55 | 56 | ||
56 | if attr >= 0: | 57 | if attr >= 0: |
57 | code += chr(ord('0') + attr) | 58 | code += chr(ord('0') + attr) |