Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • pycqa/pydocstyle
1 result
Show changes
Commits on Source (6)
Loading
Loading
@@ -12,6 +12,8 @@ New Features
 
* Public nested classes missing a docstring are now reported as D106 instead
of D101 (#198, #261).
* ``__init__`` methods missing a docstring are now reported as D107 instead of
D102 (#273, #277).
* Added support for Python 3.6 (#270).
 
Bug Fixes
Loading
Loading
Loading
Loading
@@ -116,7 +116,8 @@ class ConventionChecker(object):
Class: violations.D101,
NestedClass: violations.D106,
Method: (lambda: violations.D105() if definition.is_magic
else violations.D102()),
else (violations.D107() if definition.is_init
else violations.D102())),
Function: violations.D103,
NestedFunction: violations.D103,
Package: violations.D104}
Loading
Loading
Loading
Loading
@@ -166,6 +166,11 @@ class Method(Function):
self.name.endswith('__') and
self.name not in VARIADIC_MAGIC_METHODS)
 
@property
def is_init(self):
"""Return True iff this method is `__init__`."""
return self.name == '__init__'
@property
def is_public(self):
"""Return True iff this method should be considered public."""
Loading
Loading
Loading
Loading
@@ -159,6 +159,7 @@ D103 = D1xx.create_error('D103', 'Missing docstring in public function')
D104 = D1xx.create_error('D104', 'Missing docstring in public package')
D105 = D1xx.create_error('D105', 'Missing docstring in magic method')
D106 = D1xx.create_error('D106', 'Missing docstring in public nested class')
D107 = D1xx.create_error('D107', 'Missing docstring in __init__')
 
D2xx = ErrorRegistry.create_group('D2', 'Whitespace Issues')
D200 = D2xx.create_error('D200', 'One-line docstring should fit on one line '
Loading
Loading
Loading
Loading
@@ -27,6 +27,10 @@ class class_:
pass
 
@expect('D102: Missing docstring in public method')
def __new__(self=None):
pass
@expect('D107: Missing docstring in __init__')
def __init__(self=None):
pass
 
Loading
Loading