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 instance attribute annotations to all classes #705

Conversation

duckontheweb
Copy link
Contributor

@duckontheweb duckontheweb commented Jan 7, 2022

Related Issue(s):

Description:

Adds type annotations for instance attributes for all classes. Where the class docstring had an Attributes section, I removed those and added a docstring on each type annotation.

PR Checklist:

  • Code is formatted (run pre-commit run --all-files)
  • Tests pass (run scripts/test)
  • Documentation has been updated to reflect changes, if applicable
  • This PR maintains or improves overall codebase code coverage.
  • Changes are added to the CHANGELOG. See the docs for information about adding to the changelog.

@duckontheweb
Copy link
Contributor Author

@l0b0 Since you've done so much work on type hints in this library it would be great to get your input as well.

@codecov-commenter
Copy link

codecov-commenter commented Jan 7, 2022

Codecov Report

Merging #705 (83a8410) into main (f68cf81) will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #705      +/-   ##
==========================================
+ Coverage   94.20%   94.25%   +0.05%     
==========================================
  Files          77       77              
  Lines       11120    11217      +97     
  Branches     1337     1337              
==========================================
+ Hits        10476    10573      +97     
  Misses        466      466              
  Partials      178      178              
Impacted Files Coverage Δ
pystac/cache.py 92.74% <100.00%> (+0.43%) ⬆️
pystac/catalog.py 92.13% <100.00%> (+0.13%) ⬆️
pystac/collection.py 94.21% <100.00%> (+0.30%) ⬆️
pystac/extensions/eo.py 93.15% <100.00%> (+0.03%) ⬆️
pystac/extensions/file.py 92.18% <100.00%> (+0.18%) ⬆️
pystac/extensions/hooks.py 81.03% <100.00%> (+0.33%) ⬆️
pystac/extensions/item_assets.py 84.44% <100.00%> (+0.35%) ⬆️
pystac/extensions/label.py 93.75% <100.00%> (+0.10%) ⬆️
pystac/extensions/pointcloud.py 97.81% <100.00%> (+0.05%) ⬆️
pystac/extensions/raster.py 89.78% <100.00%> (+0.11%) ⬆️
... and 8 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 f68cf81...83a8410. Read the comment docs.

@duckontheweb duckontheweb added this to the 1.3.0 milestone Jan 7, 2022
Copy link
Collaborator

@schwehr schwehr left a comment

Choose a reason for hiding this comment

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

Thanks for working on this!

@duckontheweb duckontheweb requested a review from schwehr January 14, 2022 02:22
@duckontheweb duckontheweb merged commit e02eac1 into stac-utils:main Jan 14, 2022
@duckontheweb duckontheweb deleted the add/321-instance-attribute-annotations branch January 14, 2022 15:57
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.

Create type annotations for attributes
5 participants