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

First pass over generics #1079

Merged
merged 14 commits into from Feb 5, 2023
Merged

First pass over generics #1079

merged 14 commits into from Feb 5, 2023

Conversation

Tinche
Copy link
Member

@Tinche Tinche commented Jan 3, 2023

Support generic classes for has and fields.

@Tinche
Copy link
Member Author

Tinche commented Jan 3, 2023

@hynek chants dump 3.6, dump 3.6

@Tinche Tinche requested a review from hynek January 3, 2023 01:53
@hynek
Copy link
Member

hynek commented Jan 11, 2023

@Tinche chants coverage, coverage

@hynek
Copy link
Member

hynek commented Feb 3, 2023

Do you plan on finishing this up or can I close it?

@Tinche
Copy link
Member Author

Tinche commented Feb 3, 2023

This can be merged, it can just be worked on further, but the further work gets a lot more complex. This first step has value on its own.

@hynek
Copy link
Member

hynek commented Feb 3, 2023

This cannot be merged because it's breaking CI.

@Tinche
Copy link
Member Author

Tinche commented Feb 3, 2023

Ah, oops. Will work on it some more.

@Tinche
Copy link
Member Author

Tinche commented Feb 3, 2023

Ok, there's something funky with coverage.

Locally, I'm getting this:

Screenshot 2023-02-03 at 16 36 25

But this is obviously wrong, since if I put an Exception below the if, one test blows up. So the lines are being hit for sure.
Any ideas?

@hynek
Copy link
Member

hynek commented Feb 4, 2023

Does it maybe only get hit in a version that doesn't run under coverage?

@Tinche
Copy link
Member Author

Tinche commented Feb 4, 2023

This was me running coverage locally, on Python 3.11. Going to try working on this some more.

@Tinche
Copy link
Member Author

Tinche commented Feb 4, 2023

Ok, I got it.

Running coverage with this configuration is a little trickier than I thought. I had to run:

❯ rm .coverage*; coverage run -m pytest; and coverage combine;and coverage html;and open htmlcov/index.html

But then I get accurage coverage reports (modulo other Python versions, which are not important here).

Anyway, CI is green now.

@hynek hynek merged commit 4fcd15b into main Feb 5, 2023
@hynek hynek deleted the tin/generics branch February 5, 2023 12:56
hynek added a commit that referenced this pull request Feb 6, 2023
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.

None yet

2 participants