Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Dec 18, 2022
1 parent b82d660 commit cf6b1fb
Show file tree
Hide file tree
Showing 21 changed files with 11 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/sage/coding/grs_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@

from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "binomial")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.ring", "SR")

from .linear_code import AbstractLinearCode
Expand Down
2 changes: 1 addition & 1 deletion src/sage/crypto/lwe.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "log")
lazy_import("sage.functions.other", "floor, ceil")
lazy_import("sage.functions.other", ["floor", "ceil"])
from sage.misc.functional import sqrt, cyclotomic_polynomial, round
from sage.misc.randstate import set_random_seed
from sage.misc.prandom import randint
Expand Down
1 change: 0 additions & 1 deletion src/sage/crypto/public_key/blum_goldwasser.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
from sage.crypto.util import random_blum_prime
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "log")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "Function_floor")
from sage.monoids.string_monoid import BinaryStrings
from sage.arith.all import gcd, power_mod, xgcd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
from sage.rings.polynomial.binary_form_reduce import covariant_z0, epsinv
from sage.rings.rational_field import QQ
from sage.schemes.affine.affine_space import AffineSpace
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.constants", "e")
from sage.arith.all import gcd
from copy import copy
Expand Down
9 changes: 3 additions & 6 deletions src/sage/interfaces/maxima_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@
# https://www.gnu.org/licenses/
# ****************************************************************************

from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.ring", "SR")
from sage.symbolic.ring import SR

from sage.libs.ecl import EclObject, ecl_eval

Expand Down Expand Up @@ -1160,8 +1159,7 @@ def reduce_load_MaximaLib():
import sage.rings.real_double
import sage.symbolic.expression
import sage.symbolic.integration.integral
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.operators", "FDerivativeOperator", "add_vararg, mul_vararg")
from sage.symbolic.operators import FDerivativeOperator, add_vararg, mul_vararg

car=EclObject("car")
cdr=EclObject("cdr")
Expand Down Expand Up @@ -1631,8 +1629,7 @@ def sr_to_max(expr):
return maxima(expr).ecl()

# This goes from EclObject to SR
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.expression", "symbol_table")
from sage.symbolic.expression import symbol_table
max_to_pynac_table = symbol_table['maxima']


Expand Down
1 change: 0 additions & 1 deletion src/sage/knots/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
lazy_import("sage.symbolic.ring", "SR")
from sage.rings.integer import Integer
from sage.numerical.mip import MixedIntegerLinearProgram
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.generalized", "sign")
from sage.homology.chain_complex import ChainComplex
from sage.misc.flatten import flatten
Expand Down
2 changes: 0 additions & 2 deletions src/sage/modular/hypergeometric_motive.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@
from sage.combinat.integer_vector_weighted import WeightedIntegerVectors
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.generalized", "sgn")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "log")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "floor", "ceil")
from sage.misc.cachefunc import cached_method
from sage.misc.functional import cyclotomic_polynomial
Expand Down
3 changes: 1 addition & 2 deletions src/sage/modules/vector_callable_symbolic_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@
#*****************************************************************************

from . import free_module_element
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.ring", "SR")
from sage.symbolic.ring import SR


class Vector_callable_symbolic_dense(free_module_element.FreeModuleElement_generic_dense):
Expand Down
3 changes: 1 addition & 2 deletions src/sage/modules/vector_symbolic_dense.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
#*****************************************************************************

from . import free_module_element
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.all", "Expression")
from sage.symbolic.all import Expression


def apply_map(phi):
Expand Down
2 changes: 0 additions & 2 deletions src/sage/plot/hyperbolic_regular_polygon.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
from sage.misc.decorators import options, rename_keyword
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.constants", "pi", "e")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.hyperbolic", "arccosh")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.trig", "sin", "cos, cot")
from sage.misc.functional import is_odd
from sage.matrix.constructor import matrix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
lazy_import("sage.functions.all", "sgn")
from sage.quadratic_forms.special_values import gamma__exact, zeta__exact, quadratic_L_function__exact
from sage.misc.functional import squarefree_part
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.constants", "pi")
from sage.matrix.matrix_space import MatrixSpace

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from copy import deepcopy
from sage.matrix.constructor import matrix
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.all", "floor")
lazy_import("sage.functions.other", "floor")
from sage.misc.mrange import mrange
from sage.modules.free_module_element import vector
from sage.rings.integer_ring import ZZ
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from sage.matrix.matrix_space import MatrixSpace
from sage.matrix.constructor import matrix
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.all", "floor")
lazy_import("sage.functions.other", "floor")
from sage.rings.integer_ring import ZZ
from sage.arith.all import GCD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,7 @@
from sage.rings.ring import Ring
from sage.misc.lazy_import import lazy_import
lazy_import("sage.calculus.var", "var")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.calculus.functional", "diff")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.symbolic.ring", "SR")
from sage.misc.misc_c import prod
from sage.rings.integer import Integer
Expand Down
1 change: 0 additions & 1 deletion src/sage/rings/number_field/S_unit_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
from sage.rings.integer_ring import ZZ
from sage.rings.real_mpfr import RealField, RR
from sage.rings.complex_mpfr import ComplexField
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "exp")
from sage.rings.rational_field import QQ
from sage.rings.number_field.number_field import is_real_place, refine_embedding
Expand Down
2 changes: 0 additions & 2 deletions src/sage/rings/polynomial/binary_form_reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@

from sage.misc.lazy_import import lazy_import
lazy_import("sage.calculus.functions", "jacobian")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.hyperbolic", "cosh", "sinh")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "exp")
from sage.matrix.constructor import matrix
from sage.misc.misc_c import prod
Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/cyclic_covers/cycliccover_finite_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

from sage.arith.misc import euler_phi
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "ceil", "binomial, floor")
lazy_import("sage.functions.other", ["ceil", "binomial", "floor"])
lazy_import("sage.functions.log", "log")
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
from sage.rings.power_series_ring import PowerSeriesRing
Expand Down
1 change: 0 additions & 1 deletion src/sage/schemes/elliptic_curves/ell_rational_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@

import sage.matrix.all as matrix
from sage.libs.pari.all import pari
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.gamma", "gamma_inc")
from math import sqrt
from sage.interfaces.gp import gp
Expand Down
3 changes: 1 addition & 2 deletions src/sage/schemes/elliptic_curves/height.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
from sage.arith.all import lcm, factorial
from sage.ext.fast_callable import fast_callable
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "log", "exp")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", ["log", "exp"])
lazy_import("sage.symbolic.ring", "SR")


Expand Down
2 changes: 1 addition & 1 deletion src/sage/schemes/elliptic_curves/padic_lseries.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
import sage.schemes.hyperelliptic_curves.monsky_washnitzer
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "log")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "floor")
from sage.misc.cachefunc import cached_method


@richcmp_method
class pAdicLseries(SageObject):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/stats/distributions/discrete_gaussian_lattice.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.log", "exp")
from sage.misc.lazy_import import lazy_import
lazy_import("sage.functions.other", "ceil")
from sage.rings.all import RealField, RR, ZZ, QQ
from .discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler
Expand Down

0 comments on commit cf6b1fb

Please sign in to comment.