Skip to content

Commit c772830

Browse files
committed
fix E261
1 parent ce4a8d5 commit c772830

File tree

9 files changed

+17
-17
lines changed

9 files changed

+17
-17
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ build-backend = "mesonpy"
4343
# We currently ignore
4444
# E129 visually indented line with same indent as next logical line
4545
max-line-length = 120
46-
ignore = ['E129','E261','E262','E265','E501','E731','E741','E743']
46+
ignore = ['E129','E262','E265','E501','E731','E741','E743']
4747
exclude = 'src/flint/flintlib/.*'
4848

4949
[tool.spin]

src/flint/types/acb_poly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ cdef class acb_poly(flint_poly):
197197
return u
198198

199199
def __pos__(self):
200-
return self # ?
200+
return self
201201

202202
def __neg__(s):
203203
u = acb_poly.__new__(acb_poly)

src/flint/types/arb_poly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ cdef class arb_poly(flint_poly):
194194
return u
195195

196196
def __pos__(self):
197-
return self # ?
197+
return self
198198

199199
def __neg__(s):
200200
u = arb_poly.__new__(arb_poly)

src/flint/types/fmpq.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ cdef class fmpq(flint_scalar):
6767

6868
def __init__(self, *args):
6969
if not args:
70-
return # zero
70+
return # zero
7171
elif len(args) == 2:
7272
p, q = args
7373
elif len(args) == 1:

src/flint/types/fmpz.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ cdef class fmpz(flint_scalar):
7777
if typecheck(val, fmpz):
7878
fmpz_set(self.val, (<fmpz>val).val)
7979
else:
80-
if fmpz_set_any_ref(self.val, val) == FMPZ_UNKNOWN: # XXX
80+
if fmpz_set_any_ref(self.val, val) == FMPZ_UNKNOWN: # XXX
8181
if typecheck(val, str):
8282
if fmpz_set_str(self.val, chars_from_str(val), 10) != 0:
8383
raise ValueError("invalid string for fmpz")

src/flint/types/fmpz_mod_poly.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ cdef class fmpz_mod_poly_ctx:
3939
# Allow context to be made from fmpz_mod_ctx
4040
if typecheck(mod, fmpz_mod_ctx):
4141
self.mod = mod
42-
else: # Otherwise attempt to create context from moduli
42+
else: # Otherwise attempt to create context from moduli
4343
self.mod = fmpz_mod_ctx(mod)
4444

4545
def modulus(self):
@@ -579,7 +579,7 @@ cdef class fmpz_mod_poly(flint_poly):
579579
fmpz_mod_poly_shift_left(
580580
res.val, self.val, n, self.ctx.mod.val
581581
)
582-
else: # do nothing, just copy self
582+
else: # do nothing, just copy self
583583
fmpz_mod_poly_set(
584584
res.val, self.val, self.ctx.mod.val
585585
)
@@ -612,7 +612,7 @@ cdef class fmpz_mod_poly(flint_poly):
612612
fmpz_mod_poly_shift_right(
613613
res.val, self.val, n, self.ctx.mod.val
614614
)
615-
else: # do nothing, just copy self
615+
else: # do nothing, just copy self
616616
fmpz_mod_poly_set(
617617
res.val, self.val, self.ctx.mod.val
618618
)
@@ -1004,9 +1004,9 @@ cdef class fmpz_mod_poly(flint_poly):
10041004
length = fmpz_mod_poly_degree(self.val, self.ctx.mod.val)
10051005
res = self.ctx.new_ctype_poly()
10061006

1007-
if n <= 0: # return zero
1007+
if n <= 0: # return zero
10081008
return res
1009-
elif n > length: # do nothing
1009+
elif n > length: # do nothing
10101010
fmpz_mod_poly_set(
10111011
res.val, self.val, self.ctx.mod.val
10121012
)

src/flint/types/fq_default_poly.pyx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cdef class fq_default_poly_ctx:
3131
# Allow context to be made from fq_default_ctx
3232
if len(args) == 1 and typecheck(args[0], fq_default_ctx):
3333
self.field = args[0]
34-
else: # Otherwise attempt to create context from moduli
34+
else: # Otherwise attempt to create context from moduli
3535
self.field = fq_default_ctx(*args, **kwargs)
3636

3737
cdef set_list_as_fq_default_poly(self, fq_default_poly_t poly, val):
@@ -431,9 +431,9 @@ cdef class fq_default_poly(flint_poly):
431431
length = fq_default_poly_degree(self.val, self.ctx.field.val)
432432
res = self.ctx.new_ctype_poly()
433433

434-
if n <= 0: # return zero
434+
if n <= 0: # return zero
435435
return res
436-
elif n > length: # do nothing
436+
elif n > length: # do nothing
437437
fq_default_poly_set(
438438
res.val, self.val, self.ctx.field.val
439439
)
@@ -923,7 +923,7 @@ cdef class fq_default_poly(flint_poly):
923923
fq_default_poly_shift_left(
924924
res.val, self.val, n, self.ctx.field.val
925925
)
926-
else: # do nothing, just copy self
926+
else: # do nothing, just copy self
927927
fq_default_poly_set(
928928
res.val, self.val, self.ctx.field.val
929929
)
@@ -956,7 +956,7 @@ cdef class fq_default_poly(flint_poly):
956956
fq_default_poly_shift_right(
957957
res.val, self.val, n, self.ctx.field.val
958958
)
959-
else: # do nothing, just copy self
959+
else: # do nothing, just copy self
960960
fq_default_poly_set(
961961
res.val, self.val, self.ctx.field.val
962962
)

src/flint/types/nmod_mat.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ cdef class nmod_mat(flint_mat):
198198
i, j = index
199199
if i < 0 or i >= self.nrows() or j < 0 or j >= self.ncols():
200200
raise IndexError("index %i,%i exceeds matrix dimensions" % (i, j))
201-
x = nmod(nmod_mat_entry(self.val, i, j), self.modulus()) # XXX: slow
201+
x = nmod(nmod_mat_entry(self.val, i, j), self.modulus()) # XXX: slow
202202
return x
203203

204204
def __setitem__(self, index, value):

src/flint/types/nmod_poly.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ cdef nmod_poly_set_list(nmod_poly_t poly, list val):
3838
cdef long i, n
3939
cdef nmod_t mod
4040
cdef mp_limb_t v
41-
nmod_init(&mod, nmod_poly_modulus(poly)) # XXX
41+
nmod_init(&mod, nmod_poly_modulus(poly)) # XXX
4242
n = PyList_GET_SIZE(val)
4343
nmod_poly_fit_length(poly, n)
4444
for i from 0 <= i < n:

0 commit comments

Comments
 (0)