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

Typing client file #384

Merged
merged 10 commits into from
Jul 30, 2023
Merged

Typing client file #384

merged 10 commits into from
Jul 30, 2023

Conversation

enadeau
Copy link
Contributor

@enadeau enadeau commented Jul 2, 2023

Description

Add type annotations to the client file. See #373

Still need to fix a couple small typing error and would be best to address #383
first as it relates to the test that are now failling.

Type of change

Select the statement best describes this pull request.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • This is a documentation update
  • Other (please describe)

Does your PR include tests

If you are fixing a bug or adding a feature, we appreciate (but do not require)
tests to support whatever fix of feature you're implementing.

  • Yes
  • No, i'd like some help with tests
  • This change doesn't require tests

Did you include your contribution to the change log?

  • Yes, changelog.md is up-to-date.

If you are having a hard time getting the tests to run correctly feel free to
ping one of the maintainers here!

@codecov
Copy link

codecov bot commented Jul 27, 2023

Codecov Report

Merging #384 (c4579a3) into master (29a176f) will increase coverage by 0.18%.
The diff coverage is 91.57%.

@@            Coverage Diff             @@
##           master     #384      +/-   ##
==========================================
+ Coverage   87.46%   87.64%   +0.18%     
==========================================
  Files          10       10              
  Lines        1651     1668      +17     
  Branches      149      148       -1     
==========================================
+ Hits         1444     1462      +18     
  Misses        167      167              
+ Partials       40       39       -1     
Files Changed Coverage Δ
stravalib/client.py 79.44% <91.39%> (+0.97%) ⬆️
stravalib/model.py 91.00% <100.00%> (+0.04%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@enadeau enadeau marked this pull request as ready for review July 27, 2023 21:48
@enadeau
Copy link
Contributor Author

enadeau commented Jul 27, 2023

Back from summer holiday! Just finished typing the client file. Sorry for the big diff but at least after that we will have most of the outward facing method typed I think.

Copy link
Collaborator

@jsamoocha jsamoocha left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this PR! Before merging, I'd like to be sure we're not changing any behavior regarding the before and after parameters I mentioned in a specific comment.

@enadeau
Copy link
Contributor Author

enadeau commented Jul 29, 2023

I think it is now ready to go 💯

Copy link
Collaborator

@jsamoocha jsamoocha left a comment

Choose a reason for hiding this comment

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

Awesome, thanks for the explanations and fixes!

@jsamoocha jsamoocha merged commit 192e801 into stravalib:master Jul 30, 2023
@enadeau enadeau deleted the client-typing branch July 30, 2023 08:30
lwasser pushed a commit to lwasser/stravalib that referenced this pull request Aug 26, 2023
* Type signature of all client method

* finish typing all signature in client file

* minor fixes

* finish typing client

* fix stream default param

* update changelog

* use after_epoch and before_epoch in param dict

* minor change in BatchedIterator type annotation

---------

Co-authored-by: Jonatan Samoocha <[email protected]>
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.

2 participants