Ask Your Question

how can i resolve indentation error ?

asked 2013-07-13 23:06:06 -0500

Anju gravatar image

updated 2013-07-29 17:14:25 -0500

smaffulli gravatar image

only jenkins showing this error after subbiting the code for review

edit retag flag offensive close merge delete


Quick Tip: Always use space instead of tabs. Tabs have different number of spaces on different operating environments.

coolsvap gravatar imagecoolsvap ( 2013-09-23 08:47:35 -0500 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2013-07-28 13:06:48 -0500

fifieldt gravatar image

Please read PEP8 - Style guide for python:

It has the rules you need to follow

edit flag offensive delete link more

answered 2013-09-23 08:17:10 -0500

The review comment left by Jenkins should include a hyperlink to the log for the failed job, which contains verbose output from the pep8 or flake8 tool describing what specific lines of code aren't compliant with OpenStack's style requirements (we perform more static analysis in those jobs than simple PEP-8 validation) and which particular rules triggered the failure. From that information it should be possible to identify and correct the issues with your change.

You can also repeat these same checks yourself by running 'tox -e pep8' from your working copy of the repository, though you will probably need a fairly recent version of tox installed on your machine (I prefer to pip install the latest tox package from PyPI into a separate virtualenv and run that since globally installing packages with pip is a bit dangerous, but that's a topic for another question).

edit flag offensive delete link more

answered 2013-09-23 08:29:42 -0500

sumanth gravatar image

I would recommend flake8 to check this. The script, also uses flake8 to check indentation errors. You can do ./run_tests -p, just to check for pep8 and indentation capability.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-07-13 23:06:06 -0500

Seen: 350 times

Last updated: Sep 23 '13