Skip to content

changed imports to relative imports #172

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 1 addition & 2 deletions pystache/__init__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@

"""
TODO: add a docstring.

"""

# We keep all initialization code in a separate module.

from pystache.init import parse, render, Renderer, TemplateSpec
from .init import parse, render, Renderer, TemplateSpec

__all__ = ['parse', 'render', 'Renderer', 'TemplateSpec']

Expand Down
2 changes: 1 addition & 1 deletion pystache/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

"""

from pystache.common import PystacheError
from .common import PystacheError


# This equals '__builtin__' in Python 2 and 'builtins' in Python 3.
Expand Down
2 changes: 1 addition & 1 deletion pystache/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import os
import sys

from pystache.common import MissingTags
from .common import MissingTags


# How to handle encoding errors when decoding strings from str to unicode.
Expand Down
6 changes: 3 additions & 3 deletions pystache/init.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

"""

from pystache.parser import parse
from pystache.renderer import Renderer
from pystache.template_spec import TemplateSpec
from .parser import parse
from .renderer import Renderer
from .template_spec import TemplateSpec


def render(template, context=None, **kwargs):
Expand Down
6 changes: 3 additions & 3 deletions pystache/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import os
import sys

from pystache import common
from pystache import defaults
from pystache.locator import Locator
from . import common
from . import defaults
from .locator import Locator


# We make a function so that the current defaults take effect.
Expand Down
4 changes: 2 additions & 2 deletions pystache/locator.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
import re
import sys

from pystache.common import TemplateNotFoundError
from pystache import defaults
from .common import TemplateNotFoundError
from . import defaults


class Locator(object):
Expand Down
4 changes: 2 additions & 2 deletions pystache/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import re

from pystache import defaults
from pystache.parsed import ParsedTemplate
from . import defaults
from .parsed import ParsedTemplate


END_OF_LINE_CHARACTERS = [u'\r', u'\n']
Expand Down
4 changes: 2 additions & 2 deletions pystache/renderengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import re

from pystache.common import is_string
from pystache.parser import parse
from .common import is_string
from .parser import parse


def context_get(stack, name):
Expand Down
16 changes: 8 additions & 8 deletions pystache/renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

import sys

from pystache import defaults
from pystache.common import TemplateNotFoundError, MissingTags, is_string
from pystache.context import ContextStack, KeyNotFoundError
from pystache.loader import Loader
from pystache.parsed import ParsedTemplate
from pystache.renderengine import context_get, RenderEngine
from pystache.specloader import SpecLoader
from pystache.template_spec import TemplateSpec
from . import defaults
from .common import TemplateNotFoundError, MissingTags, is_string
from .context import ContextStack, KeyNotFoundError
from .loader import Loader
from .parsed import ParsedTemplate
from .renderengine import context_get, RenderEngine
from .specloader import SpecLoader
from .template_spec import TemplateSpec


class Renderer(object):
Expand Down
2 changes: 1 addition & 1 deletion pystache/specloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import os.path

from pystache.loader import Loader
from .loader import Loader


# TODO: add test cases for this class.
Expand Down