pep8 task reports errors in Python files in .ropeproject directories

Bug #1414869 reported by Miguel Grinberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Undecided
Miguel Grinberg

Bug Description

I use vim with the python-mode plugin to work on Heat. The python-mode plugin includes rope, which creates a .ropeproject directory where it stores data, some of it Python source files. See http://rope.sourceforge.net/overview.html#ropeproject-folder for more details.

The problem is that the flake8 configuration is set to spider all folders looking for Python files to check, and some files in the .ropeproject directory are (justly) flagged by flake8 as having compliance issues.

I propose that an exception for the .ropeproject folder is added.

summary: - pep8 task includes Python files in .ropeproject directories
+ pep8 task reports errors in Python files in .ropeproject directories
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/150237

Changed in heat:
assignee: nobody → Miguel Grinberg (miguelgrinberg)
status: New → In Progress
description: updated
description: updated
Revision history for this message
Pavlo Shchelokovskyy (pshchelo) wrote :

not sure what the actual problem is - "tox -epep8" is told exactly where to search for python files with this line in our tox.ini

https://github.com/openstack/heat/blob/master/tox.ini#L34

so even if you have such folder in heat repo root, the tox pep8 job should run just fine. Or is it about flake8 complaints while you are actually coding?

Overall I'm against adding editor/IDE-specifics into the project tree. Not sure, but does flake8 merges project config and user config (at ~/.config/flake8)?

BTW, you can also take a look at Jedi and vim-jedi - I'm using them with python-mode and they are nice ;)

https://github.com/pshchelo/dotfiles/blob/master/vim/vimrc

Revision history for this message
Miguel Grinberg (miguelgrinberg) wrote :

Pavlo, the problem is that these .ropeproject folders show up in internal folders, not only at the root level.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to heat (master)

Reviewed: https://review.openstack.org/150237
Committed: https://git.openstack.org/cgit/openstack/heat/commit/?id=9cd15afe74ed42f8df3459183236da733dcb9cae
Submitter: Jenkins
Branch: master

commit 9cd15afe74ed42f8df3459183236da733dcb9cae
Author: Miguel Grinberg <email address hidden>
Date: Tue Jan 27 03:04:43 2015 +0000

    Add all dotfiles to the list of pep8 exceptions

    This helps avoid bogus errors in third party configuration files such as
    those in .ropeproject folders.

    Change-Id: I4988b5d5dc150d5ee949266916d0f06a4d4176ce
    Closes-Bug: 1414869

Changed in heat:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-2 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.