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

Type hint check and corrections #25

Merged
merged 24 commits into from
Aug 9, 2020
Merged

Type hint check and corrections #25

merged 24 commits into from
Aug 9, 2020

Conversation

oncleben31
Copy link
Member

Add type hint checks with mypy and typeguard following best practices of hypermodern_python (see #18).
Code update was needed to correct all errors detected by mypy.

@oncleben31 oncleben31 requested a review from Quentame as a code owner August 4, 2020 00:15
Copy link
Member

@Quentame Quentame left a comment

Choose a reason for hiding this comment

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

Function typing in tests can be optional.

Don't know Nox and Poetry much, but seems nice otherwise.

src/meteofrance/helpers.py Show resolved Hide resolved
src/meteofrance/helpers.py Outdated Show resolved Hide resolved
src/meteofrance/helpers.py Show resolved Hide resolved
src/meteofrance/helpers.py Show resolved Hide resolved
src/meteofrance/helpers.py Show resolved Hide resolved
src/meteofrance/session.py Outdated Show resolved Hide resolved
@oncleben31
Copy link
Member Author

Don't merge yet, I need to correct the GitHub workflow about code coverage.

@codecov
Copy link

codecov bot commented Aug 8, 2020

Codecov Report

Merging #25 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #25   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          309       388   +79     
  Branches        19        24    +5     
=========================================
+ Hits           309       388   +79     
Impacted Files Coverage Δ
src/meteofrance/client.py 100.00% <100.00%> (ø)
src/meteofrance/helpers.py 100.00% <100.00%> (ø)
src/meteofrance/model/forecast.py 100.00% <100.00%> (ø)
src/meteofrance/model/picture_of_the_day.py 100.00% <100.00%> (ø)
src/meteofrance/model/place.py 100.00% <100.00%> (ø)
src/meteofrance/model/rain.py 100.00% <100.00%> (ø)
src/meteofrance/model/warning.py 100.00% <100.00%> (ø)
src/meteofrance/session.py 100.00% <100.00%> (ø)

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 09eabbb...37e5770. Read the comment docs.

@oncleben31
Copy link
Member Author

Code coverage check in GA is OK now. We can merge as soon as the code review is done.

@Quentame Quentame merged commit 2bee412 into master Aug 9, 2020
@Quentame Quentame deleted the type-hint branch August 9, 2020 16:15
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