diff --git a/nova/api/metadata/__init__.py b/nova/api/metadata/__init__.py index 964707ba79ba..e4715a91c51e 100644 --- a/nova/api/metadata/__init__.py +++ b/nova/api/metadata/__init__.py @@ -19,5 +19,4 @@ .. automodule:: nova.api.metadata :platform: Unix :synopsis: Metadata Server for Nova -.. moduleauthor:: Vishvananda Ishaya """ diff --git a/nova/console/__init__.py b/nova/console/__init__.py index f7fabcd5feda..2f9cc4d00812 100644 --- a/nova/console/__init__.py +++ b/nova/console/__init__.py @@ -19,5 +19,4 @@ :platform: Unix :synopsis: Wrapper around console proxies such as xvp to set up multitenant VM console access -.. moduleauthor:: Monsyne Dragon """ diff --git a/nova/hacking/checks.py b/nova/hacking/checks.py index 9bb974e5ea1d..d68aa65c5799 100644 --- a/nova/hacking/checks.py +++ b/nova/hacking/checks.py @@ -37,7 +37,8 @@ virt_import_re = re.compile( r"^\s*(?:import|from) nova\.(?:tests\.)?virt\.(\w+)") virt_config_re = re.compile( r"CONF\.import_opt\('.*?', 'nova\.virt\.(\w+)('|.)") -author_tag_re = re.compile("^\s*#\s*@?(a|A)uthor:") +author_tag_re = (re.compile("^\s*#\s*@?(a|A)uthor:"), + re.compile("^\.\.\s+moduleauthor::")) asse_trueinst_re = re.compile( r"(.)*assertTrue\(isinstance\((\w|\.|\'|\"|\[|\])+, " "(\w|\.|\'|\"|\[|\])+\)\)") @@ -158,9 +159,13 @@ def no_vi_headers(physical_line, line_number, lines): def no_author_tags(physical_line): - if author_tag_re.match(physical_line): - pos = physical_line.find('author') - return pos, "N315: Don't use author tags" + for regex in author_tag_re: + if regex.match(physical_line): + physical_line = physical_line.lower() + pos = physical_line.find('moduleauthor') + if pos < 0: + pos = physical_line.find('author') + return pos, "N315: Don't use author tags" def assert_true_instance(logical_line): diff --git a/nova/scheduler/__init__.py b/nova/scheduler/__init__.py index ff2609381f9e..7b776afe3bed 100644 --- a/nova/scheduler/__init__.py +++ b/nova/scheduler/__init__.py @@ -19,7 +19,4 @@ .. automodule:: nova.scheduler :platform: Unix :synopsis: Module that picks a compute node to run a VM instance. -.. moduleauthor:: Sandy Walsh -.. moduleauthor:: Ed Leafe -.. moduleauthor:: Chris Behrens """ diff --git a/nova/tests/test_hacking.py b/nova/tests/test_hacking.py index ca3ae9734377..f7a746d3caf4 100644 --- a/nova/tests/test_hacking.py +++ b/nova/tests/test_hacking.py @@ -54,7 +54,11 @@ class HackingTestCase(test.NoDBTestCase): self.assertTrue(checks.no_author_tags("# @author: jogo")) self.assertTrue(checks.no_author_tags("# @Author: jogo")) self.assertTrue(checks.no_author_tags("# Author: jogo")) + self.assertTrue(checks.no_author_tags(".. moduleauthor:: jogo")) self.assertFalse(checks.no_author_tags("# authorization of this")) + self.assertEqual(2, checks.no_author_tags("# author: jogo")[0]) + self.assertEqual(2, checks.no_author_tags("# Author: jogo")[0]) + self.assertEqual(3, checks.no_author_tags(".. moduleauthor:: jogo")[0]) def test_assert_true_instance(self): self.assertEqual(len(list(checks.assert_true_instance(