soaring0616 opened a new pull request, #59351: URL: https://github.com/apache/spark/pull/59351
### What changes were proposed in this pull request? Replace `type: ignore[var-annotated]` on `PySparkPlotAccessor._backends` with an explicit `dict[str, ModuleType]` annotation. ### Why are the changes needed? mypy cannot infer the type of an empty dict literal, so the suppression hid the real type. The value type matches the return type of `_get_plot_backend`. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - `dev/lint-python --ruff` passes. - `dev/lint-python --mypy`: no errors in `python/pyspark/sql/plot/core.py`. There are 3 remaining `"FieldDescriptor" has no attribute "label"` errors in `python/pyspark/sql/connect/client/core.py` also occur on an unmodified master in my environment, so they are unrelated to this change. - `python/run-tests --testnames pyspark.sql.tests.plot.test_frame_plot` passes. ### Was this patch authored or co-authored using generative AI tooling? Generated by Claude-code (Sonnet 5.5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
