Skip to content

TYP: use from __future__ import annotations more - batch 1 #41892

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

Merged
merged 2 commits into from
Jun 9, 2021
Merged
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
Merge remote-tracking branch 'upstream/master' into future-1
  • Loading branch information
simonjayhawkins committed Jun 9, 2021
commit 1938311b78fb49ae94e8beca652268521081efdd
10 changes: 5 additions & 5 deletions pandas/io/parsers/readers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ def TextParser(*args, **kwds):


def _clean_na_values(na_values, keep_default_na=True):
na_fvalues: Union[set, dict]
na_fvalues: set | dict
if na_values is None:
if keep_default_na:
na_values = STR_NA_VALUES
Expand Down Expand Up @@ -1192,7 +1192,7 @@ def _floatify_na_values(na_values):

def _stringify_na_values(na_values):
""" return a stringified and numeric for these values """
result: list[Union[int, str, float]] = []
result: list[int | str | float] = []
for x in na_values:
result.append(str(x))
result.append(x)
Expand Down Expand Up @@ -1220,12 +1220,12 @@ def _refine_defaults_read(
delimiter: str | object,
delim_whitespace: bool,
engine: str,
sep: Union[str, object],
sep: str | object,
error_bad_lines: bool | None,
warn_bad_lines: bool | None,
on_bad_lines: str | None,
names: Union[ArrayLike | None, object],
prefix: Union[str | None, object],
names: ArrayLike | None | object,
prefix: str | None | object,
defaults: dict[str, Any],
):
"""Validate/refine default values of input parameters of read_csv, read_table.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.