diff --git a/docs/numpydoc_example.py b/docs/numpydoc_example.py index 63cdf7c..6d16ce4 100644 --- a/docs/numpydoc_example.py +++ b/docs/numpydoc_example.py @@ -9,8 +9,6 @@ a line by itself, preferably preceded by a blank line. """ -from __future__ import absolute_import, division, print_function - import os # standard library imports first import matplotlib as mpl @@ -128,3 +126,37 @@ def foo(var1, var2, *args, long_var_name="hi", **kwargs): # But for function, method and module, there should be no blank lines # after closing the docstring. pass + + + +class TestClassDocumentation: + """ + This is an example docstring of a class. + + Unordered list: + + * multi-line + item 1 + * item 2 + * sub-item 3 + + .. note:: + This is a note inside a class docstring. + + Parameters + ---------- + filename : str + The name of the file to be read. + + """ + + def __init__(self, filename: str): + """Initialize the class. + + Parameters + ---------- + filename : str + The name of the file to be read. + + """ + self.filename = filename diff --git a/setup.py b/setup.py index 8f60a82..c3664b3 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ def dynamic_author_list(): out_path = current_dir / "mdanalysis_sphinx_theme" / "authors.py" author_lines = "\n".join([f' u"{name}",' for name in authors]) template = f"""\ -#-*- coding:utf-8 -*- +# -*- coding:utf-8 -*- # This file is generated from the AUTHORS file during the installation process. # Do not edit it as your changes will be overwritten.