Closed TheCleric closed 3 years ago
Looks like I'm having a few issues in the github action that I am not having locally:
Please advise.
Looks like I'm having a few issues in the github action that I am not having locally:
- Pandas can accept a re.Pattern in python 3.7+, which I have a version_info check around, but the action is still flagging it.
- MyPy seems to think the getitem overload I added to _iLocIndexerFrame is superfluous, but my tests fail without it (and I only added it because MyPy was complaining about my code's usage of passing a Tuple[slice, List[str]] to a .loc of a DataFrame, which is valid
Please advise.
Can I get some feedback on fixing these issues so this PR can become mergable?
Sorry for the delay! So, let's try to figure out the issues.
Pandas can accept a re.Pattern in python 3.7+, which I have a version_info check around, but the action is still flagging it.
Is it 3.7+ or 3.6+? In the code you wrote if sys.version_info >= (3, 6):
. If it was 3.6+, then we can drop the check, because we only support Python >= 3.6 anyway.
Sorry for the delay! So, let's try to figure out the issues.
Pandas can accept a re.Pattern in python 3.7+, which I have a version_info check around, but the action is still flagging it.
Is it 3.7+ or 3.6+? In the code you wrote
if sys.version_info >= (3, 6):
. If it was 3.6+, then we can drop the check, because we only support Python >= 3.6 anyway.
It is 3.7, let me fix that version check.
Looks like I was able to fix the first part with using Pattern from typing instead of re.
Now the only thing that remains is the overload issue.
🎉 🥳
Oh, well done!
This is the result of testing data-science-types against another project I contribute to: https://github.com/jldbc/pybaseball
Everything was done using the latest Pandas docs for reference to data types:
https://pandas.pydata.org/pandas-docs/stable/reference/
I also did my best to add tests to support the changes as well