Skip to content

Commit 67eab0a

Browse files
author
Release Manager
committed
Trac #34947: sage.{rings,modules,geometry}: Replace imports from sage.*.all for namespace packages
Using `./sage -fiximports` from #34945. Also remove trailing whitespace in the affected files. Part of Meta-ticket #32414 URL: https://trac.sagemath.org/34947 Reported by: mkoeppe Ticket author(s): Alex Chandler Reviewer(s): Travis Scrimshaw, Matthias Koeppe
2 parents 2cd6166 + 9a212f4 commit 67eab0a

File tree

74 files changed

+191
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+191
-148
lines changed

src/sage/geometry/cone.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@
205205
from copy import copy
206206
from warnings import warn
207207

208-
from sage.arith.all import gcd, lcm
208+
from sage.arith.misc import GCD as gcd
209+
from sage.arith.functions import lcm
209210
from sage.combinat.posets.posets import FinitePoset
210211
from sage.geometry.point_collection import PointCollection
211212
from sage.geometry.polyhedron.constructor import Polyhedron

src/sage/geometry/hyperplane_arrangement/library.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from sage.combinat.combinat import stirling_number2
2323
from sage.combinat.root_system.cartan_type import CartanType
2424
from sage.combinat.root_system.root_system import RootSystem
25-
from sage.arith.all import binomial
25+
from sage.arith.misc import binomial
2626
from sage.rings.polynomial.polynomial_ring import polygen
2727

2828
from sage.geometry.hyperplane_arrangement.arrangement import HyperplaneArrangements

src/sage/geometry/integral_points.pyx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ from sage.rings.integer_ring import ZZ
2222
from sage.rings.rational_field import QQ
2323
from sage.rings.real_mpfr import RR
2424
from sage.rings.integer cimport Integer
25-
from sage.arith.all import gcd, lcm
25+
from sage.arith.misc import GCD as gcd
26+
from sage.arith.functions import lcm
2627
from sage.combinat.permutation import Permutation
2728
from sage.misc.misc_c import prod
2829
from sage.modules.free_module import FreeModule

src/sage/geometry/lattice_polytope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
# https://www.gnu.org/licenses/
104104
# ****************************************************************************
105105

106-
from sage.arith.all import gcd
106+
from sage.arith.misc import GCD as gcd
107107
from sage.combinat.posets.posets import FinitePoset
108108
from sage.env import POLYTOPE_DATA_DIR
109109
from sage.geometry.cone import _ambient_space_point, integral_length

src/sage/geometry/point_collection.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -955,23 +955,23 @@ def read_palp_point_collection(f, lattice=None, permutation=False):
955955
Read and return a point collection from an opened file.
956956
957957
Data must be in PALP format:
958-
958+
959959
* the first input line starts with two integers `m` and `n`, the number
960960
of points and the number of components of each;
961-
961+
962962
* the rest of the first line may contain a permutation;
963-
963+
964964
* the next `m` lines contain `n` numbers each.
965-
965+
966966
.. NOTE::
967-
967+
968968
If `m` < `n`, it is assumed (for compatibility with PALP) that the
969969
matrix is transposed, i.e. that each column is a point.
970970
971971
INPUT:
972972
973973
- ``f`` -- an opened file with PALP output.
974-
974+
975975
- ``lattice`` -- the lattice for points. If not given, the
976976
:class:`toric lattice <sage.geometry.toric_lattice.ToricLatticeFactory>`
977977
`M` of dimension `n` will be used.

src/sage/geometry/polyhedron/generating_function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def generate_mods(equations):
14921492
sage: _TransformMod.generate_mods([(0, 1, 1, -2)])
14931493
({0: (2, 0), 1: (2, 0)}, {0: (2, 1), 1: (2, 1)})
14941494
"""
1495-
from sage.arith.all import lcm
1495+
from sage.arith.functions import lcm
14961496
from sage.matrix.constructor import matrix
14971497
from sage.rings.integer_ring import ZZ
14981498
from sage.rings.rational_field import QQ

src/sage/geometry/triangulation/element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ def normal_cone(self):
878878
raise NotImplementedError('Only base rings ZZ and QQ are supported')
879879
from ppl import Constraint_System, Linear_Expression, C_Polyhedron
880880
from sage.matrix.constructor import matrix
881-
from sage.arith.all import lcm
881+
from sage.arith.functions import lcm
882882
pc = self.point_configuration()
883883
cs = Constraint_System()
884884
for facet in self.interior_facets():

src/sage/modules/fg_pid/fgp_element.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def additive_order(self):
448448
from sage.rings.infinity import infinity
449449
from sage.rings.finite_rings.integer_mod import Mod
450450
from sage.rings.integer import Integer
451-
from sage.arith.all import lcm
451+
from sage.arith.functions import lcm
452452
n = Integer(1)
453453
for i, a in enumerate(I):
454454
if a == 0:

src/sage/modules/fg_pid/fgp_morphism.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ def __init__(self, X, Y, category=None):
510510
from sage.categories.modules_with_basis import ModulesWithBasis
511511
category = ModulesWithBasis(X.base_ring())
512512
else:
513-
from sage.categories.all import Modules
513+
from sage.categories.modules import Modules
514514
category = Modules(X.base_ring())
515515
Homset.__init__(self, X, Y, category)
516516

src/sage/modules/filtered_vector_space.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@
108108
# https://www.gnu.org/licenses/
109109
# ***************************************************************************
110110

111-
from sage.rings.all import QQ, ZZ, RDF, RR, Integer
111+
from sage.rings.rational_field import QQ
112+
from sage.rings.integer_ring import ZZ
113+
from sage.rings.real_double import RDF
114+
from sage.rings.real_mpfr import RR
115+
from sage.rings.integer import Integer
112116
from sage.rings.infinity import InfinityRing, infinity, minus_infinity
113117
from sage.categories.fields import Fields
114118
from sage.modules.free_module import FreeModule_ambient_field, VectorSpace

0 commit comments

Comments
 (0)