Skip to content

Commit

Permalink
TYP: annotation of __init__ return type (PEP 484) (pandas/utils) (#46276
Browse files Browse the repository at this point in the history
)
  • Loading branch information
nafarya authored Mar 16, 2022
1 parent 60cc2f3 commit e12d4ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pandas/util/_decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def some_function(x):
"%s %s wrote the Raven"
"""

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

Expand Down Expand Up @@ -475,7 +475,7 @@ def my_dog(has='fleas'):

addendum: str | None

def __init__(self, addendum: str | None, join: str = "", indents: int = 0):
def __init__(self, addendum: str | None, join: str = "", indents: int = 0) -> None:
if indents > 0:
self.addendum = indent(addendum, indents=indents)
else:
Expand Down
2 changes: 1 addition & 1 deletion pandas/util/_doctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def __init__(
cell_width: float = 0.37,
cell_height: float = 0.25,
font_size: float = 7.5,
):
) -> None:
self.cell_width = cell_width
self.cell_height = cell_height
self.font_size = font_size
Expand Down

0 comments on commit e12d4ec

Please sign in to comment.