Skip to content

Commit 7073ee1

Browse files
authored
TYP: @Final in groupby (#38200)
* TYP: @Final in groupby * TYP: @Final in groupby * remove comment * indent docstring, @Final
1 parent 5020a61 commit 7073ee1

File tree

4 files changed

+116
-19
lines changed

4 files changed

+116
-19
lines changed

pandas/core/groupby/base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import collections
77
from typing import List
88

9+
from pandas._typing import final
10+
911
from pandas.core.dtypes.common import is_list_like, is_scalar
1012

1113
from pandas.core.base import PandasObject
@@ -16,6 +18,7 @@
1618
class ShallowMixin(PandasObject):
1719
_attributes: List[str] = []
1820

21+
@final
1922
def _shallow_copy(self, obj, **kwargs):
2023
"""
2124
return a new object with the replacement attributes
@@ -35,6 +38,7 @@ class GotItemMixin(PandasObject):
3538

3639
_attributes: List[str]
3740

41+
@final
3842
def _gotitem(self, key, ndim, subset=None):
3943
"""
4044
Sub-classes to define. Return a sliced object.

0 commit comments

Comments
 (0)