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

docs: Autodoc typehints #1710

Merged
merged 17 commits into from Nov 8, 2022
Merged

docs: Autodoc typehints #1710

merged 17 commits into from Nov 8, 2022

Conversation

BobDotCom
Copy link
Member

Summary

Automatically use typehints to generate docs.

Information

  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • This PR is not a code change (e.g. documentation, README, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.

@BobDotCom BobDotCom added documentation Improvements or additions to documentation priority: medium Medium Priority status: in progress Work in Progess labels Oct 18, 2022
@BobDotCom BobDotCom self-assigned this Oct 18, 2022
@BobDotCom
Copy link
Member Author

Note: ATM, we cannot set return descriptions without setting a return type

@BobDotCom
Copy link
Member Author

Most/all return type annotations should be removed in the future, once it's supported

@BobDotCom BobDotCom marked this pull request as ready for review November 7, 2022 19:56
@BobDotCom BobDotCom requested a review from a team as a code owner November 7, 2022 19:56
@BobDotCom BobDotCom enabled auto-merge (squash) November 7, 2022 19:59
@BobDotCom BobDotCom added this to the v2.3 milestone Nov 7, 2022
Lulalaby
Lulalaby previously approved these changes Nov 7, 2022
@BobDotCom
Copy link
Member Author

Most/all return type annotations should be removed in the future, once it's supported

See sphinx-doc/sphinx#10134

@BobDotCom BobDotCom requested a review from a team November 7, 2022 21:30
@BobDotCom BobDotCom changed the title Autodoc typehints chore: Autodoc typehints Nov 7, 2022
@BobDotCom BobDotCom changed the title chore: Autodoc typehints docs: Autodoc typehints Nov 7, 2022
@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Merging #1710 (5a01448) into master (c795ec7) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1710   +/-   ##
=======================================
  Coverage   33.14%   33.14%           
=======================================
  Files          96       96           
  Lines       18513    18514    +1     
=======================================
+ Hits         6136     6137    +1     
  Misses      12377    12377           
Flag Coverage Δ
macos-latest-3.10 33.13% <100.00%> (+<0.01%) ⬆️
macos-latest-3.11 33.13% <100.00%> (+<0.01%) ⬆️
macos-latest-3.8 33.14% <100.00%> (+<0.01%) ⬆️
macos-latest-3.9 33.14% <100.00%> (+<0.01%) ⬆️
ubuntu-latest-3.10 33.13% <100.00%> (+<0.01%) ⬆️
ubuntu-latest-3.11 33.13% <100.00%> (+<0.01%) ⬆️
ubuntu-latest-3.8 33.14% <100.00%> (+<0.01%) ⬆️
ubuntu-latest-3.9 33.14% <100.00%> (+<0.01%) ⬆️
windows-latest-3.10 33.13% <100.00%> (+<0.01%) ⬆️
windows-latest-3.11 33.13% <100.00%> (+<0.01%) ⬆️
windows-latest-3.8 33.14% <100.00%> (+<0.01%) ⬆️
windows-latest-3.9 33.14% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/abc.py 22.82% <ø> (ø)
discord/appinfo.py 31.42% <ø> (ø)
discord/asset.py 38.73% <ø> (ø)
discord/audit_logs.py 28.52% <ø> (ø)
discord/automod.py 31.75% <ø> (ø)
discord/channel.py 34.84% <ø> (ø)
discord/cog.py 35.29% <ø> (ø)
discord/colour.py 64.42% <ø> (ø)
discord/commands/context.py 47.97% <ø> (ø)
discord/commands/core.py 18.17% <ø> (ø)
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c795ec7...5a01448. Read the comment docs.

@Dorukyum
Copy link
Member

Dorukyum commented Nov 8, 2022

Has this been tested?

@BobDotCom
Copy link
Member Author

Has this been tested?

yes

@BobDotCom BobDotCom requested a review from a team as a code owner November 8, 2022 15:33
Copy link
Member

@Dorukyum Dorukyum left a comment

Choose a reason for hiding this comment

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

Asked if this was tested because you hadn't checked that in the checklist

@BobDotCom BobDotCom merged commit 91ca670 into master Nov 8, 2022
@BobDotCom BobDotCom deleted the autodoc-typehints branch November 8, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation priority: medium Medium Priority status: in progress Work in Progess
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants