Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docstring cleanups #181

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions src/hawkmoth/docstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,6 @@ def get_name(self):
def get_line(self):
return self._meta['line']

class RootDocstring(Docstring):
def __init__(self, filename=None, domain='c', clang_args=None):
super().__init__(domain=domain)
self._filename = filename
self._clang_args = clang_args

def get_filename(self):
return self._filename

def get_clang_args(self):
return self._clang_args

def get_domain(self):
return self._domain

class TextDocstring(Docstring):
_indent = 0
_fmt = ''
Expand Down Expand Up @@ -271,6 +256,21 @@ def _get_decl_name(self):

return self._decl_name

class RootDocstring(_CompoundDocstring):
jnikula marked this conversation as resolved.
Show resolved Hide resolved
def __init__(self, filename=None, domain='c', clang_args=None):
super().__init__(domain=domain)
self._filename = filename
self._clang_args = clang_args

def get_filename(self):
return self._filename

def get_clang_args(self):
return self._clang_args

def get_domain(self):
return self._domain

class StructDocstring(_CompoundDocstring):
_indent = 1
_fmt = '.. {domain}:struct:: {name}'
Expand Down