Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit 0b99bbc

Browse files
authored
Modules load cleanup. part3 (#334)
1 parent 36340f9 commit 0b99bbc

26 files changed

Lines changed: 43 additions & 90 deletions

sdc/__init__.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,9 @@
3131
# re-export from Numba
3232
from numba import (typeof, prange, pndindex, gdb, gdb_breakpoint, gdb_init,
3333
stencil, threading_layer, jitclass, objmode)
34-
from numba.types import *
3534

3635
import sdc.dict_ext
3736
import sdc.set_ext
38-
from sdc.set_ext import init_set_string
39-
from sdc.str_ext import string_type
40-
from sdc.str_arr_ext import string_array_type
4137
import sdc.compiler
4238
import sdc.io
4339
import sdc.io.np_io

sdc/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from numba import ir_utils, ir, postproc
4040
from numba.targets.registry import CPUDispatcher
4141
from numba.ir_utils import guard, get_definition
42-
from numba.inline_closurecall import inline_closure_call, InlineClosureCallPass
42+
from numba.inline_closurecall import inline_closure_call
4343
from numba.typed_passes import (NopythonTypeInference, AnnotateTypes, ParforPass, IRLegalization)
4444
from numba.untyped_passes import (DeadBranchPrune, InlineInlinables, InlineClosureLikes)
4545
from sdc import config

sdc/distributed.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import numpy as np
4141

4242
import numba
43-
from numba import ir, types, typing, config, numpy_support, ir_utils, postproc
43+
from numba import ir, ir_utils, postproc, types
4444
from numba.ir_utils import (
4545
mk_unique_var,
4646
replace_vars_inner,
@@ -65,7 +65,6 @@
6565
find_const,
6666
is_get_setitem)
6767
from numba.inline_closurecall import inline_closure_call
68-
from numba.typing import signature
6968
from numba.parfor import (
7069
Parfor,
7170
lower_parfor_sequential,

sdc/distributed_analysis.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
from numba.parfor import Parfor
4040
from numba.parfor import wrap_parfor_blocks, unwrap_parfor_blocks
4141

42-
import numpy as np
4342
import sdc
4443
import sdc.io
4544
import sdc.io.np_io

sdc/distributed_api.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,11 @@
3838

3939
import numba
4040
from numba import types
41-
from numba.extending import models, register_model, intrinsic, overload
41+
from numba.extending import models, overload, register_model
4242
from numba.typing import signature
43-
from numba.typing.templates import infer_global, AbstractTemplate, infer
43+
from numba.typing.templates import AbstractTemplate, infer_global
4444

4545
import sdc
46-
from sdc import config
4746
from sdc.str_arr_ext import (string_array_type, num_total_chars, StringArray,
4847
pre_alloc_string_array, get_offset_ptr,
4948
get_data_ptr, convert_len_arr_to_offset)

sdc/distributed_lower.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import numba.targets.arrayobj
3737
from numba import types, cgutils
3838
from numba.extending import overload
39-
from numba.targets.imputils import lower_builtin, impl_ret_new_ref, impl_ret_borrowed
39+
from numba.targets.imputils import impl_ret_borrowed, lower_builtin
4040
from numba.targets.arrayobj import make_array
4141
from numba.typing import signature
4242
from numba.typing.templates import infer_global, AbstractTemplate

sdc/hiframes/aggregate.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,9 @@
2929

3030
import operator
3131
from collections import namedtuple, defaultdict
32-
from functools import reduce
33-
import copy
3432
import numpy as np
3533
import numba
36-
from numba import typeinfer, ir, ir_utils, config, types, compiler, typed_passes
34+
from numba import compiler, ir, ir_utils, typed_passes, typeinfer, types
3735
from numba.ir_utils import (visit_vars_inner, replace_vars_inner, remove_dead,
3836
compile_to_numba_ir, replace_arg_nodes,
3937
replace_vars_stmt, find_callname, guard,
@@ -51,7 +49,7 @@
5149
alloc_arr_tup, empty_like_type)
5250
from sdc import distributed, distributed_analysis
5351
from sdc.distributed_analysis import Distribution
54-
from sdc.utils import _numba_to_c_type_map, unliteral_all
52+
from sdc.utils import unliteral_all
5553
from sdc.str_ext import string_type
5654
from sdc.set_ext import num_total_chars_set_string, build_set
5755
from sdc.str_arr_ext import (string_array_type, pre_alloc_string_array,

sdc/hiframes/api.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
import llvmlite.llvmpy.core as lc
3636

3737
import numba
38-
from numba import ir, ir_utils
39-
from numba import numpy_support, types, cgutils
40-
from numba.ir_utils import require, mk_unique_var
38+
from numba import ir
39+
from numba import cgutils, types
40+
from numba.ir_utils import mk_unique_var
4141
import numba.array_analysis
4242
from numba.typing import signature
4343
from numba.typing.templates import infer_global, AbstractTemplate, CallableTemplate
@@ -50,7 +50,7 @@
5050
impl_ret_borrowed,
5151
iternext_impl,
5252
RefType)
53-
from numba.targets.arrayobj import make_array, _getitem_array1d
53+
from numba.targets.arrayobj import make_array
5454

5555
import sdc
5656
from sdc.utils import _numba_to_c_type_map, unliteral_all

sdc/hiframes/boxing.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,10 @@
3535
NativeValue, box, intrinsic)
3636
from numba import numpy_support, types, cgutils
3737
from numba.typing import signature
38-
from numba.typing.templates import infer_global, AbstractTemplate, CallableTemplate
3938
from numba.targets.boxing import box_array, unbox_array, box_list
40-
from numba.targets.imputils import lower_builtin
4139
from numba.targets.boxing import _NumbaTypeHelper
4240
from numba.targets import listobj
4341

44-
import sdc
4542
from sdc.hiframes.pd_dataframe_ext import DataFrameType
4643
from sdc.hiframes.pd_timestamp_ext import (datetime_date_type,
4744
unbox_datetime_date_array, box_datetime_date_array)

sdc/hiframes/dataframe_pass.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
import operator
29-
from collections import defaultdict, namedtuple
29+
from collections import namedtuple
3030
import numpy as np
3131
import pandas as pd
3232
import warnings
@@ -40,22 +40,16 @@
4040
build_definitions, find_build_sequence,
4141
GuardException, compute_cfg_from_blocks)
4242
from numba.inline_closurecall import inline_closure_call
43-
from numba.typing.templates import Signature, bound_function, signature
44-
from numba.typing.arraydecl import ArrayAttribute
45-
from numba.extending import overload
46-
from numba.typing.templates import infer_global, AbstractTemplate, signature
4743
from numba.compiler_machinery import FunctionPass, register_pass
4844
import sdc
4945
from sdc import hiframes
5046
from sdc.utils import (debug_prints, inline_new_blocks, ReplaceFunc,
5147
is_whole_slice, is_array, is_assign, sanitize_varname, update_globals)
52-
from sdc.str_ext import string_type
5348
from sdc.str_arr_ext import (string_array_type, StringArrayType,
5449
is_str_arr_typ, pre_alloc_string_array)
55-
from sdc.hiframes.rolling import get_rolling_setup_args
5650
from sdc.hiframes.pd_dataframe_ext import (DataFrameType, DataFrameLocType,
5751
DataFrameILocType, DataFrameIatType)
58-
from sdc.hiframes.pd_series_ext import SeriesType, is_series_type
52+
from sdc.hiframes.pd_series_ext import SeriesType
5953
import sdc.hiframes.pd_groupby_ext
6054
from sdc.hiframes.pd_groupby_ext import DataFrameGroupByType
6155
import sdc.hiframes.pd_rolling_ext

0 commit comments

Comments
 (0)