Skip to content

run_mypy script failing (due to new Pandas behavior?) #6940

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
ricardoV94 opened this issue Oct 4, 2023 · 7 comments · Fixed by #6945
Closed

run_mypy script failing (due to new Pandas behavior?) #6940

ricardoV94 opened this issue Oct 4, 2023 · 7 comments · Fixed by #6945

Comments

@ricardoV94
Copy link
Member

Description

https://github.com/pymc-devs/pymc/actions/runs/6406798422/job/17392150214?pr=6933

@ricardoV94
Copy link
Member Author

CC @michaelosthege

@michaelosthege
Copy link
Member

Sounds like failing = set(df.reset_index().file.str.replace(os.sep, "/", regex=False)) has non-str types in the file column.

Can you try replacing the line by this?

failing = set(df.reset_index()["file"].astype(str).str.replace(os.sep, "/", regex=False))

@ricardoV94
Copy link
Member Author

ricardoV94 commented Oct 6, 2023

Didn't make the trick :)

This is good news! Go to scripts/run_mypy.py and remove them from the `FAILING` list.
WOW! All files are passing the mypy type checks!

I doubt so, but the dataframe is indeed empty so probably mypy run is just failing and we don't raise when the subprocess fails

@ricardoV94
Copy link
Member Author

Also why are we pinned to mypy 0.99?

@ricardoV94
Copy link
Member Author

ricardoV94 commented Oct 6, 2023

Getting a mysterious AssertionError: Error checking function redefinition

Traceback: https://github.com/pymc-devs/pymc/actions/runs/6431546082/job/17464665779?pr=6942#step:7:15

@michaelosthege
Copy link
Member

Also why are we pinned to mypy 0.99?

Simply put we're pinned because our dependabot only cares about GitHub actions

Locally I can't reproduce this problem

@ricardoV94
Copy link
Member Author

Locally I can't reproduce this problem

Me neither. Probably a specific dependency version

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

Successfully merging a pull request may close this issue.

2 participants