Review Request 115356: option to automatically format Python code to PEP8 with AutoPEP8
Sven Brauch
svenbrauch at googlemail.com
Tue Jan 28 16:01:26 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115356/#review48481
-----------------------------------------------------------
First, thanks for the patch! This is a cool feature and I'd really like to have it.
I also have a few comments, but Milian is probably right: a source formatter is the proper way to do this, since that's KDevelop's interface for formatting source code. Would you be interested in implementing that?
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34282>
also here, * to the data type please
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34276>
QAction* action;
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34279>
also here, void* -- put the * to the data type
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34280>
a newline here wouldn't hurt, to separate the things this function does ;)
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34281>
Please add a KMessageBox::error(...) to notify the user something went wrong. Optimally, that would tell whether the executable was not found or there was a different error, but I don't care much -- but there needs to be an error.
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34277>
The DUChain lock is for modifying data in the language database. You don't need to hold it for changing the document's text.
pythonlanguagesupport.cpp
<https://git.reviewboard.kde.org/r/115356/#comment34278>
... and if you would need it, it would be unlocked automatically if it goes out of scope. ;)
- Sven Brauch
On Jan. 28, 2014, 3:07 p.m., Ashwin Rajeev wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115356/
> -----------------------------------------------------------
>
> (Updated Jan. 28, 2014, 3:07 p.m.)
>
>
> Review request for KDevelop and Sven Brauch.
>
>
> Repository: kdev-python
>
>
> Description
> -------
>
> automatically formats Python code to PEP8 with AutoPEP8
>
>
> Diffs
> -----
>
> pep8kcm/kcm_pep8.h e837d10
> pep8kcm/kcm_pep8.cpp 71a23a3
> pythonlanguagesupport.h 0a93d07
> pythonlanguagesupport.cpp 9ad723c
>
> Diff: https://git.reviewboard.kde.org/r/115356/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Ashwin Rajeev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140128/098a059b/attachment-0001.html>
More information about the KDevelop-devel
mailing list