Skip to content

Commit

Permalink
Somewhat dirty fix for generated documentation of chain
Browse files Browse the repository at this point in the history
  • Loading branch information
levitsky committed Nov 2, 2023
1 parent 8c7bdf9 commit a62f59b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pyteomics/auxiliary/file_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ class ChainBase(object):
file names or file objects. Keyword arguments are passed to
the :meth:`sequence_maker` function.
Attributes
Parameters
----------
sources : :class:`Iterable`
Sources for creating new sequences from, such as paths or
Expand All @@ -1161,11 +1161,13 @@ def from_iterable(cls, sources, **kwargs):
def _make_chain(cls, sequence_maker):
if isinstance(sequence_maker, type):
tp = type('%sChain' % sequence_maker.__class__.__name__, (cls,), {
'sequence_maker': sequence_maker
'sequence_maker': sequence_maker,
'__doc__': cls.__doc__.replace(':meth:`sequence_maker`', ':class:`{}`'.format(sequence_maker.__name__))
})
else:
tp = type('FunctionChain', (cls,), {
'sequence_maker': staticmethod(sequence_maker)
'sequence_maker': staticmethod(sequence_maker),
'__doc__': cls.__doc__.replace(':meth:`sequence_maker`', ':func:`{}`'.format(sequence_maker.__name__))
})
return tp

Expand Down

0 comments on commit a62f59b

Please sign in to comment.