| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -6,7 +6,7 @@ pip install setuptools | |||
| 6 | 6 | ||
| 7 | 7 | if [[ $RUN == nosetests ]]; then | |
| 8 | 8 | # core dependencies | |
| 9 | - pop install -r requirements.txt | ||
| 9 | + pip install -r requirements.txt | ||
| 10 | 10 | # filewatch specific dependencies | |
| 11 | 11 | pip install watchdog | |
| 12 | 12 | # jedi specific dependencies | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,10 +20,12 @@ | |||
| 20 | 20 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 21 | 21 | # THE SOFTWARE. | |
| 22 | 22 | ||
| 23 | + from __future__ import absolute_import | ||
| 24 | + | ||
| 23 | 25 | import os.path | |
| 24 | 26 | ||
| 25 | 27 | try: | |
| 26 | - from bpython._version import __version__ as version | ||
| 28 | + from ._version import __version__ as version | ||
| 27 | 29 | except ImportError: | |
| 28 | 30 | version = 'unknown' | |
| 29 | 31 | ||
@@ -32,5 +34,5 @@ | |||
| 32 | 34 | ||
| 33 | 35 | ||
| 34 | 36 | def embed(locals_=None, args=['-i', '-q'], banner=None): | |
| 35 | - from bpython.curtsies import main | ||
| 37 | + from .curtsies import main | ||
| 36 | 38 | return main(args, locals_, banner) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -34,6 +34,8 @@ | |||
| 34 | 34 | - py3: True if the hosting Python runtime is of Python version 3 or later | |
| 35 | 35 | """ | |
| 36 | 36 | ||
| 37 | + from __future__ import absolute_import | ||
| 38 | + | ||
| 37 | 39 | import sys | |
| 38 | 40 | ||
| 39 | 41 | py3 = (sys.version_info[0] == 3) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,16 +4,17 @@ | |||
| 4 | 4 | Module to handle command line argument parsing, for all front-ends. | |
| 5 | 5 | """ | |
| 6 | 6 | ||
| 7 | - from __future__ import print_function | ||
| 7 | + from __future__ import print_function, absolute_import | ||
| 8 | + | ||
| 8 | 9 | import code | |
| 9 | 10 | import imp | |
| 10 | 11 | import os | |
| 11 | 12 | import sys | |
| 12 | 13 | from optparse import OptionParser, OptionGroup | |
| 13 | 14 | ||
| 14 | - from bpython import __version__ | ||
| 15 | - from bpython.config import default_config_path, loadini, Struct | ||
| 16 | - from bpython.translations import _ | ||
| 15 | + from . import __version__ | ||
| 16 | + from .config import default_config_path, loadini, Struct | ||
| 17 | + from .translations import _ | ||
| 17 | 18 | ||
| 18 | 19 | ||
| 19 | 20 | class OptionParserFailed(ValueError): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ | |||
| 23 | 23 | # THE SOFTWARE. | |
| 24 | 24 | # | |
| 25 | 25 | ||
| 26 | - from __future__ import unicode_literals | ||
| 26 | + from __future__ import unicode_literals, absolute_import | ||
| 27 | 27 | ||
| 28 | 28 | import __main__ | |
| 29 | 29 | import abc | |
@@ -37,14 +37,14 @@ | |||
| 37 | 37 | from six.moves import range, builtins | |
| 38 | 38 | from six import string_types, iteritems | |
| 39 | 39 | ||
| 40 | - from bpython import inspection | ||
| 41 | - from bpython import importcompletion | ||
| 42 | - from bpython import line as lineparts | ||
| 43 | - from bpython.line import LinePart | ||
| 44 | - from bpython._py3compat import py3, try_decode | ||
| 45 | - from bpython.lazyre import LazyReCompile | ||
| 46 | - from bpython.simpleeval import (safe_eval, evaluate_current_expression, | ||
| 47 | - EvaluationError) | ||
| 40 | + from . import inspection | ||
| 41 | + from . import importcompletion | ||
| 42 | + from . import line as lineparts | ||
| 43 | + from .line import LinePart | ||
| 44 | + from ._py3compat import py3, try_decode | ||
| 45 | + from .lazyre import LazyReCompile | ||
| 46 | + from .simpleeval import (safe_eval, evaluate_current_expression, | ||
| 47 | + EvaluationError) | ||
| 48 | 48 | ||
| 49 | 49 | if not py3: | |
| 50 | 50 | from types import InstanceType, ClassType | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,7 +39,7 @@ | |||
| 39 | 39 | # - Instead the suspend key exits the program | |
| 40 | 40 | # - View source doesn't work on windows unless you install the less program (From GnuUtils or Cygwin) | |
| 41 | 41 | ||
| 42 | - from __future__ import division | ||
| 42 | + from __future__ import division, absolute_import | ||
| 43 | 43 | ||
| 44 | 44 | import platform | |
| 45 | 45 | import os | |
@@ -63,27 +63,27 @@ | |||
| 63 | 63 | # These are used for syntax highlighting | |
| 64 | 64 | from pygments import format | |
| 65 | 65 | from pygments.formatters import TerminalFormatter | |
| 66 | - from bpython._py3compat import PythonLexer | ||
| 66 | + from ._py3compat import PythonLexer | ||
| 67 | 67 | from pygments.token import Token | |
| 68 | - from bpython.formatter import BPythonFormatter | ||
| 68 | + from .formatter import BPythonFormatter | ||
| 69 | 69 | ||
| 70 | 70 | # This for completion | |
| 71 | - from bpython import importcompletion | ||
| 71 | + from . import importcompletion | ||
| 72 | 72 | ||
| 73 | 73 | # This for config | |
| 74 | - from bpython.config import Struct, getpreferredencoding | ||
| 74 | + from .config import Struct, getpreferredencoding | ||
| 75 | 75 | ||
| 76 | 76 | # This for keys | |
| 77 | - from bpython.keys import cli_key_dispatch as key_dispatch | ||
| 77 | + from .keys import cli_key_dispatch as key_dispatch | ||
| 78 | 78 | ||
| 79 | 79 | # This for i18n | |
| 80 | - from bpython import translations | ||
| 81 | - from bpython.translations import _ | ||
| 80 | + from . import translations | ||
| 81 | + from .translations import _ | ||
| 82 | 82 | ||
| 83 | - from bpython import repl | ||
| 84 | - from bpython._py3compat import py3 | ||
| 85 | - from bpython.pager import page | ||
| 86 | - import bpython.args | ||
| 83 | + from . import repl | ||
| 84 | + from ._py3compat import py3 | ||
| 85 | + from .pager import page | ||
| 86 | + from .args import parse as argsparse | ||
| 87 | 87 | ||
| 88 | 88 | if not py3: | |
| 89 | 89 | import inspect | |
@@ -1946,7 +1946,7 @@ def main(args=None, locals_=None, banner=None): | |||
| 1946 | 1946 | translations.init() | |
| 1947 | 1947 | ||
| 1948 | 1948 | ||
| 1949 | - config, options, exec_args = bpython.args.parse(args) | ||
| 1949 | + config, options, exec_args = argsparse(args) | ||
| 1950 | 1950 | ||
| 1951 | 1951 | # Save stdin, stdout and stderr for later restoration | |
| 1952 | 1952 | orig_stdin = sys.stdin | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,8 @@ | |||
| 22 | 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 23 | 23 | # THE SOFTWARE. | |
| 24 | 24 | ||
| 25 | + from __future__ import absolute_import | ||
| 26 | + | ||
| 25 | 27 | import subprocess | |
| 26 | 28 | import os | |
| 27 | 29 | import platform | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # encoding: utf-8 | |
| 2 | 2 | ||
| 3 | - from __future__ import unicode_literals | ||
| 3 | + from __future__ import unicode_literals, absolute_import | ||
| 4 | 4 | ||
| 5 | 5 | import os | |
| 6 | 6 | import sys | |
@@ -9,8 +9,8 @@ | |||
| 9 | 9 | from six import iterkeys, iteritems | |
| 10 | 10 | from six.moves.configparser import ConfigParser | |
| 11 | 11 | ||
| 12 | - from bpython.keys import cli_key_dispatch as key_dispatch | ||
| 13 | - from bpython.autocomplete import SIMPLE as default_completion, ALL_MODES | ||
| 12 | + from .autocomplete import SIMPLE as default_completion, ALL_MODES | ||
| 13 | + from .keys import cli_key_dispatch as cli_key_dispatch | ||
| 14 | 14 | ||
| 15 | 15 | ||
| 16 | 16 | class Struct(object): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,16 +13,16 @@ | |||
| 13 | 13 | import curtsies.input | |
| 14 | 14 | import curtsies.events | |
| 15 | 15 | ||
| 16 | - from bpython.curtsiesfrontend.repl import BaseRepl | ||
| 17 | - from bpython.curtsiesfrontend.coderunner import SystemExitFromCodeRunner | ||
| 18 | - from bpython.curtsiesfrontend.interpreter import Interp | ||
| 19 | - from bpython import args as bpargs | ||
| 20 | - from bpython import translations | ||
| 21 | - from bpython.translations import _ | ||
| 22 | - from bpython.importcompletion import find_iterator | ||
| 23 | - from bpython.curtsiesfrontend import events as bpythonevents | ||
| 24 | - from bpython import inspection | ||
| 25 | - from bpython.repl import extract_exit_value | ||
| 16 | + from .curtsiesfrontend.repl import BaseRepl | ||
| 17 | + from .curtsiesfrontend.coderunner import SystemExitFromCodeRunner | ||
| 18 | + from .curtsiesfrontend.interpreter import Interp | ||
| 19 | + from . import args as bpargs | ||
| 20 | + from . import translations | ||
| 21 | + from .translations import _ | ||
| 22 | + from .importcompletion import find_iterator | ||
| 23 | + from .curtsiesfrontend import events as bpythonevents | ||
| 24 | + from . import inspection | ||
| 25 | + from .repl import extract_exit_value | ||
| 26 | 26 | ||
| 27 | 27 | logger = logging.getLogger(__name__) | |
| 28 | 28 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,6 +22,7 @@ | |||
| 22 | 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | |
| 23 | 23 | # THE SOFTWARE. | |
| 24 | 24 | ||
| 25 | + from __future__ import absolute_import | ||
| 25 | 26 | ||
| 26 | 27 | try: | |
| 27 | 28 | import fcntl | |
| Back | FazBrowse Home | New Git URL |
0 commit comments