Clean imports in code

In some part in the code we import objects. In the Openstack style
guidelines they recommend to import only modules.

http://docs.openstack.org/developer/hacking/#imports

Change-Id: Ie33116d43d7d4ed663df952874911fa8814183a2
This commit is contained in:
Nguyen Hung Phuong 2016-09-09 15:57:48 +07:00
parent 050892150c
commit 770cf213a1
4 changed files with 8 additions and 8 deletions

View File

@ -20,14 +20,14 @@ import re
from docutils import nodes
from docutils.parsers import rst
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives.tables import Table
from docutils.parsers.rst.directives import tables
from docutils.statemachine import ViewList
from sphinx.util.nodes import nested_parse_with_titles
import projects
class ExtraATCsTable(Table):
class ExtraATCsTable(tables.Table):
"""List the extra ATCs for the given project.
"""

View File

@ -16,7 +16,7 @@
import re
from docutils import nodes
from docutils.parsers.rst.directives.tables import Table
from docutils.parsers.rst.directives import tables
from docutils.parsers.rst import directives
# Full name (IRC nickname) [expires in] {role}
@ -39,7 +39,7 @@ def _parse_members_file(app, filename):
yield m.groupdict()
class MembersTable(Table):
class MembersTable(tables.Table):
"""Insert the members table using the referenced file as source.
"""

View File

@ -15,7 +15,7 @@
from docutils import nodes
from docutils.parsers import rst
from docutils.statemachine import ViewList
from docutils import statemachine
from sphinx.util.nodes import nested_parse_with_titles
import projects
@ -43,7 +43,7 @@ class TaggedProjectsDirective(rst.Directive):
return [error]
# Build the view of the data to be parsed for rendering.
result = ViewList()
result = statemachine.ViewList()
project_data = _projects_by_tag.get(tagname)
source_name = '<' + __name__ + '>'
if not project_data:

View File

@ -15,7 +15,7 @@
from docutils import nodes
from docutils.parsers import rst
from docutils.statemachine import ViewList
from docutils import statemachine
from sphinx.util.nodes import nested_parse_with_titles
import projects
@ -124,7 +124,7 @@ class TeamsListDirective(rst.Directive):
all_teams = projects.get_project_data()
# Build the view of the data to be parsed for rendering.
result = ViewList()
result = statemachine.ViewList()
for team_name in sorted(all_teams.keys()):
team_info = all_teams[team_name]
for line in _team_to_rst(team_name, team_info):