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

Docs: Make change-log visible in mypy documentation#17742

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
hauntsaninja merged 10 commits intopython:masterfromquinn-sasha:changelog_issue
Sep 15, 2024

Conversation

@quinn-sasha
Copy link
Contributor

@quinn-sashaquinn-sasha commentedSep 6, 2024
edited
Loading

Resolves#17717

Why

changelog-search

  • Problem: a change log cannot be found in official mypy documentation.
  • Enabling change log will improve the guidance of the official documentation.

Changes

(Explain how this PR changes mypy.)

This change will make change log visible in mypy documentation.

  1. AddingMyST-Parser into requirements.txt.
  2. Createdchangelog.md intmypy/docs/source/ to includemypy/CHANGELOG.md into mypy documentation.
  3. Added change log entry into table of contents.

Checklist:


  • make linkcheck
    The test had some warnings, but they were not caused from this pull request change.
  • runtests.py:
    Got errorFileNotFoundError: [Errno 2] No such file or directory: 'pre-commit', but I guess it has nothing to do with documentation changes
  • tox run -e py

  • Make sure CI passes.
  • Do not force push to PR once reviewed

webknjaz and sparrowt reacted with heart emoji
@quinn-sasha
Copy link
ContributorAuthor

About documentation build error

The error saidERROR: No matching distribution found for myst-parser>=4.0.0.
Maybe, it needs lower version ofmyst-parser.

hauntsaninja added a commit to hauntsaninja/mypy that referenced this pull requestSep 7, 2024
hauntsaninja added a commit that referenced this pull requestSep 7, 2024
@hauntsaninja
Copy link
Collaborator

Thanks, let's see if#17747 fixes the build

@quinn-sasha
Copy link
ContributorAuthor

Next warning was caused byNon-consecutive header level increase; H2 to H4 inmypy/CHANGELOG.md.

However, it is not strange that there is a increasing header level in change log.
So I addedsuppress_warnings = ["myst.header"] line intoconf.py to suppress the warning.
reference

extensions= ["sphinx.ext.intersphinx","docs.source.html_builder","myst_parser"]

# To prevent myst-parser from warning header level increases
suppress_warnings= ["myst.header"]

Choose a reason for hiding this comment

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

Don't do this. Instead, decrease the indentation inCHANGELOG.md. Look athttps://github.com/python/mypy/blob/72c413d/CHANGELOG.md?plain=1#L14 — it uses#### (H4) right after## (H2). So MyST-Parser is correct to flag this. It's a real problem that needs to be fixed rather than ignored.

Choose a reason for hiding this comment

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

Looks like it should be auto-replaced across that entire file. Runningsed -i 's/^####/###/g' CHANGELOG.md should do what's needed to correct the mistake.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thank you very much for your guide!

webknjaz reacted with thumbs up emoji
@webknjaz
Copy link

Relevant issue:#17717

@quinn-sasha

Tip

Pro tip: replace this withResolves #17717 and GitHub will link it properly, and auto-close on merge.

quinn-sasha reacted with thumbs up emoji

… header level increase; H2 to H4' warnings in CHANGELOG.md
@hauntsaninjahauntsaninja merged commit8b1e606 intopython:masterSep 15, 2024
@hauntsaninja
Copy link
Collaborator

Thank you!

@quinn-sashaquinn-sasha deleted the changelog_issue branchSeptember 16, 2024 01:08
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

1 more reviewer

@webknjazwebknjazwebknjaz left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[good-first-issue] Expose the change log via Sphinx docs

3 participants

@quinn-sasha@hauntsaninja@webknjaz

[8]ページ先頭

©2009-2025 Movatter.jp