Skip to content

Conversation

@ThibaultDECO
Copy link

Fixing some types

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Improving the type-hints would certainly be welcome, but it seems the changes here are either incorrect or equivalent to the type-hints that are already there.

*,
header: int | Sequence[int] | None = ...,
names: SequenceNotStr[Hashable] | range | None = ...,
index_col: int | str | Sequence[int] | None = ...,
Copy link
Member

Choose a reason for hiding this comment

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

Removing str here is incorrect, index_col can be a string.

@ThibaultDECO
Copy link
Author

@rhshadrach Thanks for having looked at it!
io is not the same as io: Any, it is equivalent to io: Unknown
Same for list and Callable
I'll have a look at str for index_col, but it seemed to me that index_col could not function with str and other functions (such as parse) only accept int.

@rhshadrach
Copy link
Member

io is not the same as io: Any, it is equivalent to io: Unknown

Ah, with pyright but not mypy, sure. But in either case I'm not really seeing a benefit to adding Any here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants