Ver a proveniência

Fix docstrings of generated filter methods.

tags/v0.2
Ben Kurtovic há 11 anos
ascendente
cometimento
bbaf09dbf8
1 ficheiros alterados com 3 adições e 3 eliminações
  1. +3
    -3
      mwparserfromhell/wikicode.py

+ 3
- 3
mwparserfromhell/wikicode.py Ver ficheiro

@@ -168,7 +168,7 @@ class Wikicode(StringMixIn):
doc = """Iterate over {0}.

This is equivalent to :py:meth:`{1}` with *forcetype* set to
:py:class:`~.{2}`.
:py:class:`~{2.__module__}.{2.__name__}`.
"""
make_ifilter = lambda ftype: (lambda self, **kw:
self.ifilter(forcetype=ftype, **kw))
@@ -177,8 +177,8 @@ class Wikicode(StringMixIn):
for name, ftype in (meths.items() if py3k else meths.iteritems()):
ifilter = make_ifilter(ftype)
filter = make_filter(ftype)
ifilter.__doc__ = doc.format(name, "ifilter", ftype.__name__)
filter.__doc__ = doc.format(name, "filter", ftype.__name__)
ifilter.__doc__ = doc.format(name, "ifilter", ftype)
filter.__doc__ = doc.format(name, "filter", ftype)
setattr(cls, "ifilter_" + name, ifilter)
setattr(cls, "filter_" + name, filter)



Carregando…
Cancelar
Guardar