ソースを参照

Cosmetic change: standardize whitespace after class definition.

tags/v0.2
Ben Kurtovic 11年前
コミット
34b85a93cd
11個のファイルの変更10行の追加2行の削除
  1. +1
    -0
      mwparserfromhell/nodes/argument.py
  2. +1
    -0
      mwparserfromhell/nodes/comment.py
  3. +1
    -0
      mwparserfromhell/nodes/text.py
  4. +1
    -0
      mwparserfromhell/nodes/wikilink.py
  5. +1
    -0
      mwparserfromhell/string_mixin.py
  6. +1
    -0
      tests/_test_tokenizer.py
  7. +1
    -0
      tests/test_ctokenizer.py
  8. +1
    -0
      tests/test_docs.py
  9. +1
    -0
      tests/test_pytokenizer.py
  10. +0
    -2
      tests/test_smart_list.py
  11. +1
    -0
      tests/test_string_mixin.py

+ 1
- 0
mwparserfromhell/nodes/argument.py ファイルの表示

@@ -30,6 +30,7 @@ __all__ = ["Argument"]

class Argument(Node):
"""Represents a template argument substitution, like ``{{{foo}}}``."""

def __init__(self, name, default=None):
super(Argument, self).__init__()
self._name = name


+ 1
- 0
mwparserfromhell/nodes/comment.py ファイルの表示

@@ -29,6 +29,7 @@ __all__ = ["Comment"]

class Comment(Node):
"""Represents a hidden HTML comment, like ``<!-- foobar -->``."""

def __init__(self, contents):
super(Comment, self).__init__()
self._contents = contents


+ 1
- 0
mwparserfromhell/nodes/text.py ファイルの表示

@@ -29,6 +29,7 @@ __all__ = ["Text"]

class Text(Node):
"""Represents ordinary, unformatted text with no special properties."""

def __init__(self, value):
super(Text, self).__init__()
self._value = value


+ 1
- 0
mwparserfromhell/nodes/wikilink.py ファイルの表示

@@ -30,6 +30,7 @@ __all__ = ["Wikilink"]

class Wikilink(Node):
"""Represents an internal wikilink, like ``[[Foo|Bar]]``."""

def __init__(self, title, text=None):
super(Wikilink, self).__init__()
self._title = title


+ 1
- 0
mwparserfromhell/string_mixin.py ファイルの表示

@@ -50,6 +50,7 @@ class StringMixIn(object):
:py:meth:`__unicode__` instead of the immutable ``self`` like the regular
``str`` type.
"""

if py3k:
def __str__(self):
return self.__unicode__()


+ 1
- 0
tests/_test_tokenizer.py ファイルの表示

@@ -38,6 +38,7 @@ class TokenizerTestCase(object):
TestCTokenizer. Tests are loaded dynamically from files in the 'tokenizer'
directory.
"""

@classmethod
def _build_test_method(cls, funcname, data):
"""Create and return a method to be treated as a test case method.


+ 1
- 0
tests/test_ctokenizer.py ファイルの表示

@@ -27,6 +27,7 @@ from _test_tokenizer import TokenizerTestCase

class TestCTokenizer(TokenizerTestCase, unittest.TestCase):
"""Test cases for the C tokenizer."""

@classmethod
def setUpClass(cls):
from mwparserfromhell.parser._tokenizer import CTokenizer


+ 1
- 0
tests/test_docs.py ファイルの表示

@@ -30,6 +30,7 @@ from mwparserfromhell.compat import py3k, str, StringIO

class TestDocs(unittest.TestCase):
"""Integration test cases for mwparserfromhell's documentation."""

def assertPrint(self, input, output):
"""Assertion check that *input*, when printed, produces *output*."""
buff = StringIO()


+ 1
- 0
tests/test_pytokenizer.py ファイルの表示

@@ -27,6 +27,7 @@ from _test_tokenizer import TokenizerTestCase

class TestPyTokenizer(TokenizerTestCase, unittest.TestCase):
"""Test cases for the Python tokenizer."""

@classmethod
def setUpClass(cls):
from mwparserfromhell.parser.tokenizer import Tokenizer


+ 0
- 2
tests/test_smart_list.py ファイルの表示

@@ -384,7 +384,5 @@ class TestSmartList(unittest.TestCase):
self.assertEquals([4, 3, 2, 1.9, 1.8, 5, 6, 7, 8, 8.1, 8.2], child1)
self.assertEquals([4, 3, 2, 1.9, 1.8], child2)

# also test whether children that exit scope are removed from parent's map

if __name__ == "__main__":
unittest.main(verbosity=2)

+ 1
- 0
tests/test_string_mixin.py ファイルの表示

@@ -37,6 +37,7 @@ class _FakeString(StringMixIn):

class TestStringMixIn(unittest.TestCase):
"""Test cases for the StringMixIn class."""

def test_docs(self):
"""make sure the various methods of StringMixIn have docstrings"""
methods = [


読み込み中…
キャンセル
保存