Skip to content

Commit d38cf38

Browse files
committed
cython-lint for imports in rings
1 parent 1ca4a47 commit d38cf38

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

src/sage/libs/flint/nmod_poly_linkage.pxi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ from cysignals.memory cimport sig_malloc, sig_free
2222

2323
from sage.libs.flint.nmod_poly cimport *
2424
from sage.libs.flint.ulong_extras cimport *
25-
25+
from sage.structure.factorization import Factorization
2626

2727
cdef inline celement *celement_new(unsigned long n):
2828
cdef celement *g = <celement *>sig_malloc(sizeof(nmod_poly_t))

src/sage/rings/bernoulli_mod_p.pyx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,25 @@ AUTHOR:
1515
- David Harvey (2007-08-31): algorithm for a single Bernoulli number mod p
1616
- David Harvey (2008-06): added interface to bernmm, removed old code
1717
"""
18-
19-
#*****************************************************************************
18+
# ****************************************************************************
2019
# Copyright (C) 2006 William Stein <[email protected]>
2120
# 2006 David Harvey <[email protected]>
2221
#
2322
# Distributed under the terms of the GNU General Public License (GPL)
24-
# http://www.gnu.org/licenses/
25-
#*****************************************************************************
23+
# https://www.gnu.org/licenses/
24+
# ****************************************************************************
2625

2726
cimport sage.rings.fast_arith
2827
import sage.rings.fast_arith
2928
cdef sage.rings.fast_arith.arith_int arith_int
30-
arith_int = sage.rings.fast_arith.arith_int()
29+
arith_int = sage.rings.fast_arith.arith_int()
3130

3231
ctypedef long long llong
3332

3433
import sage.arith.all
3534

3635
from sage.libs.ntl import all as ntl
3736
from sage.libs.ntl.ntl_ZZ_pX cimport ntl_ZZ_pX
38-
from sage.rings.finite_rings.integer_mod_ring import Integers
3937
from sage.rings.bernmm import bernmm_bern_modp
4038

4139

@@ -133,9 +131,7 @@ def bernoulli_mod_p(int p):
133131
AUTHOR:
134132
135133
- David Harvey (2006-08-06)
136-
137134
"""
138-
139135
if p <= 2:
140136
raise ValueError("p (=%s) must be a prime >= 3" % p)
141137

@@ -303,7 +299,6 @@ def bernoulli_mod_p_single(long p, long k):
303299
304300
- David Harvey (2007-08-31)
305301
- David Harvey (2008-06): rewrote to use bernmm library
306-
307302
"""
308303
if p <= 2:
309304
raise ValueError("p (=%s) must be a prime >= 3" % p)

src/sage/rings/polynomial/polynomial_zmod_flint.pyx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ AUTHORS:
4040
# ****************************************************************************
4141

4242
from sage.libs.ntl.ntl_lzz_pX import ntl_zz_pX
43-
from sage.structure.factorization import Factorization # removing breaks build
4443
from sage.structure.element cimport parent
4544
from sage.structure.element import coerce_binop
4645
from sage.rings.polynomial.polynomial_integer_dense_flint cimport Polynomial_integer_dense_flint

src/sage/rings/rational.pyx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ import sage.rings.real_double
9292
from libc.stdint cimport uint64_t
9393
from sage.libs.gmp.binop cimport mpq_add_z, mpq_mul_z, mpq_div_zz
9494

95-
from cpython.int cimport PyInt_AS_LONG
96-
9795
cimport sage.rings.fast_arith
9896
import sage.rings.fast_arith
9997

0 commit comments

Comments
 (0)