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

Use canonical name for set_horizonalalignment over alias set_ha #7786

Merged
merged 1 commit into from
Apr 26, 2023

Conversation

ksunden
Copy link
Contributor

@ksunden ksunden commented Apr 25, 2023

Matplotlib has recently introduced type hints on our main version (due to be released with mpl v3.8 in a couple months) xref matplotlib/matplotlib#24976

As part of this, the dynamically generated aliases of certain functions are not included in static type hints (since they are dynamic).
So, a type hinted codebase should prefer the canonical names so that they can be type checked.

I encourage maintainers over here to run type checking with our new type hints, as this is not the only thing flagged.
Much of the remaining flags have to do with interactions with 3D axes, which are currently not type hinted in mpl (along with the rest of mpl_toolkits, for that matter).

Feel free to ping me if you have any questions regarding mpl's type hints and interactions here.
Partly opening this as a "reach out early, so you don't get surprised by a release breaking CI" (and can hopefully sort it out before that a bit more incrementally).

@welcome
Copy link

welcome bot commented Apr 25, 2023

Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient.
If you have questions, some answers may be found in our contributing guidelines.

@ksunden ksunden changed the title Use cannonical name for set_horizonalalignment over alias set_ha Use canonical name for set_horizonalalignment over alias set_ha Apr 25, 2023
Copy link
Collaborator

@headtr1ck headtr1ck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch and explanation, thanks!

@headtr1ck headtr1ck added plan to merge Final call for comments topic-typing labels Apr 26, 2023
@dcherian dcherian merged commit 0f4e99d into pydata:main Apr 26, 2023
@dcherian
Copy link
Contributor

Thanks @ksunden

@welcome
Copy link

welcome bot commented Apr 26, 2023

Congratulations on completing your first pull request! Welcome to Xarray! We are proud of you, and hope to see you again! celebration gif

dcherian added a commit to dcherian/xarray that referenced this pull request May 6, 2023
* main:
  Introduce Grouper objects internally (pydata#7561)
  [skip-ci] Add cftime groupby, resample benchmarks (pydata#7795)
  Fix groupby binary ops when grouped array is subset relative to other (pydata#7798)
  adjust the deprecation policy for python (pydata#7793)
  [pre-commit.ci] pre-commit autoupdate (pydata#7803)
  Allow the label run-upstream to run upstream CI (pydata#7787)
  Update asv links in contributing guide (pydata#7801)
  Implement DataArray.to_dask_dataframe() (pydata#7635)
  `ds.to_dict` with data as arrays, not lists (pydata#7739)
  Add lshift and rshift operators (pydata#7741)
  Use canonical name for set_horizonalalignment over alias set_ha (pydata#7786)
  Remove pandas<2 pin (pydata#7785)
  [pre-commit.ci] pre-commit autoupdate (pydata#7783)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants