-
Notifications
You must be signed in to change notification settings - Fork 229
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
Use string literal types in to_rgba() for matplotlib <3.8 #751
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #751 +/- ##
==========================================
- Coverage 86.97% 86.97% -0.01%
==========================================
Files 179 179
Lines 11559 11558 -1
Branches 2116 2116
==========================================
- Hits 10053 10052 -1
Misses 1017 1017
Partials 489 489 ☔ View full report in Codecov by Sentry. |
Also, FWIW, in some GitHub Actions workflows I maintain I test against both the earliest and latest versions of key dependencies, for instance here. (Some projects use I am not familiar with your CI strategy here so I did not hazard to make similar changes, but it can help catch such issues early. Please let me know if you'd like me to try for this PR. |
Nice. Thanks for this
I never thought of using string literals in |
I considered testing against the against the lowest supported package versions but I felt that I wouldn't keep up with updating the dependencies in two places. The place for these tests is in the weekly tests, which aims to keep track of dependencies. However Astral's new package installer |
Install a different version in "pytest" CI workflow
Install a different version in "pytest" CI workflow
This reverts commit 8d81366.
pyam pins matplotlib <3.7.1, which causes message_data to run into has2k1/plotnine#751. override.
pyam pins matplotlib <3.7.1, which causes message_data to run into has2k1/plotnine#751. override.
Hi—thanks for the fresh 0.13.0 release and continued improvement of the package 🙏🏾
Today we saw errors like this in GitHub Actions workflows that rely on plotnine, at this statement:
plotnine/plotnine/_utils/__init__.py
Line 576 in f5c01de
These boil down to the fact that (a)
matplotlib.typing
does not exist in matplotlib <3.8 but (b) plotnine is compatible with matplotlib >=3.6:plotnine/pyproject.toml
Line 26 in f5c01de
In short:
This one commit fixes by removing the import and using string literal types within the function. The type checker should then use ColorType as imported within the
if TYPE_CHECKING:
block at the top of the file.