8 """ |
8 """ |
9 |
9 |
10 import sys |
10 import sys |
11 import multiprocessing |
11 import multiprocessing |
12 |
12 |
13 import pep8 |
13 import pycodestyle |
14 from NamingStyleChecker import NamingStyleChecker |
14 from NamingStyleChecker import NamingStyleChecker |
15 |
15 |
16 # register the name checker |
16 # register the name checker |
17 pep8.register_check(NamingStyleChecker, NamingStyleChecker.Codes) |
17 pycodestyle.register_check(NamingStyleChecker, NamingStyleChecker.Codes) |
18 |
18 |
19 from DocStyleChecker import DocStyleChecker |
19 from DocStyleChecker import DocStyleChecker |
20 from MiscellaneousChecker import MiscellaneousChecker |
20 from MiscellaneousChecker import MiscellaneousChecker |
21 from McCabeChecker import McCabeChecker |
21 from McCabeChecker import McCabeChecker |
22 |
22 |
37 @return the entry point for the background client (function) |
37 @return the entry point for the background client (function) |
38 """ |
38 """ |
39 return codeStyleBatchCheck |
39 return codeStyleBatchCheck |
40 |
40 |
41 |
41 |
42 class CodeStyleCheckerReport(pep8.BaseReport): |
42 class CodeStyleCheckerReport(pycodestyle.BaseReport): |
43 """ |
43 """ |
44 Class implementing a special report to be used with our dialog. |
44 Class implementing a special report to be used with our dialog. |
45 """ |
45 """ |
46 def __init__(self, options): |
46 def __init__(self, options): |
47 """ |
47 """ |
222 excludeMessages.split(',') if i.strip()] |
222 excludeMessages.split(',') if i.strip()] |
223 else: |
223 else: |
224 ignore = [] |
224 ignore = [] |
225 |
225 |
226 # check coding style |
226 # check coding style |
227 styleGuide = pep8.StyleGuide( |
227 styleGuide = pycodestyle.StyleGuide( |
228 reporter=CodeStyleCheckerReport, |
228 reporter=CodeStyleCheckerReport, |
229 repeat=repeatMessages, |
229 repeat=repeatMessages, |
230 select=select, |
230 select=select, |
231 ignore=ignore, |
231 ignore=ignore, |
232 max_line_length=maxLineLength, |
232 max_line_length=maxLineLength, |