Skip to content
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

Get mypy working again #1457

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from
Open

Conversation

gaffney2010
Copy link
Member

Resolves #1406

@gaffney2010
Copy link
Member Author

Need to test adding new exception handling. Will reopen.

@gaffney2010 gaffney2010 reopened this Nov 16, 2024
@drvinceknight
Copy link
Member

Looks like this is failing on coverage:

axelrod/load_data_.py                                               37      1    97%   30

@gaffney2010
Copy link
Member Author

Looks like this is failing on coverage:

axelrod/load_data_.py                                               37      1    97%   30

But why? That line is tested. Any idea?

@drvinceknight
Copy link
Member

But why? That line is tested. Any idea?

Could it be the assertRaisesRegex doing something funky? Would it be worth trying assertRaises? That's a very underwhelming idea that I'm not convinced by myself.

@gaffney2010
Copy link
Member Author

Could it be the assertRaisesRegex doing something funky? Would it be worth trying assertRaises? That's a very underwhelming idea that I'm not convinced by myself.

I actually had assertRaises that I changed thinking perhaps it wanted to test the text of the error message.

@gaffney2010
Copy link
Member Author

Ah, so get_data raises FileNotFoundError in my test case, but returns None for some other kinda failure. I'll figure it out.

@gaffney2010
Copy link
Member Author

I chose to inject the dependency on get_data for the sake of testing because:

  1. It's a little hard to figure out this failure path
  2. It seems to be missing tests even in the core library.
  3. It may require the library to be formatted different (whatever PEP 302 is)

@gaffney2010
Copy link
Member Author

Oh, mypy is giving a lot more errors. I'm not sure why I thought it was resolved. Will reopen after addressing the others.

@gaffney2010 gaffney2010 closed this Dec 9, 2024
@gaffney2010 gaffney2010 reopened this Dec 9, 2024
@gaffney2010
Copy link
Member Author

Oh, mypy is giving a lot more errors. I'm not sure why I thought it was resolved. Will reopen after addressing the others.

Ah, this was passing locally. I'm gonna continue to test via CI / build

@gaffney2010
Copy link
Member Author

Everything seems to be passing now.

@drvinceknight
Copy link
Member

I can't seem to get any information from read the docs about the failed build there.

CleanShot 2024-12-10 at 12 48 21@2x

Do the docs build locally for you? If they do it could be a read the docs thing instead of a sphinx thing...

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.

CI failing due to typing issues
2 participants