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

fixing some pep8 E303 (folders before l* and after t*) #35413

Merged
merged 1 commit into from
Apr 6, 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
8 changes: 4 additions & 4 deletions src/sage/categories/simplicial_sets.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
"""
Simplicial Sets
"""
#*****************************************************************************
# ****************************************************************************
# Copyright (C) 2015 John H. Palmieri <palmieri at math.washington.edu>
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/
#******************************************************************************
# https://www.gnu.org/licenses/
# *****************************************************************************

from sage.misc.cachefunc import cached_method
from sage.categories.category_singleton import Category_singleton
Expand All @@ -16,6 +16,7 @@
from sage.rings.infinity import Infinity
from sage.rings.integer import Integer


class SimplicialSets(Category_singleton):
r"""
The category of simplicial sets.
Expand Down Expand Up @@ -384,7 +385,6 @@ def _universal_cover_dict(self):
char[e] = G.one()
return (G, char)


def universal_cover_map(self):
r"""
Return the universal covering map of the simplicial set.
Expand Down
2 changes: 0 additions & 2 deletions src/sage/graphs/generic_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,6 @@ def __eq__(self, other):

return self._backend.is_subgraph(other._backend, self, ignore_labels=not self.weighted())


def _use_labels_for_hash(self):
r"""
Helper method for method ``__hash__``.
Expand Down Expand Up @@ -648,7 +647,6 @@ def _use_labels_for_hash(self):
self._hash_labels = self.weighted()
return self._hash_labels


@cached_method
def __hash__(self):
"""
Expand Down
2 changes: 0 additions & 2 deletions src/sage/groups/braid.py
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,6 @@ def annular_khovanov_homology(self, qagrad=None, ring=IntegerRing()):
return {qa: C[qa].homology() for qa in C}
return self.annular_khovanov_complex(qagrad, ring).homology()


@cached_method
def left_normal_form(self, algorithm='libbraiding'):
r"""
Expand Down Expand Up @@ -1867,7 +1866,6 @@ def pure_conjugating_braid(self, other):
n2 = len(b2.Tietze())
return b2 if n2 <= n0 else b0


def ultra_summit_set(self):
"""
Return a list with the orbits of the ultra summit set of ``self``
Expand Down
17 changes: 0 additions & 17 deletions src/sage/knots/knotinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@
##############################################################################



from enum import Enum
from sage.misc.cachefunc import cached_method
from sage.misc.sage_eval import sage_eval
Expand All @@ -251,8 +250,6 @@
from sage.databases.knotinfo_db import KnotInfoColumns, db




def eval_knotinfo(string, locals={}, to_tuple=True):
r"""
Preparse a string from the KnotInfo database and evaluate it by ``sage_eval``.
Expand Down Expand Up @@ -301,7 +298,6 @@ def knotinfo_bool(string):
raise ValueError('%s is not a KnotInfo boolean')



# ---------------------------------------------------------------------------------
# KnotInfoBase
# ---------------------------------------------------------------------------------
Expand Down Expand Up @@ -447,7 +443,6 @@ def _braid_group(self):
else:
return BraidGroup(n)


@cached_method
def _homfly_pol_ring(self, var1, var2):
r"""
Expand Down Expand Up @@ -1159,7 +1154,6 @@ def is_oriented(self):
"""
return not knotinfo_bool(self[self.items.unoriented])


@cached_method
def homfly_polynomial(self, var1='v', var2='z', original=False):
r"""
Expand Down Expand Up @@ -1345,7 +1339,6 @@ def kauffman_polynomial(self, var1='a', var2='z', original=False):
lc = {'a': a, 'z': z}
return R(eval_knotinfo(kauffman_polynomial, locals=lc))


@cached_method
def jones_polynomial(self, variab=None, skein_normalization=False, puiseux=False, original=False, use_sqrt=False):
r"""
Expand Down Expand Up @@ -1534,10 +1527,8 @@ def jones_polynomial(self, variab=None, skein_normalization=False, puiseux=False
else:
lc = {'x': t}


return R(eval_knotinfo(jones_polynomial, locals=lc))


@cached_method
def alexander_polynomial(self, var='t', original=False, laurent_poly=False):
r"""
Expand Down Expand Up @@ -1958,7 +1949,6 @@ def link(self, use_item=db.columns().pd_notation, snappy=False):

raise ValueError('Link construction using %s not possible' %use_item)


@cached_method
def is_unique(self):
r"""
Expand Down Expand Up @@ -2170,7 +2160,6 @@ def diagram(self, single=False, new=0, autoraise=True):
else:
return webbrowser.open(filename.diagram_url(self[self.items.name]), new=new, autoraise=autoraise)


def knot_atlas_webpage(self, new=0, autoraise=True):
r"""
Launch the Knot Atlas web-page for ``self``.
Expand Down Expand Up @@ -2212,7 +2201,6 @@ def knotilus_webpage(self, new=0, autoraise=True):
return webbrowser.open(self[self.items.knotilus_page_anon], new=new, autoraise=autoraise)



# --------------------------------------------------------------------------------------------
# KnotInfoSeries
# --------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -2256,7 +2244,6 @@ class KnotInfoSeries(UniqueRepresentation, SageObject):
True
"""


def __init__(self, crossing_number, is_knot, is_alternating, name_unoriented=None):
r"""
Python constructor.
Expand Down Expand Up @@ -2363,7 +2350,6 @@ def list(self, oriented=False, comp=None, det=None, homfly=None):
res.append(KnotInfoSeries(cross_nr, is_knot, is_alt, curr_n_unori))
return res


@cached_method
def lower_list(self, oriented=False, comp=None, det=None, homfly=None):
r"""
Expand Down Expand Up @@ -2408,7 +2394,6 @@ def lower_list(self, oriented=False, comp=None, det=None, homfly=None):
l = LS.lower_list(oriented=oriented, comp=comp, det=det, homfly=homfly)
return l + self.list(oriented=oriented, comp=comp, det=det, homfly=homfly)


def __repr__(self):
r"""
Return the representation string of ``self``.
Expand All @@ -2426,7 +2411,6 @@ def __repr__(self):
else:
return 'Series of links %s' %(self._name())


def __getitem__(self, item):
r"""
Return the given ``item`` from the list of ``self``
Expand Down Expand Up @@ -2586,7 +2570,6 @@ def _test_recover(self, **options):
else:
tester.assertTrue(self.is_recoverable(unique=False))


def inject(self, verbose=True):
r"""
Inject ``self`` with its name into the namespace of the
Expand Down
3 changes: 0 additions & 3 deletions src/sage/knots/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -3612,7 +3612,6 @@ def delta(u, v):
ims += sum(line(a[0], **kwargs) for a in im)
return image


def _markov_move_cmp(self, braid):
r"""
Return whether ``self`` can be transformed to the closure of ``braid``
Expand Down Expand Up @@ -4083,7 +4082,6 @@ def answer_list(l):

raise NotImplementedError('this link cannot be uniquely determined%s' %non_unique_hint)


self_m = self.mirror_image()
ls, proved_s = self._knotinfo_matching_list()
lm, proved_m = self_m._knotinfo_matching_list()
Expand Down Expand Up @@ -4130,7 +4128,6 @@ def answer_list(l):

return answer_list(l)


def is_isotopic(self, other):
r"""
Check whether ``self`` is isotopic to ``other``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/libs/eclib/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ def set_verbose(self, verbose):
"""
self.__verbose = verbose


def _curve_data(self):
r"""
Returns the underlying :class:`_Curvedata` class for this mwrank elliptic curve.
Expand Down
2 changes: 0 additions & 2 deletions src/sage/libs/gap/all_documented_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
sage: List(_, Order)
[ 2, 4, 2 ]
"""

from sage.libs.gap.libgap import libgap
from sage.libs.gap.assigned_names import FUNCTIONS as _FUNCTIONS



for _f in _FUNCTIONS:
globals()[_f] = libgap.function_factory(_f)
3 changes: 1 addition & 2 deletions src/sage/libs/gap/gap_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later version.
# http://www.gnu.org/licenses/
# https://www.gnu.org/licenses/
###############################################################################



# selected gap functions to use in tab completion
common_gap_functions = set([
'AbelianGroup',
Expand Down
7 changes: 3 additions & 4 deletions src/sage/logic/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,10 +326,9 @@ def combine(self, statement1, statement2):
var_order = statement1[2] + statement2[2]
return [toks, variables, var_order]


#TODO: implement the simplify function which calls
#a c++ implementation of the ESPRESSO algorithm
#to simplify the truthtable: probably Minilog
# TODO: implement the simplify function which calls
# a c++ implementation of the ESPRESSO algorithm
# to simplify the truthtable: probably Minilog
def simplify(self, table):
"""
Call a C++ implementation of the ESPRESSO algorithm to simplify the
Expand Down
5 changes: 2 additions & 3 deletions src/sage/numerical/linear_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,11 @@ def LinearTensorParent(free_module_parent, linear_functions_parent):
return LinearTensorParent_class(free_module_parent, linear_functions_parent)



#*****************************************************************************
# ****************************************************************************
#
# Parent of linear functions tensored with a free module
#
#*****************************************************************************
# ****************************************************************************

class LinearTensorParent_class(Parent):
r"""
Expand Down
2 changes: 0 additions & 2 deletions src/sage/tensor/modules/alternating_contr_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ def degree(self):
"""
return self._tensor_rank


def display(self, basis=None, format_spec=None):
r"""
Display the alternating contravariant tensor ``self`` in terms
Expand Down Expand Up @@ -470,7 +469,6 @@ def display(self, basis=None, format_spec=None):

disp = display


def wedge(self, other):
r"""
Exterior product of ``self`` with the alternating contravariant
Expand Down
7 changes: 0 additions & 7 deletions src/sage/tensor/modules/comp.py
Original file line number Diff line number Diff line change
Expand Up @@ -1683,7 +1683,6 @@ def __radd__(self, other):
"""
return self + other


def __sub__(self, other):
r"""
Component subtraction.
Expand Down Expand Up @@ -1758,7 +1757,6 @@ def __rsub__(self, other):
"""
return (-self) + other


def __mul__(self, other):
r"""
Component tensor product.
Expand Down Expand Up @@ -1922,7 +1920,6 @@ def paral_mul(a, b, local_list_ind):
result._comp[ind_s + ind_o] = val_s * val_o
return result


def __rmul__(self, other):
r"""
Reflected multiplication (multiplication on the left by ``other``).
Expand Down Expand Up @@ -2526,7 +2523,6 @@ def non_redundant_index_generator(self):
for ind in self.index_generator():
yield ind


def symmetrize(self, *pos):
r"""
Symmetrization over the given index positions.
Expand Down Expand Up @@ -3996,7 +3992,6 @@ def trace(self, pos1, pos2):
result[[ind_res]] = res
return result


def non_redundant_index_generator(self):
r"""
Generator of indices, with only ordered indices in case of symmetries,
Expand Down Expand Up @@ -4439,7 +4434,6 @@ def symmetrize(self, *pos):
result[[ind]] = sum / sym_group.order()
return result


def antisymmetrize(self, *pos):
r"""
Antisymmetrization over the given index positions.
Expand Down Expand Up @@ -5340,7 +5334,6 @@ def _new_instance(self):
return CompFullyAntiSym(self._ring, self._frame, self._nid, self._sindex,
self._output_formatter)


def __add__(self, other):
r"""
Component addition.
Expand Down
1 change: 0 additions & 1 deletion src/sage/tensor/modules/free_module_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,6 @@ def _init_from_family(self, family):
aut.add_comp(self)[:] = mat
fmodule.set_change_of_basis(basis, self, aut)


def module(self):
r"""
Return the free module on which the basis is defined.
Expand Down
1 change: 0 additions & 1 deletion src/sage/tensor/modules/free_module_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ def _new_comp(self, basis: FreeModuleBasis) -> Components:
return Components(fmodule._ring, basis, 1, start_index=fmodule._sindex,
output_formatter=fmodule._output_formatter)


def _new_instance(self):
r"""
Create an instance of the same class as ``self``.
Expand Down
1 change: 0 additions & 1 deletion src/sage/tensor/modules/free_module_homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ def _coerce_map_from_(self, other):

#### End of methods required for any Parent


#### Monoid methods (case of an endomorphism set) ####

def one(self):
Expand Down
2 changes: 0 additions & 2 deletions src/sage/tensor/modules/free_module_linear_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ def _element_constructor_(self, comp=[], basis=None, name=None,
resu.set_comp(basis)[:] = comp
return resu


def _an_element_(self):
r"""
Construct some specific free module automorphism.
Expand Down Expand Up @@ -550,7 +549,6 @@ def _latex_(self):
from sage.misc.latex import latex
return r"\mathrm{GL}\left("+ latex(self._fmodule)+ r"\right)"


def base_module(self):
r"""
Return the free module of which ``self`` is the general linear group.
Expand Down
1 change: 0 additions & 1 deletion src/sage/tensor/modules/free_module_morphism.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,6 @@ def _lmul_(self, scalar):
resu._matrices[bases] = scalar * mat
return resu


#
# Other module methods
#
Expand Down
Loading