Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

DOC/API: set __qualname__ when using class factory#17525

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
anntzer merged 1 commit intomatplotlib:masterfromtacaswell:doc_fix_build
May 28, 2020

Conversation

tacaswell
Copy link
Member

@tacaswelltacaswell commentedMay 28, 2020
edited
Loading

PR Summary

In patheffects.py we have a helper function to reduce the
boiler plate in defining the path effect sub-classes. We are setting
the__name__ and__doc__ to (templated) values, but were not
setting the__qualname__ which was leaving the string '' in
the__qualname__. This string is then used by sphinx-gallery to
generate an index of examples that use a given class with files named
likef'{obj.__qualname__}.examples' which works correctly (but not
in the way we want) on liunx but fails on windows as<> are
forbidden in file names.-

This sets the__qualname__ to match the__name__ and fully
simulate defining these classes in the module.

The changes that broke this came in via#15515

In patheffects.py we have a helper function to reduce theboiler plate in defining the path effect sub-classes.  We are settingthe `__name__` and `__doc__` to (templated) values, but were notsetting the `__qualname__` which was leaving the string '<locals>' inthe `__qualname__`.  This string is then used by sphinx-gallery togenerate an index of examples that use a given class with files namedlike `f'{obj.__qualname__}.examples'` which works correctly (but notin the way we want) on liunx but fails on windows as `<>` areforbidden in file names.-This sets the `__qualname__` to match the `__name__` and fullysimulate defining these classes in the module.
@tacaswelltacaswell added this to thev3.2.2 milestoneMay 28, 2020
@QuLogic
Copy link
Member

#15515 is not in 3.2...

@QuLogicQuLogic modified the milestones:v3.2.2,v3.3.0May 28, 2020
@tacaswell
Copy link
MemberAuthor

Fair! I must have miss-read the follows / precedes information in the git logs.

Copy link
Member

@story645story645 left a comment

Choose a reason for hiding this comment

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

on windows gallery now builds

@anntzeranntzer merged commiteaf7e8f intomatplotlib:masterMay 28, 2020
@tacaswelltacaswell deleted the doc_fix_build branchMay 28, 2020 16:34
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@story645story645story645 approved these changes

@anntzeranntzeranntzer approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.3.0
Development

Successfully merging this pull request may close these issues.

4 participants
@tacaswell@QuLogic@story645@anntzer

[8]ページ先頭

©2009-2025 Movatter.jp