-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TYP: enable disallow_untyped_decorators #43828
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
043b268
1065856
456c4ba
da798fa
590dd41
7325a6b
89be593
c13c0cd
cd61bdd
baf088f
966418b
4e08378
bf8026b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# pyright: reportIncompleteStub = false | ||
from typing import Any | ||
|
||
# note: this is a lie to make type checkers happy (they special | ||
# case property). cache_readonly uses attribute names similar to | ||
# property (fget) but it does not provide fset and fdel. | ||
cache_readonly = property | ||
|
||
def __getattr__(name: str) -> Any: ... # incomplete |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -669,7 +669,9 @@ def fillna(self, value=None, method=None, limit=None) -> PeriodArray: | |
# view as dt64 so we get treated as timelike in core.missing | ||
dta = self.view("M8[ns]") | ||
result = dta.fillna(value=value, method=method, limit=limit) | ||
return result.view(self.dtype) | ||
# error: Incompatible return value type (got "Union[ExtensionArray, | ||
# ndarray[Any, Any]]", expected "PeriodArray") | ||
return result.view(self.dtype) # type: ignore[return-value] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. in pandas/core/arrays/datetimelike.py we overloaded view for DatetimeLikeArrayMixin. maybe could do the same for PeriodArray. (suggestion, not necessarily for this PR) |
||
return super().fillna(value=value, method=method, limit=limit) | ||
|
||
# ------------------------------------------------------------------ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -675,7 +675,11 @@ def apply_series_value_counts(): | |
# multi-index components | ||
codes = self.grouper.reconstructed_codes | ||
codes = [rep(level_codes) for level_codes in codes] + [llab(lab, inc)] | ||
levels = [ping.group_index for ping in self.grouper.groupings] + [lev] | ||
# error: List item 0 has incompatible type "Union[ndarray[Any, Any], Index]"; | ||
# expected "Index" | ||
levels = [ping.group_index for ping in self.grouper.groupings] + [ | ||
lev # type: ignore[list-item] | ||
] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm, we have a Union return type from Over time we should avoid Union return types, either through refactoring code or using overloads. from https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#conventions
(comment, no action needed for this PR) |
||
names = self.grouper.names + [self.obj.name] | ||
|
||
if dropna: | ||
|
Uh oh!
There was an error while loading. Please reload this page.