Browse Source

Move mwpfh.parser.utils to mwpfh.utils; fix import structure.

tags/v0.1
Ben Kurtovic 12 years ago
parent
commit
900c559385
4 changed files with 4 additions and 4 deletions
  1. +1
    -1
      mwparserfromhell/nodes/extras/parameter.py
  2. +1
    -1
      mwparserfromhell/nodes/template.py
  3. +1
    -1
      mwparserfromhell/utils.py
  4. +1
    -1
      mwparserfromhell/wikicode.py

+ 1
- 1
mwparserfromhell/nodes/extras/parameter.py View File

@@ -20,8 +20,8 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.


from mwparserfromhell.parser.utils import parse_anything
from mwparserfromhell.string_mixin import StringMixIn from mwparserfromhell.string_mixin import StringMixIn
from mwparserfromhell.utils import parse_anything


__all__ = ["Parameter"] __all__ = ["Parameter"]




+ 1
- 1
mwparserfromhell/nodes/template.py View File

@@ -22,7 +22,7 @@


from mwparserfromhell.nodes import Node from mwparserfromhell.nodes import Node
from mwparserfromhell.nodes.extras import Parameter from mwparserfromhell.nodes.extras import Parameter
from mwparserfromhell.parser.utils import parse_anything
from mwparserfromhell.utils import parse_anything


__all__ = ["Template"] __all__ = ["Template"]




mwparserfromhell/parser/utils.py → mwparserfromhell/utils.py View File

@@ -22,9 +22,9 @@


import mwparserfromhell import mwparserfromhell
from mwparserfromhell.nodes import Node from mwparserfromhell.nodes import Node
from mwparserfromhell.wikicode import Wikicode


def parse_anything(value): def parse_anything(value):
Wikicode = mwparserfromhell.wikicode.Wikicode
if isinstance(value, Wikicode): if isinstance(value, Wikicode):
return value return value
if isinstance(value, Node): if isinstance(value, Node):

+ 1
- 1
mwparserfromhell/wikicode.py View File

@@ -23,8 +23,8 @@
import re import re


from mwparserfromhell.nodes import HTMLEntity, Node, Template, Text from mwparserfromhell.nodes import HTMLEntity, Node, Template, Text
from mwparserfromhell.parser.utils import parse_anything
from mwparserfromhell.string_mixin import StringMixIn from mwparserfromhell.string_mixin import StringMixIn
from mwparserfromhell.utils import parse_anything


__all__ = ["Wikicode"] __all__ = ["Wikicode"]




Loading…
Cancel
Save