You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is carried over from Piyush's work initiated in the multimaster repo (robotics-in-concert/rocon_multimaster#259). It's useful here as a reminder when creating new or updating old rocon python packages.
Roslint
All python packages in the rocon repositories should conform to pep8. To enable automated testing:
You can also try the --aggresive for more aggresive correction. See autopep8 --help.
Roslint Tips
Ignoring a line of code for analysis - add a # noqa comment at the end of the line.
This should in general be avoided and appears to be a contentious issue in the python world. The main argument against it is that it creates noise in the source file. I'm agnostic about it and care more just to get on with our work so do as you wish. One use case for it is in formatting a set of lines with extra whitespace for ease of reading (and hence arguably creating less noise in the source file despite the comment).
The text was updated successfully, but these errors were encountered:
pep8 settings are in Preferences->Pydev->Editors->Code Analysis.
It uses its own internal pep8 script
This is a bit older than the roslint pep8 script and not so configurable (e.g. no --max-line-length)
You can't redirect it to the new pep8 scripts (e.g. roslint's) either (jpython incompatibilities)
So we can't get pydev running the same pep8 as roslint. However I haven't noticed any big difference except the default line length (pydev: 80, roslint: 120). I generally try and conform to that too these days, but you can always set --ignore=E501 in the eclipse settings and let roslint handle it on the command line.
@jihoonl, @bit-pirate, @dwlee, @hughie, @piyushk
This is carried over from Piyush's work initiated in the multimaster repo (robotics-in-concert/rocon_multimaster#259). It's useful here as a reminder when creating new or updating old rocon python packages.
Roslint
All python packages in the rocon repositories should conform to pep8. To enable automated testing:
To automatically cut down a lot of errors:
You can also try the --aggresive for more aggresive correction. See
autopep8 --help
.Roslint Tips
# noqa
comment at the end of the line.This should in general be avoided and appears to be a contentious issue in the python world. The main argument against it is that it creates noise in the source file. I'm agnostic about it and care more just to get on with our work so do as you wish. One use case for it is in formatting a set of lines with extra whitespace for ease of reading (and hence arguably creating less noise in the source file despite the comment).
The text was updated successfully, but these errors were encountered: