Skip to content

Commit 47519cf

Browse files
committed
removing some unused imports in pyx files
1 parent 1f45900 commit 47519cf

File tree

5 files changed

+4
-20
lines changed

5 files changed

+4
-20
lines changed

src/sage/graphs/path_enumeration.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@ from libcpp.vector cimport vector
4242
from sage.data_structures.pairing_heap cimport PairingHeap
4343
from sage.rings.integer_ring import ZZ
4444

45-
import copy
46-
4745

4846
def all_paths(G, start, end, use_multiedges=False, report_edges=False, labels=False):
4947
"""

src/sage/libs/gap/element.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ from sage.rings.integer_ring import ZZ
2828
from sage.rings.rational_field import QQ
2929
from sage.rings.real_double import RDF
3030

31-
from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement
3231
from sage.combinat.permutation import Permutation
3332
from sage.structure.coerce cimport coercion_model as cm
3433

@@ -1473,7 +1472,6 @@ cdef class GapElement(RingElement):
14731472
return FreeGroup_class(names, gap_group=self)
14741473

14751474
elif self.IsFpGroup():
1476-
from sage.groups.free_group import FreeGroup
14771475
from sage.groups.finitely_presented import FinitelyPresentedGroup
14781476
# names = tuple(str(g).replace(".", "_") for g in self.FreeGroupOfFpGroup().GeneratorsOfGroup())
14791477
F = self.FreeGroupOfFpGroup().sage()

src/sage/matrix/matrix_modn_sparse.pyx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,32 +90,21 @@ cimport sage.libs.linbox.linbox as linbox
9090

9191
from sage.arith.misc import is_prime
9292
from sage.data_structures.binary_search cimport *
93-
from sage.ext.stdsage cimport PY_NEW
94-
from sage.libs.flint.fmpz cimport fmpz_get_mpz, fmpz_set_mpz
95-
from sage.libs.flint.fmpz_mat cimport fmpz_mat_entry
96-
from sage.libs.gmp.mpz cimport mpz_set
97-
from sage.libs.linbox.conversion cimport (get_method,
98-
METHOD_DEFAULT,
93+
from sage.libs.linbox.conversion cimport (METHOD_DEFAULT,
9994
METHOD_DENSE_ELIMINATION,
10095
METHOD_SPARSE_ELIMINATION,
10196
METHOD_BLACKBOX,
10297
METHOD_WIEDEMANN,
103-
new_linbox_matrix_modn_sparse,
104-
new_linbox_matrix_integer_sparse,
105-
new_linbox_vector_integer_dense,
106-
new_sage_vector_integer_dense)
98+
new_linbox_matrix_modn_sparse)
10799
from sage.matrix.args cimport SparseEntry, MatrixArgs_init
108100
from sage.matrix.matrix2 import Matrix as Matrix2
109101
from sage.matrix.matrix_dense cimport Matrix_dense
110-
from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
111102
from sage.matrix.matrix_sparse cimport Matrix_sparse
112103
from sage.misc.verbose import verbose, get_verbose
113-
from sage.modules.vector_integer_dense cimport Vector_integer_dense
114104
from sage.modules.vector_integer_sparse cimport *
115105
from sage.modules.vector_modn_sparse cimport *
116106
from sage.rings.fast_arith cimport arith_int
117107
from sage.rings.finite_rings.integer_mod cimport IntegerMod_int, IntegerMod_abstract
118-
from sage.rings.integer cimport Integer
119108
from sage.rings.integer_ring import ZZ
120109
from sage.structure.element cimport Matrix
121110

@@ -130,6 +119,7 @@ ai = arith_int()
130119
# Github Issue #12679.
131120
MAX_MODULUS = 46341
132121

122+
133123
cdef class Matrix_modn_sparse(Matrix_sparse):
134124
def __cinit__(self):
135125
nr = self._nrows

src/sage/modules/free_module_element.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ from cpython.slice cimport PySlice_GetIndicesEx
117117

118118
from sage.categories.rings import Rings
119119
from sage.structure.sequence import Sequence
120-
from sage.structure.element cimport Element, RingElement, Vector
120+
from sage.structure.element cimport Element, Vector
121121
from sage.structure.element import canonical_coercion
122122
from sage.structure.richcmp cimport richcmp_not_equal, richcmp, rich_to_bool
123123

src/sage/rings/ring.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,8 @@ This is to test a deprecation::
108108
# https://www.gnu.org/licenses/
109109
# ****************************************************************************
110110

111-
from sage.misc.cachefunc import cached_method
112111
from sage.misc.superseded import deprecation
113112

114-
from sage.structure.coerce cimport coercion_model
115113
from sage.structure.parent cimport Parent
116114
from sage.structure.category_object cimport check_default_category
117115
from sage.categories.rings import Rings

0 commit comments

Comments
 (0)