Closed khaeru closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
f5c01de
) 86.97% compared to head (47d2dc2
) 86.97%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
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 tox
for the same purpose.)
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
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.
I never thought of using string literals in cast
to avoid runtime imports!
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 tox for the same purpose.)
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 uv
allows installing minimum versions for the dependencies and we can now use that.
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: https://github.com/has2k1/plotnine/blob/f5c01deb8e76e2fb9d0404a7fac527925276ac38/plotnine/_utils/__init__.py#L576
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: https://github.com/has2k1/plotnine/blob/f5c01deb8e76e2fb9d0404a7fac527925276ac38/pyproject.toml#L26In 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.