Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
git grep -l 'all import ZZ' src/sage | xargs sed -E -i.bak $'s/^( *)f…
Browse files Browse the repository at this point in the history
…rom sage.*all import ZZ *$/\1from sage.rings.integer_ring import ZZ/'
  • Loading branch information
Matthias Koeppe committed Oct 4, 2021
1 parent f7e07bf commit acf7ae9
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/sage/interfaces/qepcad.py
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ def exactly_k(self, k, v, formula, allow_multi=False):
sage: qf.exactly_k(0, b, a*b == 1)
(A b)[~a b = 1]
"""
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
k = ZZ(k)
if k < 0:
raise ValueError("negative k in exactly_k quantifier")
Expand Down
2 changes: 1 addition & 1 deletion src/sage/interfaces/singular.py
Original file line number Diff line number Diff line change
Expand Up @@ -1608,7 +1608,7 @@ def sage_global_ring(self):
# extract the ring of coefficients
singular = self.parent()
charstr = singular.eval('charstr(basering)').split(',',1)
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
is_extension = len(charstr)==2
if charstr[0] in ['integer', 'ZZ']:
br = ZZ
Expand Down
2 changes: 1 addition & 1 deletion src/sage/quivers/path_semigroup.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ def cardinality(self):
...
ValueError: the underlying quiver has cycles, thus, there may be an infinity of directed paths
"""
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
if self._quiver.is_directed_acyclic() and not self._quiver.has_loops():
return ZZ(len(self))
from sage.rings.infinity import Infinity
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/pari_ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def random_element(self, x=None, y=None, distribution=None):
True
"""
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
return self(ZZ.random_element(x, y, distribution))

def zeta(self):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/polynomial/term_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -2216,7 +2216,7 @@ def termorder_from_singular(S):
sage: PolynomialRing(QQ, 'x,y', order='degneglex')('x^2')._singular_().sage()
x^2
"""
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
singular = S
T = singular('ringlist(basering)[3]')
order = []
Expand Down
2 changes: 1 addition & 1 deletion src/sage/rings/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def relative_number_field(n=2, maxdeg=2):
sage: from sage.rings.tests import relative_number_field
sage: _ = relative_number_field(3)
"""
from sage.all import ZZ
from sage.rings.integer_ring import ZZ
K = absolute_number_field(maxdeg)
n -= 1
var = 'aa'
Expand Down

0 comments on commit acf7ae9

Please sign in to comment.