We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c8199f commit c4dd0bdCopy full SHA for c4dd0bd
doc/make.py
@@ -45,7 +45,7 @@ def __init__(
45
single_doc=None,
46
verbosity=0,
47
warnings_are_errors=False,
48
- ):
+ ) -> None:
49
self.num_jobs = num_jobs
50
self.include_api = include_api
51
self.whatsnew = whatsnew
pandas/_config/config.py
@@ -204,7 +204,7 @@ def get_default_val(pat: str):
204
class DictWrapper:
205
"""provide attribute-style access to a nested dict"""
206
207
- def __init__(self, d: dict[str, Any], prefix: str = ""):
+ def __init__(self, d: dict[str, Any], prefix: str = "") -> None:
208
object.__setattr__(self, "d", d)
209
object.__setattr__(self, "prefix", prefix)
210
@@ -248,7 +248,7 @@ def __dir__(self) -> Iterable[str]:
248
249
250
class CallableDynamicDoc:
251
- def __init__(self, func, doc_tmpl):
+ def __init__(self, func, doc_tmpl) -> None:
252
self.__doc_tmpl__ = doc_tmpl
253
self.__func__ = func
254
@@ -422,7 +422,7 @@ class option_context(ContextDecorator):
422
... pass
423
"""
424
425
- def __init__(self, *args):
+ def __init__(self, *args) -> None:
426
if len(args) % 2 != 0 or len(args) < 2:
427
raise ValueError(
428
"Need to invoke as option_context(pat, val, [(pat, val), ...])."
pandas/_testing/contexts.py
@@ -228,7 +228,7 @@ class RNGContext:
228
np.random.randn()
229
230
231
- def __init__(self, seed):
+ def __init__(self, seed) -> None:
232
self.seed = seed
233
234
def __enter__(self):
pandas/compat/numpy/function.py
@@ -40,7 +40,7 @@ def __init__(
40
fname=None,
41
method: str | None = None,
42
max_fname_arg_count=None,
43
44
self.fname = fname
self.method = method
self.defaults = defaults
pandas/conftest.py
@@ -447,7 +447,7 @@ def dict_subclass():
447
448
449
class TestSubDict(dict):
450
- def __init__(self, *args, **kwargs):
+ def __init__(self, *args, **kwargs) -> None:
451
dict.__init__(self, *args, **kwargs)
452
453
return TestSubDict
@@ -460,7 +460,7 @@ def non_dict_mapping_subclass():
460
461
462
class TestNonDictMapping(abc.Mapping):
463
- def __init__(self, underlying_dict):
+ def __init__(self, underlying_dict) -> None:
464
self._data = underlying_dict
465
466
def __getitem__(self, key):
@@ -1709,7 +1709,7 @@ class TestMemoryFS(MemoryFileSystem):
1709
protocol = "testmem"
1710
test = [None]
1711
1712
- def __init__(self, **kwargs):
+ def __init__(self, **kwargs) -> None:
1713
self.test[0] = kwargs.pop("test", None)
1714
super().__init__(**kwargs)
1715
pandas/errors/__init__.py
@@ -186,7 +186,7 @@ class AbstractMethodError(NotImplementedError):
186
while keeping compatibility with Python 2 and Python 3.
187
188
189
- def __init__(self, class_instance, methodtype="method"):
+ def __init__(self, class_instance, methodtype="method") -> None:
190
types = {"method", "classmethod", "staticmethod", "property"}
191
if methodtype not in types:
192
pandas/tseries/frequencies.py
@@ -209,7 +209,7 @@ class _FrequencyInferer:
Not sure if I can avoid the state machine here
211
212
- def __init__(self, index, warn: bool = True):
+ def __init__(self, index, warn: bool = True) -> None:
213
self.index = index
214
self.i8values = index.asi8
215
pandas/tseries/holiday.py
@@ -160,7 +160,7 @@ def __init__(
160
start_date=None,
161
end_date=None,
162
days_of_week=None,
163
164
165
Parameters
166
----------
@@ -393,7 +393,7 @@ class AbstractHolidayCalendar(metaclass=HolidayCalendarMetaClass):
393
end_date = Timestamp(datetime(2200, 12, 31))
394
_cache = None
395
396
- def __init__(self, name=None, rules=None):
+ def __init__(self, name=None, rules=None) -> None:
397
398
Initializes holiday object with a given set a rules. Normally
399
classes just have the rules defined within them.
scripts/validate_docstrings.py
@@ -136,7 +136,7 @@ def get_api_items(api_doc_fd):
136
137
138
class PandasDocstring(Validator):
139
- def __init__(self, func_name: str, doc_obj=None):
+ def __init__(self, func_name: str, doc_obj=None) -> None:
140
self.func_name = func_name
141
if doc_obj is None:
142
doc_obj = get_doc_object(Validator._load_obj(func_name))
0 commit comments