Skip to content

Very minor: Better documentation comment on DeferredError. #469

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

Merged
merged 4 commits into from
Nov 11, 2018

Conversation

leopd
Copy link
Contributor

@leopd leopd commented Nov 9, 2018

Issue #, if available: none

Description of changes: Just improving the docstring on a utility class.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have updated the changelog with a description of my changes (if appropriate)
  • I have updated any necessary documentation (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@codecov-io
Copy link

codecov-io commented Nov 9, 2018

Codecov Report

Merging #469 into master will decrease coverage by 0.14%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #469      +/-   ##
==========================================
- Coverage   94.13%   93.98%   -0.15%     
==========================================
  Files          57       57              
  Lines        4259     4259              
==========================================
- Hits         4009     4003       -6     
- Misses        250      256       +6
Impacted Files Coverage Δ
src/sagemaker/utils.py 92.03% <ø> (ø) ⬆️
src/sagemaker/local/image.py 88.08% <0%> (-1.89%) ⬇️

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 892f27f...6f04e49. Read the comment docs.

object is accessed in any way. Useful to allow soft-dependencies on imports,
so that the ImportError can be raised again later if code actually
relies on the missing library.
relies on the missing library. Example usage:
Copy link
Contributor

Choose a reason for hiding this comment

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

you could do an example section instead, e.g.

Examples:
    try:
        import obscurelib
    except ImportError as e:
        logging.warning("Failed to import obscurelib. Obscure features will not work.")
        obscurelib = DeferredError(e)

reference: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html

@leopd
Copy link
Contributor Author

leopd commented Nov 9, 2018

Good suggestion. Thanks for educating me on best documentation practices, Lauren!

@jesterhazy jesterhazy merged commit e127797 into aws:master Nov 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants