Skip to content

Commit b34ac5f

Browse files
committed
auto-annotation by ruff
1 parent bc8a404 commit b34ac5f

File tree

8 files changed

+20
-20
lines changed

8 files changed

+20
-20
lines changed

src/sage/combinat/posets/cartesian_product.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class CartesianProductPoset(CartesianProduct):
8181
:class:`CartesianProduct`
8282
"""
8383

84-
def __init__(self, sets, category, order=None, **kwargs):
84+
def __init__(self, sets, category, order=None, **kwargs) -> None:
8585
r"""
8686
See :class:`CartesianProductPoset` for details.
8787

src/sage/combinat/posets/elements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
class PosetElement(Element):
2525

26-
def __init__(self, poset, element, vertex):
26+
def __init__(self, poset, element, vertex) -> None:
2727
r"""
2828
Establish the parent-child relationship between ``poset``
2929
and ``element``, where ``element`` is associated to the

src/sage/combinat/posets/hasse_diagram.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class LatticeError(ValueError):
4040
a and b" instead of "No meet for 1 and 2".
4141
"""
4242

43-
def __init__(self, fail, x, y):
43+
def __init__(self, fail, x, y) -> None:
4444
"""
4545
Initialize the exception.
4646
@@ -56,7 +56,7 @@ def __init__(self, fail, x, y):
5656
self.x = x
5757
self.y = y
5858

59-
def __str__(self):
59+
def __str__(self) -> str:
6060
"""
6161
Return string representation of the exception.
6262

src/sage/combinat/posets/incidence_algebras.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class IncidenceAlgebra(CombinatorialFreeModule):
5252
5353
- :wikipedia:`Incidence_algebra`
5454
"""
55-
def __init__(self, R, P, prefix='I'):
55+
def __init__(self, R, P, prefix='I') -> None:
5656
"""
5757
Initialize ``self``.
5858
@@ -438,7 +438,7 @@ class ReducedIncidenceAlgebra(CombinatorialFreeModule):
438438
`[x, y]` is isomorphic to `[x', y']` as posets. Thus the delta, Möbius,
439439
and zeta functions are all elements of `R_P`.
440440
"""
441-
def __init__(self, I, prefix='R'):
441+
def __init__(self, I, prefix='R') -> None:
442442
"""
443443
Initialize ``self``.
444444

src/sage/combinat/posets/linear_extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ def __classcall_private__(cls, poset, facade=False):
513513
"""
514514
return super().__classcall__(cls, poset, facade=facade)
515515

516-
def __init__(self, poset, facade):
516+
def __init__(self, poset, facade) -> None:
517517
"""
518518
TESTS::
519519
@@ -671,7 +671,7 @@ def __iter__(self):
671671
for lin_ext in linear_extension_iterator(self._poset._hasse_diagram):
672672
yield self._element_constructor_([vertex_to_element(_) for _ in lin_ext])
673673

674-
def __contains__(self, obj):
674+
def __contains__(self, obj) -> bool:
675675
"""
676676
Membership testing
677677

src/sage/combinat/posets/mobile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class MobilePoset(FinitePoset):
6464
_lin_ext_type = LinearExtensionsOfMobile
6565
_desc = 'Finite mobile poset'
6666

67-
def __init__(self, hasse_diagram, elements, category, facade, key, ribbon=None, check=True):
67+
def __init__(self, hasse_diagram, elements, category, facade, key, ribbon=None, check=True) -> None:
6868
r"""
6969
Initialize ``self``.
7070

src/sage/combinat/posets/moebius_algebra.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class MoebiusAlgebra(Parent, UniqueRepresentation):
9696
European Journal of Combinatorics, **19**, 1998.
9797
:doi:`10.1006/eujc.1998.0227`.
9898
"""
99-
def __init__(self, R, L):
99+
def __init__(self, R, L) -> None:
100100
"""
101101
Initialize ``self``.
102102
@@ -161,7 +161,7 @@ class E(BasisAbstract):
161161
Let `E_x` and `E_y` be basis elements of `M_L` for some lattice `L`.
162162
Multiplication is given by `E_x E_y = E_{x \vee y}`.
163163
"""
164-
def __init__(self, M, prefix='E'):
164+
def __init__(self, M, prefix='E') -> None:
165165
"""
166166
Initialize ``self``.
167167
@@ -242,7 +242,7 @@ class I(BasisAbstract):
242242
Multiplication is given by `I_x I_y = \delta_{xy} I_x` where
243243
`\delta_{xy}` is the Kronecker delta.
244244
"""
245-
def __init__(self, M, prefix='I'):
245+
def __init__(self, M, prefix='I') -> None:
246246
"""
247247
Initialize ``self``.
248248
@@ -381,7 +381,7 @@ class QuantumMoebiusAlgebra(Parent, UniqueRepresentation):
381381
\operatorname{rank} L - \operatorname{rank}` a). At `q = 1`, this
382382
reduces to the multiplication formula originally given by Solomon.
383383
"""
384-
def __init__(self, L, q=None):
384+
def __init__(self, L, q=None) -> None:
385385
"""
386386
Initialize ``self``.
387387
@@ -471,7 +471,7 @@ class E(BasisAbstract):
471471
is the corank function (i.e., `\operatorname{crk} a =
472472
\operatorname{rank} L - \operatorname{rank}` a).
473473
"""
474-
def __init__(self, M, prefix='E'):
474+
def __init__(self, M, prefix='E') -> None:
475475
"""
476476
Initialize ``self``.
477477
@@ -547,7 +547,7 @@ class C(BasisAbstract):
547547
filter of `x` and `P(F^x; q)` is the characteristic polynomial
548548
of the (sub)poset `F^x`.
549549
"""
550-
def __init__(self, M, prefix='C'):
550+
def __init__(self, M, prefix='C') -> None:
551551
"""
552552
Initialize ``self``.
553553
@@ -626,7 +626,7 @@ class KL(BasisAbstract):
626626
sage: KL[4] * KL[10]
627627
(q+3*q^2+3*q^3+q^4)*KL[14] + (1+4*q+6*q^2+4*q^3+q^4)*KL[15]
628628
"""
629-
def __init__(self, M, prefix='KL'):
629+
def __init__(self, M, prefix='KL') -> None:
630630
"""
631631
Initialize ``self``.
632632

src/sage/combinat/posets/posets.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ def __classcall__(cls, hasse_diagram, elements=None, category=None, facade=None,
10131013
category=category, facade=facade,
10141014
key=key)
10151015

1016-
def __init__(self, hasse_diagram, elements, category, facade, key):
1016+
def __init__(self, hasse_diagram, elements, category, facade, key) -> None:
10171017
r"""
10181018
EXAMPLES::
10191019
@@ -1230,7 +1230,7 @@ def unwrap(self, element):
12301230
else:
12311231
return element.element
12321232

1233-
def __contains__(self, x):
1233+
def __contains__(self, x) -> bool:
12341234
r"""
12351235
Return ``True`` if ``x`` is an element of the poset.
12361236
@@ -8909,7 +8909,7 @@ class FinitePosets_n(UniqueRepresentation, Parent):
89098909
[[1, 2], [0, 2]]
89108910
"""
89118911

8912-
def __init__(self, n):
8912+
def __init__(self, n) -> None:
89138913
r"""
89148914
EXAMPLES::
89158915
@@ -8934,7 +8934,7 @@ def _repr_(self):
89348934
"""
89358935
return "Posets containing %s elements" % self._n
89368936

8937-
def __contains__(self, P):
8937+
def __contains__(self, P) -> bool:
89388938
"""
89398939
EXAMPLES::
89408940

0 commit comments

Comments
 (0)