Skip to content

Commit 140807b

Browse files
committed
autotyping --safe for drinfeld modules
1 parent 1de6945 commit 140807b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/sage/rings/function_field/drinfeld_modules/action.py

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

84-
def __init__(self, drinfeld_module):
84+
def __init__(self, drinfeld_module) -> None:
8585
"""
8686
Initialize ``self``.
8787

src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@ def __classcall_private__(cls, function_ring, gen, name='τ'):
621621
return DrinfeldModule_charzero(gen, category)
622622
return cls.__classcall__(cls, gen, category)
623623

624-
def __init__(self, gen, category):
624+
def __init__(self, gen, category) -> None:
625625
"""
626626
Initialize ``self``.
627627
@@ -797,7 +797,7 @@ def _repr_(self) -> str:
797797
return f'Drinfeld module defined by {self._function_ring.gen()} ' \
798798
f'|--> {self._gen}'
799799

800-
def _test_category(self, **options):
800+
def _test_category(self, **options) -> None:
801801
"""
802802
Run generic tests on the method :meth:`.category`.
803803
@@ -1270,7 +1270,7 @@ def height(self):
12701270
except NotImplementedError:
12711271
raise NotImplementedError('height not implemented in this case')
12721272

1273-
def is_isomorphic(self, other, absolutely=False):
1273+
def is_isomorphic(self, other, absolutely=False) -> bool:
12741274
r"""
12751275
Return ``True`` if this Drinfeld module is isomorphic to ``other``;
12761276
return ``False`` otherwise.

src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class DrinfeldModule_finite(DrinfeldModule):
124124
True
125125
"""
126126

127-
def __init__(self, gen, category):
127+
def __init__(self, gen, category) -> None:
128128
"""
129129
Initialize ``self``.
130130

src/sage/rings/function_field/drinfeld_modules/homset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class DrinfeldModuleMorphismAction(Action):
7272
To: Drinfeld module defined by T |--> (2*z^2 + 4*z + 4)*τ^2 + (z^2 + 4*z + 3)*τ + z
7373
Defn: τ + 2
7474
"""
75-
def __init__(self, A, H, is_left, op):
75+
def __init__(self, A, H, is_left, op) -> None:
7676
r"""
7777
Initialize this action.
7878
@@ -241,7 +241,7 @@ class DrinfeldModuleHomset(Homset):
241241
"""
242242
Element = DrinfeldModuleMorphism
243243

244-
def __init__(self, X, Y, category=None, check=True):
244+
def __init__(self, X, Y, category=None, check=True) -> None:
245245
"""
246246
Initialize ``self``.
247247
@@ -327,7 +327,7 @@ def _repr_(self) -> str:
327327
return f'Set of Drinfeld module morphisms from (gen) '\
328328
f'{self.domain().gen()} to (gen) {self.codomain().gen()}'
329329

330-
def __contains__(self, x):
330+
def __contains__(self, x) -> bool:
331331
r"""
332332
Return ``True`` if the input defines a morphism in the homset.
333333

src/sage/rings/function_field/drinfeld_modules/morphism.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __classcall_private__(cls, parent, x):
186186
raise ValueError('Ore polynomial does not define a morphism')
187187
return cls.__classcall__(cls, parent, ore_pol)
188188

189-
def __init__(self, parent, ore_pol):
189+
def __init__(self, parent, ore_pol) -> None:
190190
r"""
191191
Initialize ``self``.
192192
@@ -331,7 +331,7 @@ def is_identity(self):
331331
"""
332332
return self._ore_polynomial == 1
333333

334-
def is_isogeny(self):
334+
def is_isogeny(self) -> bool:
335335
r"""
336336
Return ``True`` whether the morphism is an isogeny.
337337

0 commit comments

Comments
 (0)