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

Use general OSError and more Python3 defaults from pyupgrade#19241

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

Closed
eumiro wants to merge3 commits intomatplotlib:mainfromeumiro:os-error
Closed

Conversation

@eumiro
Copy link

@eumiroeumiro commentedJan 5, 2021
edited
Loading

PR Summary

Runningpyupgrade --py3-plus and ignoring all string updates (percent/format/f) to use defaults introduced in Python3.

PR Checklist

  • [N/A] Has pytest style unit tests (andpytest passes).
  • IsFlake 8 compliant (runflake8 on changed files to check).
  • [N/A] New features are documented, with examples if plot related.
  • [N/A] Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • [N/A] New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • [N/A] API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link
Member

@timhoffmtimhoffm left a comment
edited
Loading

Choose a reason for hiding this comment

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

Thanks for the PR, and welcome to Matplotlib!

Generally 👍 apart from the changes toversioneer.py.

versioneer.py Outdated
"""

from __future__importprint_function
Copy link
Member

@timhoffmtimhoffmJan 5, 2021
edited
Loading

Choose a reason for hiding this comment

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

Please don't change anything inversioneer.py. It's a vendored file from (https://github.com/python-versioneer/python-versioneer) with slight modifications. Additional local changes make it harder to pull in changes from the upstream version.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you@timhoffm . I have removedversioneer.py from my PR entirely.

According to PEP 3151, OSError can be used for all system-related exceptions and thus replace IOError, EnvironmentError, socket.error, etc.
Copy link
Member

@QuLogicQuLogic left a comment

Choose a reason for hiding this comment

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

All theraise OSError(' for missing files should probably beFileNotFoundError instead.

elseNone))
break
exceptEnvironmentError:
exceptOSError:
Copy link
Member

Choose a reason for hiding this comment

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

I would not bother changing this file either as it will be deleted by#18971 .

@jklymakjklymak marked this pull request as draftMay 10, 2021 19:42
@eumiroeumiro closed this by deleting the head repositoryNov 5, 2022
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@QuLogicQuLogicQuLogic left review comments

@timhoffmtimhoffmtimhoffm left review comments

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@eumiro@QuLogic@timhoffm@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp