8000 Update pylint, pep257, pyflakes. · python-mode/python-mode@2f15f3d · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f15f3d

Browse files
committed
Update pylint, pep257, pyflakes.
1 parent 2286cc7 commit 2f15f3d

36 files changed

+1630
-941
lines changed

pylama.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[main]
2-
ignore = R0201,R0922,C0111,E1103
2+
ignore = R0201,R0922,E1103
33
skip = pymode/autopep8.py

pymode/libs/pylama/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
66
"""
77

8-
__version__ = "3.1.1"
8+
__version__ = "3.2.0"
99
__project__ = "pylama"
1010
__author__ = "Kirill Klenov <horneds@gmail.com>"
1111
__license__ = "GNU LGPL"

pymode/libs/pylama/libs/inirama.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def __setitem__(self, key, value):
4646

4747
def __delitem__(self, key):
4848
dict.__delitem__(self, key)
49-
ix = self.__map.pop(key)
49+
self.__map.pop(key)
5050
self.__order = self.null
5151

5252
def __iter__(self):
5353
for key in self.__order:
54-
if not key is self.null:
54+
if key is not self.null:
5555
yield key
5656

5757
def keys(self):
@@ -67,8 +67,8 @@ def keys(self):
6767
iteritems = DictMixin.iteritems
6868

6969

70-
__version__ = '0.5.0'
71-
__project__ = 'Inirama'
70+
__version__ = "0.5.1"
71+
__project__ = "Inirama"
7272
__author__ = "Kirill Klenov <horneds@gmail.com>"
7373
__license__ = "BSD"
7474

@@ -193,7 +193,11 @@ def __init__(self, namespace, *args, **kwargs):
193193
self.__storage__ = dict()
194194

195195
def __setitem__(self, name, value):
196-
self.__storage__[name] = str(value)
196+
value = str(value)
197+
if value.isdigit():
198+
value = int(value)
199+
200+
self.__storage__[name] = value
197201

198202
def __getitem__(self, name):
199203
return self.__storage__[name]
@@ -370,7 +374,7 @@ def __getitem__(self, name):
370374
:return :class:`inirama.Section`: section
371375
372376
"""
373-
if not name in self.sections:
377+
if name not in self.sections:
374378
self.sections[name] = self.section_type(self)
375379
return self.sections[name]
376380

pymode/libs/pylama/lint/pylama_pep257/pep257.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ def parse_all(self):
235235
sys.stderr.write(msg)
236236
self.consume(tk.OP)
237237
s = '('
238+
while self.current.kind in (tk.NL, tk.COMMENT):
239+
self.stream.move()
238240
if self.current.kind != tk.STRING:
239241
raise AllError('Could not evaluate contents of __all__. ')
240242
while self.current.value not in ')]':

0 commit comments

Comments
 (0)
0