Correct H301 and H302 violations

Bug #1291032 reported by Brandon Logan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Wishlist
Jakub Libosvar

Bug Description

There are many violations of this rule. Originally it was intended to only fix H302 but flake8 will not check for H302 unless H301 is enabled as well. So must fix them both at the same time.

Changed in neutron:
assignee: nobody → Brandon Logan (brandon-logan)
Changed in neutron:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
status: Confirmed → In Progress
summary: - some lbaas imports violate openstack hacking
+ Correct H301 and H302 violations
description: updated
Changed in neutron:
importance: Undecided → Wishlist
Changed in neutron:
assignee: Brandon Logan (brandon-logan) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in neutron:
assignee: nobody → Matthew Treinish (treinish)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/84258
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0755e7b379232285e434d827eeb854260a1db595
Submitter: Jenkins
Branch: master

commit 0755e7b379232285e434d827eeb854260a1db595
Author: Matthew Treinish <email address hidden>
Date: Mon Mar 31 17:17:44 2014 -0400

    Enable hacking H301 check

    This commit enables the H301 hacking rule by removing all the
    multiple imports in a single line from neutron.

    Partial-Bug: #1291032

    Change-Id: I7ba7f82fb36a433d73190eb3d568b6961ccb57c6

Changed in neutron:
assignee: Matthew Treinish (treinish) → nobody
Changed in neutron:
assignee: nobody → Jakub Libosvar (libosvar)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/88573

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/88576

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/88578

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/88603

Changed in neutron:
milestone: none → juno-1
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to neutron (master)

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

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/88573
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=e7d5f8b15ae29ed0988b4bc3a352a9cbe60d4a92
Submitter: Jenkins
Branch: master

commit e7d5f8b15ae29ed0988b4bc3a352a9cbe60d4a92
Author: Jakub Libosvar <email address hidden>
Date: Fri Apr 18 15:22:45 2014 +0200

    Fix H302 violations in db package and services

    Change-Id: If5e07fa4529430ba90d9c7dd81d28ceeee00ebe0
    Partial-Bug: #1291032

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Reviewed: https://review.openstack.org/88576
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=d1c0e73bc6247d4f4e7093eadb0df6186ae2546e
Submitter: Jenkins
Branch: master

commit d1c0e73bc6247d4f4e7093eadb0df6186ae2546e
Author: Jakub Libosvar <email address hidden>
Date: Fri Apr 18 15:31:55 2014 +0200

    Fix H302 violations in extensions package

    H302 violation is reported by flake8 when importing separated objects from
    modules instead of importing the whole module.
    e.g. from package.module import function
           function()
    is changed to
           from package import module
           module.function()

    Change-Id: I570eeee2a7633c1590b54ac98b411a71fc9d4f4e
    Partial-Bug: #1291032

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Reviewed: https://review.openstack.org/89628
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=c2634fa580b9b5e1c55bb6dc7eb02f0de989d747
Submitter: Jenkins
Branch: master

commit c2634fa580b9b5e1c55bb6dc7eb02f0de989d747
Author: Jakub Libosvar <email address hidden>
Date: Fri Apr 18 15:30:32 2014 +0200

    Fix H302 violations in unit tests

    H302 violation is reported by flake8 when importing separated objects from
    modules instead of importing the whole module.
    e.g. from package.module import function
           function()
    is changed to
           from package import module
           module.function()

    Change-Id: Ic6975f39c755ded54149a9c01fcdcfaf78c596fc
    Partial-Bug: #1291032

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote :

Reviewed: https://review.openstack.org/88603
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1a116d24a955c9e45fa8a29998d09da0350be4ab
Submitter: Jenkins
Branch: master

commit 1a116d24a955c9e45fa8a29998d09da0350be4ab
Author: Jakub Libosvar <email address hidden>
Date: Fri Apr 18 15:29:49 2014 +0200

    Fix H302 violations in plugins package

    H302 violation is reported by flake8 when importing separated objects from
    modules instead of importing the whole module.
    e.g. from package.module import function
           function()
    is changed to
           from package import module
           module.function()

    Change-Id: I83372124f4fba7b94bbfb4a56a0c0ef779ee237f
    Partial-Bug: #1291032

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/88578
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=ea1aa7794585c7cca3118ece282e08cfb760218b
Submitter: Jenkins
Branch: master

commit ea1aa7794585c7cca3118ece282e08cfb760218b
Author: Jakub Libosvar <email address hidden>
Date: Fri Apr 18 15:32:40 2014 +0200

    Fix H302 violations

    H302 violation is reported by flake8 when importing separated objects from
    modules instead of importing the whole module.
    e.g. from package.module import function
           function()
    is changed to
           from package import module
           module.function()

    Change-Id: Ifbf31b52316d3cade40743752a49ce700f384a21
    Closes-Bug: #1291032

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
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.