Skip to content

Commit 5c3b501

Browse files
committed
PyCQA#129 - Adding a convention to pydocstyle
1 parent 93a3656 commit 5c3b501

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/pydocstyle.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,11 @@ def __getattr__(self, item):
734734

735735
conventions = AttrDict({
736736
'pep257': set(ErrorRegistry.get_error_codes()) - set(['D203', 'D212',
737-
'D213'])
737+
'D213', 'D214',
738+
'D404', 'D405',
739+
'D406']),
740+
'numpy': set(ErrorRegistry.get_error_codes()) - set(['D203', 'D212',
741+
'D213', 'D402'])
738742
})
739743

740744

src/tests/test_integration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ def test_illegal_convention(env):
358358
out, err, code = env.invoke('--convention=illegal_conv')
359359
assert code == 2
360360
assert "Illegal convention 'illegal_conv'." in err
361-
assert 'Possible conventions: pep257' in err
361+
assert 'Possible conventions' in err
362+
assert 'pep257' in err
362363

363364

364365
def test_empty_select_cli(env):

0 commit comments

Comments
 (0)