2016-11-02 23:29:28 +00:00
|
|
|
"""Example module
|
2015-05-29 21:29:56 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
This is a description
|
2016-06-09 22:43:55 +00:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
class Foo(object):
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
class_var = 42 #: Class var docstring
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
another_class_var = 42
|
|
|
|
"""Another class var docstring"""
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
class Meta(object):
|
|
|
|
"""A nested class just to test things out"""
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
@classmethod
|
|
|
|
def foo():
|
|
|
|
"""The foo class method"""
|
|
|
|
return True
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
def method_okay(self, foo=None, bar=None):
|
|
|
|
"""This method should parse okay"""
|
2016-06-09 22:43:55 +00:00
|
|
|
return True
|
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
def method_multiline(self, foo=None, bar=None,
|
|
|
|
baz=None):
|
|
|
|
"""This is on multiple lines, but should parse okay too
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
pydocstyle gives us lines of source. Test if this means that multiline
|
|
|
|
definitions are covered in the way we're anticipating here
|
2016-06-09 22:43:55 +00:00
|
|
|
"""
|
2016-11-02 23:29:28 +00:00
|
|
|
return True
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
def method_tricky(self, foo=None, bar=dict(foo=1, bar=2)):
|
|
|
|
"""This will likely fail our argument testing
|
2016-06-09 22:43:55 +00:00
|
|
|
|
2016-11-02 23:29:28 +00:00
|
|
|
We parse naively on commas, so the nested dictionary will throw this off
|
2016-06-09 22:43:55 +00:00
|
|
|
"""
|
2016-11-02 23:29:28 +00:00
|
|
|
return True
|