Bug 373457

Summary: pycodestyle invocation slow; should be kept running
Product: [Developer tools] kdev-python Reporter: Sven Brauch <mail>
Component: generalAssignee: Sven Brauch <mail>
Status: RESOLVED FIXED    
Severity: normal CC: lbeltrame, mail, simonandric5
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
URL: https://phabricator.kde.org/D3807
Latest Commit: Version Fixed/Implemented In: 5.1.0
Sentry Crash Report:

Description Sven Brauch 2016-12-09 10:33:35 UTC
Starting up the pycodestyle syntax checker takes about one second, which is too much to launch it on each parse job. We should instead have some "server" script running, which processes data from stdin and writes checker errors to stdout. Example code on how to interface with pycodestyle:

>>> import pycodestyle
>>> c = pycodestyle.Checker(lines=["a=3"])
>>> c.check_all()
stdin:1:2: E225 missing whitespace around operator
stdin:1:4: W292 no newline at end of file
2
Comment 1 Sven Brauch 2016-12-27 17:20:07 UTC
Should be fixed in master / 5.1