8000 TYPING: check-untyped-defs for io.formats by simonjayhawkins · Pull Request #28129 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TYPING: check-untyped-defs for io.formats #28129

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

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove _Kwargs alias
  • Loading branch information
simonjayhawkins committed Aug 27, 2019
commit 5120925aea75863c55e062589210ed00edaca01d
3 changes: 1 addition & 2 deletions pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def _mpl(func):
_ApplyArgs = Tuple[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this is a function of the code itself and not necessarily the annotation, but I find this pretty tough to digest. Is it documented already somewhere how this works? If not can you comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather not in this pass. I don't know this module well enough yet.

This pass is just check-untyped-defs as "Working through this flag in advance may lead to less surprises as annotations are added" xref #27568

Also the sooner we resolve these issues, the sooner we can enable this setting in CI to ensure that code modified in functions without annotations is checked for PRs.

Callable[[FrameOrSeries], FrameOrSeries], Axis, Optional[_IndexSlice]
]
_Kwargs = Dict[str, Any]


class Styler:
Expand Down Expand Up @@ -131,7 +130,7 @@ def __init__(
cell_ids=True,
):
self.ctx = defaultdict(list) # type: DefaultDict[Tuple[int, int], List[str]]
self._todo = [] # type: List[Tuple[Callable, _ApplyArgs, _Kwargs]]
self._todo = [] # type: List[Tuple[Callable, _ApplyArgs, Dict[str, Any]]]

if not isinstance(data, (pd.Series, pd.DataFrame)):
raise TypeError("``data`` must be a Series or DataFrame")
Expand Down
0