Stop referencing nova HACKING guide

Since this originally came from nova, the docstrings referred to the
nova HACKING guide, now that this is a separate project refer to the
OpenStack HACKING guide instead.

Change-Id: I38c0791dfca73cf3ae114fc7292c41c0670a3987
Reviewed-on: https://review.openstack.org/29739
Reviewed-by: Sean Dague <sean@dague.net>
Approved: Monty Taylor <mordred@inaugust.com>
Reviewed-by: Monty Taylor <mordred@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Joe Gordon 2013-05-17 23:50:44 -07:00 committed by Jenkins
parent 99ecd73f47
commit 33d9a9f235

View File

@ -87,7 +87,7 @@ def import_normalize(line):
def hacking_todo_format(physical_line, tokens): def hacking_todo_format(physical_line, tokens):
"""Check for 'TODO()'. """Check for 'TODO()'.
nova HACKING guide recommendation for TODO: OpenStack HACKING guide recommendation for TODO:
Include your name with TODOs as in "#TODO(termie)" Include your name with TODOs as in "#TODO(termie)"
Okay: #TODO(sdague) Okay: #TODO(sdague)
@ -106,7 +106,7 @@ def hacking_todo_format(physical_line, tokens):
def hacking_except_format(logical_line): def hacking_except_format(logical_line):
r"""Check for 'except:'. r"""Check for 'except:'.
nova HACKING guide recommends not using except: OpenStack HACKING guide recommends not using except:
Do not write "except:", use "except Exception:" at the very least Do not write "except:", use "except Exception:" at the very least
Okay: try:\n pass\nexcept Exception:\n pass Okay: try:\n pass\nexcept Exception:\n pass
@ -120,7 +120,7 @@ def hacking_except_format(logical_line):
def hacking_except_format_assert(logical_line): def hacking_except_format_assert(logical_line):
r"""Check for 'assertRaises(Exception'. r"""Check for 'assertRaises(Exception'.
nova HACKING guide recommends not using assertRaises(Exception...): OpenStack HACKING guide recommends not using assertRaises(Exception...):
Do not use overly broad Exception type Do not use overly broad Exception type
Okay: self.assertRaises(NovaException) Okay: self.assertRaises(NovaException)
@ -140,7 +140,7 @@ RE_RELATIVE_IMPORT = re.compile('^from\s*[.]')
def hacking_import_rules(logical_line, filename): def hacking_import_rules(logical_line, filename):
r"""Check for imports. r"""Check for imports.
nova HACKING guide recommends one import per line: OpenStack HACKING guide recommends one import per line:
Do not import more than one module per line Do not import more than one module per line
Examples: Examples:
@ -150,7 +150,7 @@ def hacking_import_rules(logical_line, filename):
Imports should usually be on separate lines. Imports should usually be on separate lines.
nova HACKING guide recommends importing only modules: OpenStack HACKING guide recommends importing only modules:
Do not import objects, only modules Do not import objects, only modules
Examples: Examples:
@ -300,7 +300,7 @@ def is_docstring(physical_line, previous_logical):
def hacking_docstring_start_space(physical_line, previous_logical): def hacking_docstring_start_space(physical_line, previous_logical):
r"""Check for docstring not start with space. r"""Check for docstring not start with space.
nova HACKING guide recommendation for docstring: OpenStack HACKING guide recommendation for docstring:
Docstring should not start with space Docstring should not start with space
Okay: def foo():\n '''This is good.''' Okay: def foo():\n '''This is good.'''
@ -327,7 +327,7 @@ def hacking_docstring_start_space(physical_line, previous_logical):
def hacking_docstring_one_line(physical_line, previous_logical): def hacking_docstring_one_line(physical_line, previous_logical):
r"""Check one line docstring end. r"""Check one line docstring end.
nova HACKING guide recommendation for one line docstring: OpenStack HACKING guide recommendation for one line docstring:
A one line docstring looks like this and ends in punctuation. A one line docstring looks like this and ends in punctuation.
Okay: def foo():\n '''This is good.''' Okay: def foo():\n '''This is good.'''
@ -355,7 +355,7 @@ def hacking_docstring_one_line(physical_line, previous_logical):
def hacking_docstring_multiline_end(physical_line, previous_logical, tokens): def hacking_docstring_multiline_end(physical_line, previous_logical, tokens):
r"""Check multi line docstring end. r"""Check multi line docstring end.
nova HACKING guide recommendation for docstring: OpenStack HACKING guide recommendation for docstring:
Docstring should end on a new line Docstring should end on a new line
Okay: '''foobar\nfoo\nbar\n''' Okay: '''foobar\nfoo\nbar\n'''
@ -379,7 +379,7 @@ def hacking_docstring_multiline_end(physical_line, previous_logical, tokens):
def hacking_docstring_multiline_start(physical_line, previous_logical, tokens): def hacking_docstring_multiline_start(physical_line, previous_logical, tokens):
r"""Check multi line docstring start with summary. r"""Check multi line docstring start with summary.
nova HACKING guide recommendation for docstring: OpenStack HACKING guide recommendation for docstring:
Docstring should start with A multi line docstring has a one-line summary Docstring should start with A multi line docstring has a one-line summary
Okay: '''foobar\nfoo\nbar\n''' Okay: '''foobar\nfoo\nbar\n'''
@ -598,8 +598,8 @@ class GitCheck(GlobalCheck):
class OnceGitCheckCommitTitleBug(GitCheck): class OnceGitCheckCommitTitleBug(GitCheck):
"""Check git commit messages for bugs. """Check git commit messages for bugs.
nova HACKING recommends not referencing a bug or blueprint in first line, OpenStack HACKING recommends not referencing a bug or blueprint in first
it should provide an accurate description of the change line, it should provide an accurate description of the change
H801 H801
""" """
name = "GitCheckCommitTitleBug" name = "GitCheckCommitTitleBug"