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

Add Docstring to Enum for Option descriptions, issue 1510 #1699

Merged
merged 9 commits into from Oct 18, 2022
Merged

Add Docstring to Enum for Option descriptions, issue 1510 #1699

merged 9 commits into from Oct 18, 2022

Conversation

jdelucca
Copy link
Contributor

@jdelucca jdelucca commented Oct 12, 2022

Summary

Hacktoberfest pull request.
For closing Issue #1510. Beyond adding small details to the docs, also adding docstrings to the Enum classes so that if an Option tries to reference them, it'll have a description by default, but also changing the Option behavior so that if the dev includes a description text when calling Option, the docstring from Enums won't override that description text.

Fixes this behavior ("No description provided"):
image

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.

@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #1699 (32fc9a4) into master (75bc6fe) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1699      +/-   ##
==========================================
- Coverage   33.23%   33.23%   -0.01%     
==========================================
  Files          95       95              
  Lines       18423    18424       +1     
==========================================
  Hits         6123     6123              
- Misses      12300    12301       +1     
Flag Coverage Δ
pytest 33.23% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
discord/commands/options.py 16.66% <0.00%> (-0.12%) ⬇️
discord/enums.py 78.42% <ø> (ø)

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 75bc6fe...32fc9a4. Read the comment docs.

@jdelucca jdelucca changed the title 1510 Add Docstring to Enum for Option descriptions, issue 1510 Oct 15, 2022
docs/api.rst Outdated Show resolved Hide resolved
@BobDotCom BobDotCom enabled auto-merge (squash) October 17, 2022 17:49
@BobDotCom BobDotCom added priority: low Low Priority status: awaiting review Awaiting review from a maintainer labels Oct 17, 2022
@Lulalaby Lulalaby enabled auto-merge (squash) October 17, 2022 18:00
@Lulalaby Lulalaby enabled auto-merge (squash) October 18, 2022 16:07
@Lulalaby Lulalaby merged commit 9b5d49d into Pycord-Development:master Oct 18, 2022
@jdelucca
Copy link
Contributor Author

jdelucca commented Oct 18, 2022

Very cool. I'd appreciate it if you could add the hacktoberfest-accepted label, though I'm not totally sure if this project is doing hacktoberfest.

@BobDotCom BobDotCom added the hacktoberfest-accepted Hacktoberfest 2022 label Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Hacktoberfest 2022 priority: low Low Priority status: awaiting review Awaiting review from a maintainer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants