Skip to content

Commit 48559c6

Browse files
author
Release Manager
committed
gh-35765: more fixes for superfluous cython imports <!-- Please provide a concise, informative and self-explanatory title. --> <!-- Don't put issue numbers in the title. Put it in the Description below. --> <!-- For example, instead of "Fixes #12345", use "Add a new method to multiply two integers" --> ### 📚 Description found by cython-lint ; removing a few more useless cython imports <!-- Describe your changes here in detail. --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x ]`. --> - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #35765 Reported by: Frédéric Chapoton Reviewer(s): Matthias Köppe
2 parents 3d25722 + 71aef78 commit 48559c6

File tree

8 files changed

+15
-30
lines changed

8 files changed

+15
-30
lines changed

src/sage/algebras/octonion_algebra.pyx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@ AUTHORS:
55
66
- Travis Scrimshaw (2023-05-06): Initial version
77
"""
8-
9-
#*****************************************************************************
8+
# ****************************************************************************
109
# Copyright (C) 2023 Travis Scrimshaw <tcscrims at gmail.com>
1110
#
1211
# This program is free software: you can redistribute it and/or modify
1312
# it under the terms of the GNU General Public License as published by
1413
# the Free Software Foundation, either version 2 of the License, or
1514
# (at your option) any later version.
16-
# http://www.gnu.org/licenses/
17-
#*****************************************************************************
15+
# https://www.gnu.org/licenses/
16+
# ****************************************************************************
1817

1918
from sage.misc.cachefunc import cached_method
2019
from sage.misc.functional import sqrt
@@ -27,7 +26,7 @@ from sage.modules.free_module import FreeModule
2726
from sage.categories.magmatic_algebras import MagmaticAlgebras
2827
from sage.categories.rings import Rings
2928
from sage.categories.metric_spaces import MetricSpaces
30-
from sage.categories.fields import Fields
29+
3130

3231
cdef class Octonion_generic(AlgebraElement):
3332
r"""

src/sage/graphs/hyperbolicity.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Methods
146146
# it under the terms of the GNU General Public License as published by
147147
# the Free Software Foundation, either version 2 of the License, or
148148
# (at your option) any later version.
149-
# http://www.gnu.org/licenses/
149+
# https://www.gnu.org/licenses/
150150
# ****************************************************************************
151151

152152
from libc.string cimport memset
@@ -157,7 +157,6 @@ from memory_allocator cimport MemoryAllocator
157157
from sage.graphs.distances_all_pairs cimport c_distances_all_pairs
158158
from sage.arith.misc import binomial
159159
from sage.rings.integer_ring import ZZ
160-
from sage.data_structures.bitset import Bitset
161160
from sage.graphs.base.static_sparse_graph cimport short_digraph
162161
from sage.graphs.base.static_sparse_graph cimport init_short_digraph
163162
from sage.graphs.base.static_sparse_graph cimport free_short_digraph

src/sage/graphs/strongly_regular_db.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3159,7 +3159,6 @@ def _build_small_srg_database():
31593159
from sage.graphs.generators.smallgraphs import M22Graph
31603160
from sage.graphs.generators.smallgraphs import SimsGewirtzGraph
31613161
from sage.graphs.generators.smallgraphs import HoffmanSingletonGraph
3162-
from sage.graphs.generators.smallgraphs import SchlaefliGraph
31633162
from sage.graphs.generators.smallgraphs import HigmanSimsGraph
31643163
from sage.graphs.generators.smallgraphs import IoninKharaghani765Graph
31653164
from sage.graphs.generators.smallgraphs import JankoKharaghaniGraph

src/sage/libs/mpmath/ext_libmp.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
"""
22
Faster versions of some key functions in mpmath.libmp
33
"""
4-
54
from .ext_impl cimport *
65
from sage.libs.gmp.all cimport *
7-
from sage.rings.integer cimport Integer
86

97
from .ext_impl import exp_fixed, cos_sin_fixed, log_int_fixed
108

src/sage/matrix/matrix_symbolic_sparse.pyx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,15 +163,14 @@ Check that :issue:`35653` is fixed::
163163
[ 0 1/x]
164164
"""
165165
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
166-
from sage.structure.element cimport ModuleElement, RingElement, Element
167166
from sage.structure.factorization import Factorization
168167

169168
from .matrix_generic_sparse cimport Matrix_generic_sparse
170169
from .constructor import matrix
171170

172171
cdef maxima
173172

174-
from sage.calculus.calculus import symbolic_expression_from_maxima_string, maxima
173+
from sage.calculus.calculus import maxima
175174

176175
cdef class Matrix_symbolic_sparse(Matrix_generic_sparse):
177176
def echelonize(self, **kwds):

src/sage/modular/pollack_stevens/dist.pyx

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ REFERENCES:
1818
- [PS2011]_
1919
"""
2020

21-
#*****************************************************************************
21+
# ****************************************************************************
2222
# Copyright (C) 2012 Robert Pollack <[email protected]>
2323
#
2424
# Distributed under the terms of the GNU General Public License (GPL)
2525
# as published by the Free Software Foundation; either version 2 of
2626
# the License, or (at your option) any later version.
27-
# http://www.gnu.org/licenses/
28-
#*****************************************************************************
27+
# https://www.gnu.org/licenses/
28+
# ****************************************************************************
2929

3030
from sage.structure.richcmp cimport richcmp_not_equal, rich_to_bool
3131
from sage.rings.integer_ring import ZZ
@@ -38,20 +38,10 @@ from sage.matrix.constructor import matrix
3838
from sage.structure.element cimport Element
3939
import operator
4040
from sage.rings.padics.padic_generic import pAdicGeneric
41-
from sage.rings.padics.padic_capped_absolute_element cimport pAdicCappedAbsoluteElement
42-
from sage.rings.padics.padic_capped_relative_element cimport pAdicCappedRelativeElement
43-
from sage.rings.padics.padic_fixed_mod_element cimport pAdicFixedModElement
4441
from sage.rings.integer cimport Integer
4542
from sage.misc.verbose import verbose
4643
from sage.rings.infinity import Infinity
4744

48-
from sage.libs.flint.nmod_poly cimport (nmod_poly_init2_preinv,
49-
nmod_poly_set_coeff_ui,
50-
nmod_poly_inv_series,
51-
nmod_poly_mullow,
52-
nmod_poly_pow_trunc,
53-
nmod_poly_get_coeff_ui, nmod_poly_t)
54-
5545
#from sage.libs.flint.ulong_extras cimport *
5646

5747
from .sigma0 import Sigma0

src/sage/numerical/backends/ppl_backend.pyx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,24 @@ AUTHORS:
99
constraints and objective function (:trac:`16755`)
1010
"""
1111

12-
#*****************************************************************************
12+
# ****************************************************************************
1313
# Copyright (C) 2010 Risan <[email protected]>
1414
# Copyright (C) 2014 Jeroen Demeyer <[email protected]>
1515
#
1616
# Distributed under the terms of the GNU General Public License (GPL)
1717
# as published by the Free Software Foundation; either version 2 of
1818
# the License, or (at your option) any later version.
19-
# http://www.gnu.org/licenses/
20-
#*****************************************************************************
19+
# https://www.gnu.org/licenses/
20+
# ****************************************************************************
2121

2222
from sage.numerical.mip import MIPSolverException
23-
from ppl import MIP_Problem, Variable, Variables_Set, Linear_Expression, Constraint, Generator
23+
from ppl import MIP_Problem, Variable, Variables_Set, Linear_Expression
2424
from sage.rings.integer cimport Integer
2525
from sage.rings.rational cimport Rational
2626
from .generic_backend cimport GenericBackend
2727
from copy import copy
2828

29+
2930
cdef class PPLBackend(GenericBackend):
3031

3132
"""

src/sage/schemes/elliptic_curves/descent_two_isogeny.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Descent on elliptic curves over `\QQ` with a 2-isogeny
1313
# ***************************************************************************
1414

1515
from cysignals.memory cimport sig_malloc, sig_free
16-
from cysignals.signals cimport sig_on, sig_off
16+
from cysignals.signals cimport sig_on
1717

1818
from sage.rings.integer_ring import ZZ
1919
from sage.rings.polynomial.polynomial_ring import polygen

0 commit comments

Comments
 (0)