Skip to content

Commit cb2a6aa

Browse files
author
Release Manager
committed
gh-39105: two more ruff checks activated one of them fixed here ; also sorting the list of ignored checks ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. URL: #39105 Reported by: Frédéric Chapoton Reviewer(s): Tobias Diez
2 parents 86045cd + a89a3ca commit cb2a6aa

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ def __init__(self, *args):
19851985
"""
19861986
data = args
19871987
if len(data) < 2 or not all(isinstance(comp, QuiverMutationType_Irreducible) for comp in data):
1988-
return _mutation_type_error(data)
1988+
_mutation_type_error(data)
19891989

19901990
# _info is initialized
19911991
self._info = {}

src/sage/combinat/finite_state_machine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14717,7 +14717,7 @@ def __init__(self, *args, **kwargs):
1471714717
self.TapeCache = _FSMTapeCacheDetectEpsilon_
1471814718
self.visited_states = {}
1471914719
kwargs['check_epsilon_transitions'] = False
14720-
return super().__init__(*args, **kwargs)
14720+
super().__init__(*args, **kwargs)
1472114721

1472214722
def _push_branch_(self, state, tape_cache, outputs):
1472314723
"""
@@ -14842,7 +14842,7 @@ def __init__(self, *args, **kwargs):
1484214842
self.TapeCache = _FSMTapeCacheDetectAll_
1484314843
self.visited_states = {}
1484414844
kwargs['check_epsilon_transitions'] = False
14845-
return super().__init__(*args, **kwargs)
14845+
super().__init__(*args, **kwargs)
1484614846

1484714847

1484814848
# ****************************************************************************

src/sage/groups/misc_gps/argument_groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ def __init__(self, category):
10061006
Rational Field
10071007
"""
10081008
from sage.rings.rational_field import QQ
1009-
return super().__init__(base=QQ, category=category)
1009+
super().__init__(base=QQ, category=category)
10101010

10111011
def _repr_(self):
10121012
r"""
@@ -1626,7 +1626,7 @@ def __init__(self, category):
16261626
sage: S.base() # indirect doctest
16271627
<class 'int'>
16281628
"""
1629-
return super().__init__(base=int, category=category)
1629+
super().__init__(base=int, category=category)
16301630

16311631
def _repr_(self):
16321632
r"""

src/sage/modular/arithgroup/congroup_generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ def __init__(self, *args, **kwds):
464464
sage: sage.modular.arithgroup.congroup_generic.CongruenceSubgroup(5) # indirect doctest
465465
Generic congruence subgroup of level 5
466466
"""
467-
return CongruenceSubgroupBase.__init__(self, *args, **kwds)
467+
CongruenceSubgroupBase.__init__(self, *args, **kwds)
468468

469469
def _repr_(self):
470470
"""

src/sage/repl/ipython_kernel/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def __init__(self, *args, **kwds):
119119
<... 'dict'>
120120
"""
121121
self.__transform = kwds.pop("transform", None)
122-
return super().__init__(*args, **kwds)
122+
super().__init__(*args, **kwds)
123123

124124
def get_value(self):
125125
"""

src/tox.ini

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ passenv = RUFF_OUTPUT_FORMAT
302302
# 12 F811 [*] Redefinition of unused `CompleteDiscreteValuationRings` from line 49
303303
# 8 PLC0414 [*] Import alias does not rename original package
304304
# 7 E743 [ ] Ambiguous function name: `I`
305-
# 7 PLE0101 [ ] Explicit return in `__init__`
306305
# 7 PLR0124 [ ] Name compared with itself, consider replacing `a == a`
307306
# 5 PLW0127 [ ] Self-assignment of variable `a`
308307
# 4 F541 [*] f-string without any placeholders
@@ -314,7 +313,7 @@ passenv = RUFF_OUTPUT_FORMAT
314313
# 1 F402 [ ] Import `factor` from line 259 shadowed by loop variable
315314
# 1 PLC0208 [*] Use a sequence type instead of a `set` when iterating over values
316315
#
317-
commands = ruff check --ignore PLR2004,I001,F401,E741,F821,PLR0912,PLR0913,E402,PLR0915,PLW2901,PLR5501,PLR0911,E731,F405,PLR1714,PLR1736,F403,PLR0402,PLW0603,F841,PLW0602,PLW0642,PLR1711,SIM101,PLR1704,PLW3301,PLW1510,E721,PLW0211,PLW0120,F811,PLC2401,PLC0414,E743,PLE0101,PLR0124,PLW0127,F541,PLW1508,PLC3002,E742,PLE0302,PLW0129,F402,PLC0208,PLC0206 {posargs:{toxinidir}/sage/}
316+
commands = ruff check --ignore E402,E721,E731,E741,E742,E743,F401,F402,F403,F405,F541,F811,F821,F841,I001,PLC0206,PLC0208,PLC0414,PLC2401,PLC3002,PLE0302,PLR0124,PLR0402,PLR0911,PLR0912,PLR0913,PLR0915,PLR1704,PLR1711,PLR1714,PLR1736,PLR2004,PLR5501,PLW0120,PLW0127,PLW0129,PLW0211,PLW0602,PLW0603,PLW0642,PLW1508,PLW1510,PLW2901,PLW3301 {posargs:{toxinidir}/sage/}
318317

319318
[flake8]
320319
rst-roles =

0 commit comments

Comments
 (0)