Commit 559240f
committed
Fix mismatched type exception thrown by mccabe.py.
This bug is a variation of the same one reported in issue python-mode#447.
Commit 00c6c75 on 2014-06-16 introduced this statement in plugin/pymode.vim:
call pymode#default("g:pymode_lint_options_mccabe",
\ {'complexity': 12})
That results in pymode/libs/pylama/lint/pylama_mccabe/mccabe.py throwing this
exception:
Run mccabe {'complexity': '12'}
<traceback object at 0x101eb9688>
Traceback (most recent call last):
File "/Users/krader/Dropbox/dotfiles/vim/bundle/python-mode/pymode/libs/pylama/core.py",
line 68, in run
select=params.get("select", set()), params=lparams):
File "/Users/krader/Dropbox/dotfiles/vim/bundle/python-mode/pymode/libs/pylama/lint/pylama_mccabe/__init__.py", line 20, in run
return get_code_complexity(code, complexity, filename=path) or []
File "/Users/krader/Dropbox/dotfiles/vim/bundle/python-mode/pymode/libs/pylama/lint/pylama_mccabe/mccabe.py", line 267, in get_code_complexity
for lineno, offset, text, check in McCabeChecker(tree, filename).run():
File "/Users/krader/Dropbox/dotfiles/vim/bundle/python-mode/pymode/libs/pylama/lint/pylama_mccabe/mccabe.py", line 247, in run
if self.max_complexity < 0:
TypeError: unorderable types: str() < int()1 parent 1e95b8b commit 559240f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
0 commit comments