Skip to content

Commit 1de6945

Browse files
committed
Some annotations for drinfeld modules
1 parent 84a034e commit 1de6945

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def _act_(self, pol, x):
140140
raise TypeError('second input must be in the field acted upon')
141141
return self._drinfeld_module(pol)(x)
142142

143-
def _latex_(self):
143+
def _latex_(self) -> str:
144144
r"""
145145
Return a LaTeX representation of the action.
146146
@@ -160,7 +160,7 @@ def _latex_(self):
160160
f'{latex(self._base)}\\text{{{{ }}' \
161161
f'induced{{ }}by{{ }}}}{latex(self._drinfeld_module)}'
162162

163-
def _repr_(self):
163+
def _repr_(self) -> str:
164164
r"""
165165
Return a string representation of the action.
166166

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ def _Hom_(self, other, category):
750750
from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset
751751
return DrinfeldModuleHomset(self, other, category)
752752

753-
def _latex_(self):
753+
def _latex_(self) -> str:
754754
r"""
755755
Return a LaTeX representation of the Drinfeld module.
756756
@@ -780,7 +780,7 @@ def _latex_(self):
780780
return f'\\phi: {latex(self._function_ring.gen())} \\mapsto ' \
781781
f'{latex(self._gen)}'
782782

783-
def _repr_(self):
783+
def _repr_(self) -> str:
784784
r"""
785785
Return a string representation of this Drinfeld module.
786786
@@ -824,7 +824,7 @@ def _test_category(self, **options):
824824
tester.assertTrue(isinstance(self, category.parent_class),
825825
_LazyString("category of %s improperly initialized", (self,), {}))
826826

827-
def __hash__(self):
827+
def __hash__(self) -> int:
828828
r"""
829829
Return a hash of ``self``.
830830

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def __init__(self, X, Y, category=None, check=True):
289289
self.register_coercion(A)
290290
self._basis = None
291291

292-
def _latex_(self):
292+
def _latex_(self) -> str:
293293
r"""
294294
Return a LaTeX representation of the homset.
295295
@@ -309,7 +309,7 @@ def _latex_(self):
309309
f'\\text{{{{ }}to{{ }}(gen){{ }}}}'\
310310
f'{latex(self.codomain().gen())}'
311311

312-
def _repr_(self):
312+
def _repr_(self) -> str:
313313
r"""
314314
Return a string representation of the homset.
315315

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def __init__(self, parent, ore_pol):
217217
self._codomain = parent.codomain()
218218
self._ore_polynomial = ore_pol
219219

220-
def _latex_(self):
220+
def _latex_(self) -> str:
221221
r"""
222222
Return a LaTeX representation of the morphism.
223223
@@ -235,7 +235,7 @@ def _latex_(self):
235235
"""
236236
return f'{latex(self._ore_polynomial)}'
237237

238-
def _repr_(self):
238+
def _repr_(self) -> str:
239239
r"""
240240
Return a string representation of the morphism.
241241
@@ -265,7 +265,7 @@ def _repr_(self):
265265
f' To: {self._codomain}\n' \
266266
f' Defn: {self._ore_polynomial}'
267267

268-
def __hash__(self):
268+
def __hash__(self) -> int:
269269
r"""
270270
Return a hash of ``self``.
271271

0 commit comments

Comments
 (0)