Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix all pycodestyle E303 warnings in all folders c* #35151

Merged
merged 2 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/sage/calculus/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2442,7 +2442,6 @@ def maxima_options(**kwds):
syms_default = dict(syms_cur)



def _find_var(name, interface=None):
"""
Function to pass to Parser for constructing
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/affine_weyl_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets



class AffineWeylGroups(Category_singleton):
"""
The category of affine Weyl groups
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def one(self):
# version of module morphism, this would not take
# advantage of the block structure


class TensorProducts(TensorProductsCategory):
"""
The category of algebras with basis constructed by tensor product of algebras with basis
Expand Down
2 changes: 0 additions & 2 deletions src/sage/categories/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,6 @@ def _test_category(self, **options):

_cmp_key = _cmp_key


##########################################################################
# Construction of the associated abstract classes for parents, elements, ...
##########################################################################
Expand Down Expand Up @@ -2817,7 +2816,6 @@ def _make_named_class(self, name, method_provider, cache=False, **options):
self._make_named_class_cache[key] = result
return result


@abstract_method
def _make_named_class_key(self, name):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/classical_crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def additional_structure(self):
"""
return None


class ParentMethods:

def demazure_character(self, w, f=None):
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/coalgebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def counit(self, x):
and Hopf algebras using the counit.
"""


@abstract_method
def coproduct(self, x):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,6 @@ def is_reducible(self):
"""
return not self.is_irreducible()


class ElementMethods:
def apply_simple_reflection_left(self, i):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/crystals.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,6 @@ def __iter__(self, index_set=None, max_depth=float('inf')):
R = RecursivelyEnumeratedSet(self.module_generators, succ, structure=None)
return R.breadth_first_search_iterator(max_depth)


def subcrystal(self, index_set=None, generators=None, max_depth=float("inf"),
direction="both", contained=None,
virtualization=None, scaling_factors=None,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ def __init__(self, base_ring):
CombinatorialFreeModule.__init__(self, base_ring, NonNegativeIntegers(),
category=GradedHopfAlgebrasWithBasis(base_ring).Connected())


@cached_method
def one_basis(self):
"""
Expand Down
6 changes: 0 additions & 6 deletions src/sage/categories/examples/sets_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,6 @@ def _element_constructor_(self, e):
element_class = Integer





from sage.misc.abstract_method import abstract_method
class PrimeNumbers_Abstract(UniqueRepresentation, Parent):
"""
Expand Down Expand Up @@ -556,9 +553,6 @@ def _integer_(self, IntRing):
return IntRing(self.value)





#*************************************************************************#
class PrimeNumbers_Facade(PrimeNumbers_Abstract):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/examples/with_realizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ def super_categories(self):
return [A.Realizations(),
category.Realizations().WithBasis()]


class ParentMethods:

def from_set(self, *args):
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/filtered_hopf_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ def super_categories(self):
R = self.base_category().base_ring()
return [HopfAlgebras(R).Filtered()]


class Connected(CategoryWithAxiom_over_base_ring):
class ParentMethods:
@cached_method
Expand Down
2 changes: 0 additions & 2 deletions src/sage/categories/finite_dimensional_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ def semisimple_quotient(self):
result.rename("Semisimple quotient of {}".format(self))
return result


@cached_method
def center_basis(self):
r"""
Expand Down Expand Up @@ -819,7 +818,6 @@ def peirce_summand(self, ei, ej):
return self.submodule([self.from_vector(v) for v in ideal.basis()],
already_echelonized=True)


def peirce_decomposition(self, idempotents=None, check=True):
r"""
Return a Peirce decomposition of ``self``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def central_orthogonal_idempotents(self):
return tuple([x.lift()
for x in self.center().central_orthogonal_idempotents()])


class Commutative(CategoryWithAxiom_over_base_ring):

class ParentMethods:
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/generalized_coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def additional_structure(self):
"""
return None


class Finite(CategoryWithAxiom):
"""
The category of finite generalized Coxeter groups.
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/graded_modules_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def degree_negation(self, element):
for key, value in
element.monomial_coefficients(copy=False).items()])


def submodule(self, gens, check=True, already_echelonized=False,
unitriangular=False, support_order=None, category=None,
*args, **opts):
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/hecke_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ def super_categories(self):
R = self.base_ring()
return [ModulesWithBasis(R)]


def _repr_object_names(self):
"""
Return the names of the objects of this category.
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/semigroups.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,6 @@ def _pow_int(self, n):
raise ArithmeticError("only positive powers are supported in a semigroup")
return generic_power(self, n)


class SubcategoryMethods:

@cached_method
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/sets_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2215,7 +2215,6 @@ def example(self):
S3 = FiniteEnumeratedSets().example()
return cartesian_product([S1, S2, S3])


class ParentMethods:
def __iter__(self):
r"""
Expand Down
1 change: 0 additions & 1 deletion src/sage/categories/topological_spaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ def extra_super_categories(self):
"""
return [TopologicalSpaces().Connected()]


class Compact(CategoryWithAxiom):
"""
The category of compact topological spaces.
Expand Down
2 changes: 0 additions & 2 deletions src/sage/categories/weyl_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ def is_pieri_factor(self):

return self in self.parent().pieri_factors()


def left_pieri_factorizations(self, max_length=None):
r"""
Returns all factorizations of ``self`` as `uv`, where `u`
Expand Down Expand Up @@ -494,7 +493,6 @@ def stanley_symmetric_function_as_polynomial(self, max_length=None):
for (u,v) in self.left_pieri_factorizations(max_length)
if u != W.one()))


def stanley_symmetric_function(self):
r"""
Return the affine Stanley symmetric function indexed by ``self``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/coding/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def __call__(self, m):
"""
return self.encode(m)


def unencode(self, c, nocheck=False):
r"""
Return the message corresponding to the codeword ``c``.
Expand Down
16 changes: 0 additions & 16 deletions src/sage/coding/extended_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,6 @@ def random_element(self):
return vector(F, c_list)










class ExtendedCodeExtendedMatrixEncoder(Encoder):
r"""
Encoder using original code's generator matrix to compute the extended code's one.
Expand Down Expand Up @@ -286,14 +278,6 @@ def generator_matrix(self):
return M










class ExtendedCodeOriginalCodeDecoder(Decoder):
r"""
Decoder which decodes through a decoder over the original code.
Expand Down
2 changes: 0 additions & 2 deletions src/sage/coding/golay_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,6 @@ def parity_check_matrix(self):
return H




####################### registration ###############################

GolayCode._registered_encoders["GeneratorMatrix"] = LinearCodeGeneratorMatrixEncoder
3 changes: 0 additions & 3 deletions src/sage/coding/guruswami_sudan/gs_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,6 @@ def gs_satisfactory(tau, s, l, C = None, n_k = None):
n,k = n_k_params(C, n_k)
return l > 0 and s > 0 and n * s * (s+1) < (l+1) * (2*s*(n-tau) - (k-1) * l)



####################### decoder itself ###############################
def __init__(self, code, tau = None, parameters = None, interpolation_alg = None, root_finder = None):
r"""
Expand Down Expand Up @@ -712,7 +710,6 @@ def parameters(self):
"""
return (self._s, self._ell)


def multiplicity(self):
r"""
Returns the multiplicity parameter of ``self``.
Expand Down
4 changes: 0 additions & 4 deletions src/sage/coding/information_set_decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,6 @@ def _latex_(self):
return "\\textnormal{{ISD Algorithm ({}) for }}{} \\textnormal{{decoding {} errors}}".format(self._algorithm_name, self.code()._latex_(), _format_decoding_interval(self.decoding_interval()))




class LeeBrickellISDAlgorithm(InformationSetAlgorithm):
r"""
The Lee-Brickell algorithm for information-set decoding.
Expand Down Expand Up @@ -629,8 +627,6 @@ def _calibrate_select(self, estimates):
self._time_estimate = estimates[search_size]




class LinearCodeInformationSetDecoder(Decoder):
r"""
Information-set decoder for any linear code.
Expand Down
1 change: 0 additions & 1 deletion src/sage/coding/linear_code_no_metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,6 @@ def __init__(self, code, systematic_positions=None):
# Test that the systematic positions are an information set
self.generator_matrix()


def __eq__(self, other):
r"""
Tests equality between LinearCodeSystematicEncoder objects.
Expand Down
9 changes: 0 additions & 9 deletions src/sage/coding/punctured_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ def _insert_punctured_positions(l, punctured_points, value = None):
return final



class PuncturedCode(AbstractLinearCode):
r"""
Representation of a punctured code.
Expand Down Expand Up @@ -425,13 +424,6 @@ def generator_matrix(self):
return M









class PuncturedCodeOriginalCodeDecoder(Decoder):
r"""
Decoder decoding through a decoder over the original code of its punctured code.
Expand Down Expand Up @@ -580,7 +572,6 @@ def _repr_(self):
"""
return "Decoder of %s through %s" % (self.code(), self.original_decoder())


def _latex_(self):
r"""
Returns a latex representation of ``self``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/coding/self_dual_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,6 @@ def self_dual_binary_codes(n):
"6":self_dual_codes_18_6,"7":self_dual_codes_18_7,"8":self_dual_codes_18_8}
return self_dual_codes


if n == 20:
# all of these of these are Type I; 2 of these codes
# are formally equivalent but with different automorphism groups;
Expand Down
2 changes: 0 additions & 2 deletions src/sage/combinat/designs/bibd.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ def balanced_incomplete_block_design(v, k, lambd=1, existence=False, use_LJCR=Fa
else:
return BIBD(B.ground_set(), B.blocks(), k=k, lambd=1, copy=False)


if ( (k+lambd)*(k+lambd-1) == lambd*(v+k+lambd-1) and
balanced_incomplete_block_design(v+k+lambd, k+lambd, lambd, existence=True) is True):
# By removing a block and all points of that block from the
Expand Down Expand Up @@ -661,7 +660,6 @@ def BIBD_from_TD(v,k,existence=False):
return BIBD



def BIBD_from_difference_family(G, D, lambd=None, check=True):
r"""
Return the BIBD associated to the difference family ``D`` on the group ``G``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/combinat/designs/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ def OA_8_69():
for BB in OA_8_7:
OA.append([B[i] for i in BB])


# Adding the missing 0..0,1..1,... rows
done = sum(O1,[])+sum(O2,[])
missing = [x for x in range(73) if x not in done and x not in oval]
Expand Down
2 changes: 0 additions & 2 deletions src/sage/combinat/designs/difference_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,6 @@ def radical_difference_family(K, k, l=1, existence=False, check=True):
elif existence:
return True


if check and not is_difference_family(K, D, v, k, l):
raise RuntimeError("radical_difference_family produced a wrong "
"difference family with parameters v={}, "
Expand Down Expand Up @@ -1805,7 +1804,6 @@ def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=Tru
psi1 = ((1 + P.monomial((q-1)//2)) * theta1).mod(P.monomial(q-1) - 1)
psi2 = (1 + (1 + P.monomial((q-1)//2)) * theta2).mod(P.monomial(q-1) - 1)


K1 = list(map(Integer, psi1.exponents()))
K2 = list(map(Integer, psi2.exponents()))
K3 = list(map(Integer, psi3.exponents()))
Expand Down
1 change: 0 additions & 1 deletion src/sage/combinat/designs/ext_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,6 @@ def __init__(self, node):
('block', {}, [[6, 8, 10]])]
"""


if isinstance(node, str):
node = (node, {}, [])
name, attributes, children = node
Expand Down
1 change: 0 additions & 1 deletion src/sage/combinat/designs/incidence_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,6 @@ def is_resolvable(self, certificate=False, solver=None, verbose=0, check=True,
else:
return True


def coloring(self, k=None, solver=None, verbose=0,
*, integrality_tolerance=1e-3):
r"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,6 @@ def brouwer_separable_design(k,t,q,x,check=False,verbose=False,explain_construct
# The set of size x
OA.extend([N-xx-1 for xx in B] for B in orthogonal_array(k,x))


# iv)
elif (x == q**2+1 and
orthogonal_array( k , x ,existence=True) and # d0
Expand Down
Loading