Read about our upcoming Code of Conduct on this issue

Commit 7dfc2d49 authored by Pierre Augier's avatar Pierre Augier
Browse files

Reformat imports

parent 14776f7fbe48
from ._version import __version__
from .justintime import jit, set_compile_jit
from transonic._version import __version__
from .annotation import Array, NDim, Type, Shape, Union
from .aheadoftime import Transonic, boost
from .util import set_compile_at_import
from transonic.aheadoftime import Transonic, boost
from transonic.annotation import Array, NDim, Type, Shape, Union
from transonic.compiler import wait_for_all_extensions
from transonic.justintime import jit, set_compile_jit
from transonic.util import set_compile_at_import
__all__ = [
"__version__",
......
......@@ -18,7 +18,9 @@ import copy
import gast as ast
import beniget
from transonic.log import logger
from transonic.config import backend_default
from .util import (
filter_code_typevars,
......@@ -35,7 +37,6 @@ from .blocks_if import get_block_definitions
from .parser import parse_code
from . import extast
from transonic.config import backend_default
__all__ = ["print_dumped", "print_unparsed"]
......
......@@ -5,6 +5,7 @@
import gast as ast
import beniget
from transonic.analyses import extast
from transonic.analyses.util import gather_rawcode_comments
from transonic.analyses.capturex import CaptureX
......
......@@ -2,23 +2,14 @@
========================
"""
import gast as ast
from transonic.log import logger
from transonic.analyses import extast
from transonic.analyses import compute_ancestors_chains, get_decorated_dicts
from transonic.analyses.capturex import CaptureX
from transonic.analyses.util import print_dumped
from .util import (
find_path,
change_import_name,
filter_external_code,
get_exterior_code,
)
from transonic.log import logger
from transonic.config import backend_default
from transonic.analyses.util import get_exterior_code
def analysis_jit(code, pathfile):
......
from transonic.analyses.extast import parse
from .util import print_dumped, print_unparsed
from transonic.analyses.util import print_dumped, print_unparsed
source = "def func(): return True"
......
......@@ -3,13 +3,15 @@
"""
import re
import beniget
from pathlib import Path
from textwrap import dedent
import beniget
import gast as ast
import astunparse
from transonic.analyses import extast
from transonic.analyses.capturex import CaptureX
import astunparse
def print_dumped(source):
......
......@@ -33,9 +33,9 @@ import sys
import os
from datetime import datetime
from . import mpi
from .mpi import Path, PathSeq
from .log import logger
from transonic import mpi
from transonic.mpi import Path, PathSeq
from transonic.log import logger
ext_suffix = sysconfig.get_config_var("EXT_SUFFIX") or ".so"
......
......@@ -5,10 +5,10 @@ import shutil
from contextlib import suppress
import pytest
from .path_data_tests import path_data_tests
from .mpi import nb_proc
from transonic.dist import make_backend_files
from transonic.mpi import nb_proc
from transonic.path_data_tests import path_data_tests
cwd = Path.cwd().absolute()
setup_dir = path_data_tests / "test_packaging"
......
......@@ -3,19 +3,19 @@ from distutils.core import Distribution
from copy import copy
import pytest
from . import dist
from .mpi import nb_proc
from transonic import dist
from transonic.config import backend_default
from .dist import (
from transonic.dist import (
detect_transonic_extensions,
modification_date,
make_backend_files,
ParallelBuildExt,
get_logger,
)
from .path_data_tests import path_data_tests
from transonic.config import backend_default
from transonic.mpi import nb_proc
from transonic.path_data_tests import path_data_tests
can_actually_import_pythran = copy(dist.can_import_pythran)
......
import importlib
from shutil import rmtree
from . import Transonic, mpi
from .mpi import Path
from .compiler import wait_for_all_extensions
from transonic import Transonic, mpi
from transonic.compiler import wait_for_all_extensions
from transonic.config import backend_default
from transonic.mpi import Path
def test_not_transonified():
......
......@@ -5,12 +5,12 @@ from shutil import rmtree
import pytest
from .path_data_tests import path_data_tests
from .run import run
from . import util
from .mpi import nb_proc
from transonic import util
from transonic.config import backend_default
from transonic.mpi import nb_proc
from transonic.path_data_tests import path_data_tests
from transonic.run import run
path_dir_out = path_data_tests / f"__{backend_default}__"
......
from . import util
from .util import query_yes_no
from transonic import util
from transonic.util import query_yes_no
def test_query_yes_no():
......
......@@ -98,7 +98,7 @@ from transonic.compiler import (
has_to_build,
)
from .config import path_root
from transonic.config import path_root
__all__ = ["modification_date", "has_to_build"]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment