Skip to content

Commit e12d4ec

Browse files
authored
TYP: annotation of __init__ return type (PEP 484) (pandas/utils) (#46276)
1 parent 60cc2f3 commit e12d4ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/util/_decorators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def some_function(x):
435435
"%s %s wrote the Raven"
436436
"""
437437

438-
def __init__(self, *args, **kwargs):
438+
def __init__(self, *args, **kwargs) -> None:
439439
if args and kwargs:
440440
raise AssertionError("Only positional or keyword args are allowed")
441441

@@ -475,7 +475,7 @@ def my_dog(has='fleas'):
475475

476476
addendum: str | None
477477

478-
def __init__(self, addendum: str | None, join: str = "", indents: int = 0):
478+
def __init__(self, addendum: str | None, join: str = "", indents: int = 0) -> None:
479479
if indents > 0:
480480
self.addendum = indent(addendum, indents=indents)
481481
else:

pandas/util/_doctools.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(
1616
cell_width: float = 0.37,
1717
cell_height: float = 0.25,
1818
font_size: float = 7.5,
19-
):
19+
) -> None:
2020
self.cell_width = cell_width
2121
self.cell_height = cell_height
2222
self.font_size = font_size

0 commit comments

Comments
 (0)