Skip to content

Commit

Permalink
Style fixes, 'del lazy_import' split out sagemath#37901
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed May 19, 2024
1 parent 6ee6675 commit e3bd5b0
Show file tree
Hide file tree
Showing 39 changed files with 191 additions and 161 deletions.
1 change: 1 addition & 0 deletions src/sage/calculus/transforms/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
lazy_import("sage.calculus.transforms.fft", ["FastFourierTransform", "FFT"])
lazy_import("sage.calculus.transforms.dwt", ["WaveletTransform", "DWT"])
from sage.calculus.transforms.dft import IndexedSequence
del lazy_import
5 changes: 4 additions & 1 deletion src/sage/combinat/designs/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@


lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure')
lazy_import('sage.combinat.designs.incidence_structures', 'IncidenceStructure', 'BlockDesign')
lazy_import('sage.combinat.designs.incidence_structures',
'IncidenceStructure', 'BlockDesign')

lazy_import('sage.combinat.designs.incidence_structures',
'IncidenceStructure', as_='Hypergraph')
Expand All @@ -52,3 +53,5 @@
['CoveringDesign', 'schonheim', 'trivial_covering_design'])

from sage.combinat.designs import design_catalog as designs
del lazy_import
del install_doc
2 changes: 2 additions & 0 deletions src/sage/combinat/posets/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@
from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice, JoinSemilattice

from sage.combinat.posets.poset_examples import posets, Posets

del install_doc
15 changes: 8 additions & 7 deletions src/sage/databases/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* CremonaDatabase() - Cremona's tables of elliptic curves and related data.
* findstat -- The FindStat database (http://www.findstat.org/).
* findstat -- The FindStat database (https://www.findstat.org/).
* JonesDatabase() -- returns the John Jones table of number fields
with bounded ramification and degree <= 6.
Expand Down Expand Up @@ -68,15 +68,16 @@
lazy_import('sage.databases.odlyzko', 'zeta_zeros')

from sage.databases.db_modular_polynomials import \
ClassicalModularPolynomialDatabase, \
DedekindEtaModularPolynomialDatabase, \
DedekindEtaModularCorrespondenceDatabase, \
AtkinModularPolynomialDatabase, \
AtkinModularCorrespondenceDatabase
ClassicalModularPolynomialDatabase, \
DedekindEtaModularPolynomialDatabase, \
DedekindEtaModularCorrespondenceDatabase, \
AtkinModularPolynomialDatabase, \
AtkinModularCorrespondenceDatabase

from sage.databases.db_class_polynomials import \
HilbertClassPolynomialDatabase
HilbertClassPolynomialDatabase

lazy_import('sage.databases.cunningham_tables', 'cunningham_prime_factors')

lazy_import('sage.databases.findstat', ['findstat', 'findmap'])
del lazy_import
1 change: 1 addition & 0 deletions src/sage/dynamics/arithmetic_dynamics/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
from sage.dynamics.arithmetic_dynamics.dynamical_semigroup import DynamicalSemigroup_projective
lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'WehlerK3Surface')
lazy_import('sage.dynamics.arithmetic_dynamics.wehlerK3', 'random_WehlerK3Surface')
del lazy_import
99 changes: 51 additions & 48 deletions src/sage/functions/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,91 +3,94 @@

lazy_import('sage.functions.piecewise', 'piecewise')
lazy_import('sage.functions.error', ['erf', 'erfc', 'erfi', 'erfinv',
'fresnel_sin', 'fresnel_cos'])
'fresnel_sin', 'fresnel_cos'])

from sage.functions.trig import ( sin, cos, sec, csc, cot, tan,
asin, acos, atan,
acot, acsc, asec,
arcsin, arccos, arctan,
arccot, arccsc, arcsec,
arctan2, atan2)
from sage.functions.trig import (sin, cos, sec, csc, cot, tan,
asin, acos, atan,
acot, acsc, asec,
arcsin, arccos, arctan,
arccot, arccsc, arcsec,
arctan2, atan2)

from sage.functions.hyperbolic import ( tanh, sinh, cosh, coth, sech, csch,
asinh, acosh, atanh, acoth, asech, acsch,
arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch )
from sage.functions.hyperbolic import (tanh, sinh, cosh, coth, sech, csch,
asinh, acosh, atanh, acoth, asech, acsch,
arcsinh, arccosh, arctanh, arccoth, arcsech, arccsch)

reciprocal_trig_functions = {'sec': cos, 'csc': sin, 'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh}
reciprocal_trig_functions = {'sec': cos, 'csc': sin,
'cot': tan, 'sech': cosh, 'csch': sinh, 'coth': tanh}


from sage.functions.other import ( ceil, floor, abs_symbolic, sqrt, real_nth_root,
arg, real_part, real, frac,
factorial, binomial,
imag_part, imag, imaginary, conjugate, cases,
complex_root_of)
from sage.functions.other import (ceil, floor, abs_symbolic, sqrt, real_nth_root,
arg, real_part, real, frac,
factorial, binomial,
imag_part, imag, imaginary, conjugate, cases,
complex_root_of)

from sage.functions.log import (exp, exp_polar, log, ln, polylog, dilog, lambert_w, harmonic_number)
from sage.functions.log import (exp, exp_polar, log, ln,
polylog, dilog, lambert_w, harmonic_number)

from sage.functions.transcendental import (zeta, zetaderiv, zeta_symmetric, hurwitz_zeta,
dickman_rho, stieltjes)
dickman_rho, stieltjes)

from sage.functions.bessel import (bessel_I, bessel_J, bessel_K, bessel_Y,
Bessel, struve_H, struve_L, hankel1, hankel2,
Bessel, struve_H, struve_L, hankel1, hankel2,
spherical_bessel_J, spherical_bessel_Y,
spherical_hankel1, spherical_hankel2)

from sage.functions.special import (spherical_harmonic, elliptic_e,
elliptic_f, elliptic_ec, elliptic_eu,
elliptic_kc, elliptic_pi, elliptic_j)
elliptic_f, elliptic_ec, elliptic_eu,
elliptic_kc, elliptic_pi, elliptic_j)

from sage.functions.jacobi import (jacobi, inverse_jacobi, jacobi_nd, jacobi_ns, jacobi_nc,
jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd,
jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am,
inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc,
inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc,
inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc,
inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs)
jacobi_dn, jacobi_ds, jacobi_dc, jacobi_sn, jacobi_sd,
jacobi_sc, jacobi_cn, jacobi_cd, jacobi_cs, jacobi_am,
inverse_jacobi_nd, inverse_jacobi_ns, inverse_jacobi_nc,
inverse_jacobi_dn, inverse_jacobi_ds, inverse_jacobi_dc,
inverse_jacobi_sn, inverse_jacobi_sd, inverse_jacobi_sc,
inverse_jacobi_cn, inverse_jacobi_cd, inverse_jacobi_cs)

from sage.functions.orthogonal_polys import (chebyshev_T,
chebyshev_U,
gen_laguerre,
gen_legendre_P,
gen_legendre_Q,
hermite,
jacobi_P,
laguerre,
legendre_P,
legendre_Q,
ultraspherical,
gegenbauer,
krawtchouk,
meixner,
hahn)
chebyshev_U,
gen_laguerre,
gen_legendre_P,
gen_legendre_Q,
hermite,
jacobi_P,
laguerre,
legendre_P,
legendre_Q,
ultraspherical,
gegenbauer,
krawtchouk,
meixner,
hahn)

from sage.functions.spike_function import spike_function

from sage.functions.prime_pi import legendre_phi, partial_sieve_function, prime_pi

from sage.functions.wigner import (wigner_3j, clebsch_gordan, racah, wigner_6j,
wigner_9j, gaunt)
wigner_9j, gaunt)

from sage.functions.generalized import (dirac_delta, heaviside, unit_step, sgn, sign,
kronecker_delta)
kronecker_delta)

from sage.functions.min_max import max_symbolic, min_symbolic

from sage.functions.airy import airy_ai, airy_ai_prime, airy_bi, airy_bi_prime

from sage.functions.exp_integral import (exp_integral_e, exp_integral_e1, log_integral, li, Li,
log_integral_offset,
sin_integral, cos_integral, Si, Ci,
sinh_integral, cosh_integral, Shi, Chi,
exponential_integral_1, Ei, exp_integral_ei)
log_integral_offset,
sin_integral, cos_integral, Si, Ci,
sinh_integral, cosh_integral, Shi, Chi,
exponential_integral_1, Ei, exp_integral_ei)

from sage.functions.hypergeometric import hypergeometric, hypergeometric_M, hypergeometric_U

from sage.functions.gamma import (gamma, psi, beta, log_gamma,
gamma_inc, gamma_inc_lower)
gamma_inc, gamma_inc_lower)

Γ = gamma
ψ = psi
ζ = zeta
del lazy_import
4 changes: 3 additions & 1 deletion src/sage/graphs/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
lazy_import("sage.graphs.graph_generators", "graphs")
lazy_import("sage.graphs.digraph_generators", "digraphs")
lazy_import("sage.graphs.hypergraph_generators", "hypergraphs")
lazy_import("sage.graphs.graph_database", ["GraphDatabase", "GenericGraphQuery", "GraphQuery"])
lazy_import("sage.graphs.graph_database", [
"GraphDatabase", "GenericGraphQuery", "GraphQuery"])
from sage.graphs.graph import Graph
from sage.graphs.digraph import DiGraph
from sage.graphs.bipartite_graph import BipartiteGraph
Expand Down Expand Up @@ -37,3 +38,4 @@
...
NameError: name 'clique_number' is not defined
"""
del lazy_import
2 changes: 1 addition & 1 deletion src/sage/groups/abelian_gps/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
all.py -- export of abelian groups to Sage
"""

#*****************************************************************************
# *****************************************************************************
#
# Sage: Open Source Mathematical Software
#
Expand Down
20 changes: 10 additions & 10 deletions src/sage/groups/perm_gps/all.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
from sage.groups.perm_gps.permgroup_named import (SymmetricGroup, AlternatingGroup,
DihedralGroup, SplitMetacyclicGroup,
SemidihedralGroup, CyclicPermutationGroup,
DiCyclicGroup, TransitiveGroup,
PGL, PSL, PSp, PSU, PGU,
MathieuGroup, KleinFourGroup, QuaternionGroup,
PrimitiveGroup, PrimitiveGroups,
SuzukiGroup, TransitiveGroups,
GeneralDihedralGroup, SmallPermutationGroup)
DihedralGroup, SplitMetacyclicGroup,
SemidihedralGroup, CyclicPermutationGroup,
DiCyclicGroup, TransitiveGroup,
PGL, PSL, PSp, PSU, PGU,
MathieuGroup, KleinFourGroup, QuaternionGroup,
PrimitiveGroup, PrimitiveGroups,
SuzukiGroup, TransitiveGroups,
GeneralDihedralGroup, SmallPermutationGroup)

from sage.groups.perm_gps.permgroup import PermutationGroup, PermutationGroup_generic, PermutationGroup_subgroup, direct_product_permgroups

from sage.groups.perm_gps.constructor import PermutationGroupElement

from sage.groups.perm_gps.permgroup_morphism import (PermutationGroupMorphism as PermutationGroupMap,
PermutationGroupMorphism_im_gens,
PermutationGroupMorphism_id)
PermutationGroupMorphism_im_gens,
PermutationGroupMorphism_id)
PermutationGroupMorphism = PermutationGroupMorphism_im_gens

from sage.groups.perm_gps.cubegroup import CubeGroup, RubiksCube
1 change: 1 addition & 0 deletions src/sage/interacts/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
from sage.interacts import fractals
from sage.interacts import algebra
lazy_import('sage.interacts.library', 'demo')
del lazy_import
1 change: 1 addition & 0 deletions src/sage/interfaces/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@
'kash', 'magma', 'macaulay2', 'maple', 'maxima',
'mathematica', 'mwrank', 'octave', 'r', 'singular',
'sage0', 'sage']
del lazy_import
9 changes: 5 additions & 4 deletions src/sage/libs/mpmath/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@

# Use mpmath internal functions for constants, to avoid unnecessary overhead
_constants_funcs = {
'glaisher': glaisher_fixed,
'khinchin': khinchin_fixed,
'twinprime': twinprime_fixed,
'mertens': mertens_fixed
'glaisher': glaisher_fixed,
'khinchin': khinchin_fixed,
'twinprime': twinprime_fixed,
'mertens': mertens_fixed
}


def eval_constant(name, ring):
prec = ring.precision() + 20
return ring(_constants_funcs[name](prec)) >> prec
20 changes: 10 additions & 10 deletions src/sage/libs/symmetrica/all.py
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
#from symmetrica import *
# from symmetrica import *

from sage.libs.symmetrica.symmetrica import start

#kostka
# kostka
from sage.libs.symmetrica.symmetrica import kostka_number_symmetrica as kostka_number
from sage.libs.symmetrica.symmetrica import kostka_tab_symmetrica as kostka_tab
from sage.libs.symmetrica.symmetrica import kostka_tafel_symmetrica as kostka_tafel


#sab
# sab
from sage.libs.symmetrica.symmetrica import dimension_symmetrization_symmetrica as dimension_symmetrization
from sage.libs.symmetrica.symmetrica import bdg_symmetrica as bdg
from sage.libs.symmetrica.symmetrica import sdg_symmetrica as sdg
from sage.libs.symmetrica.symmetrica import odg_symmetrica as odg
from sage.libs.symmetrica.symmetrica import specht_dg_symmetrica as specht_dg
from sage.libs.symmetrica.symmetrica import ndg_symmetrica as ndg
#from symmetrica import glmndg_symmetrica as glmndg
# from symmetrica import glmndg_symmetrica as glmndg


#sc
# sc
from sage.libs.symmetrica.symmetrica import chartafel_symmetrica as chartafel
from sage.libs.symmetrica.symmetrica import charvalue_symmetrica as charvalue
from sage.libs.symmetrica.symmetrica import kranztafel_symmetrica as kranztafel
#from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn
# from symmetrica import c_ijk_sn_symmetrica as c_ijk_sn

#part
# part
from sage.libs.symmetrica.symmetrica import strict_to_odd_part_symmetrica as strict_to_odd_part
from sage.libs.symmetrica.symmetrica import odd_to_strict_part_symmetrica as odd_to_strict
from sage.libs.symmetrica.symmetrica import q_core_symmetrica as q_core
Expand All @@ -33,7 +33,7 @@
from sage.libs.symmetrica.symmetrica import random_partition_symmetrica as random_partition


#schur
# schur
from sage.libs.symmetrica.symmetrica import outerproduct_schur_symmetrica as outerproduct_schur
from sage.libs.symmetrica.symmetrica import dimension_schur_symmetrica as dimension_schur
from sage.libs.symmetrica.symmetrica import part_part_skewschur_symmetrica as part_part_skewschur
Expand Down Expand Up @@ -84,11 +84,11 @@

from sage.libs.symmetrica.symmetrica import scalarproduct_schur_symmetrica as scalarproduct_schur

#plet
# plet
from sage.libs.symmetrica.symmetrica import plethysm_symmetrica as plethysm
from sage.libs.symmetrica.symmetrica import schur_schur_plet_symmetrica as schur_schur_plet

#sb
# sb
from sage.libs.symmetrica.symmetrica import mult_schubert_schubert_symmetrica as mult_schubert_schubert
from sage.libs.symmetrica.symmetrica import t_SCHUBERT_POLYNOM_symmetrica as t_SCHUBERT_POLYNOM
from sage.libs.symmetrica.symmetrica import t_POLYNOM_SCHUBERT_symmetrica as t_POLYNOM_SCHUBERT
Expand Down
7 changes: 4 additions & 3 deletions src/sage/matrix/all.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from sage.misc.lazy_import import lazy_import
from sage.matrix.matrix_space import MatrixSpace
from sage.matrix.constructor import (matrix, Matrix, column_matrix, random_matrix,
diagonal_matrix, identity_matrix, block_matrix,
block_diagonal_matrix, jordan_block, zero_matrix,
ones_matrix, elementary_matrix, companion_matrix)
diagonal_matrix, identity_matrix, block_matrix,
block_diagonal_matrix, jordan_block, zero_matrix,
ones_matrix, elementary_matrix, companion_matrix)
Mat = MatrixSpace
del lazy_import
2 changes: 1 addition & 1 deletion src/sage/modular/abvar/all.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
###########################################################################
# Copyright (C) 2007 William Stein <wstein@gmail.com> #
# Distributed under the terms of the GNU General Public License (GPL) #
# http://www.gnu.org/licenses/ #
# https://www.gnu.org/licenses/ #
###########################################################################

from sage.modular.abvar.constructor import J0, J1, JH, AbelianVariety
Loading

0 comments on commit e3bd5b0

Please sign in to comment.