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

Added type hints/annotations to all methods #32

Merged
merged 16 commits into from
Oct 14, 2019

Conversation

y0urself
Copy link
Member

Added type hints/annotations to all methods

Checklist:

@y0urself y0urself requested a review from bjoernricks as a code owner October 11, 2019 12:25
@codecov
Copy link

codecov bot commented Oct 11, 2019

Codecov Report

Merging #32 into master will increase coverage by 0.25%.
The diff coverage is 52.8%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #32      +/-   ##
==========================================
+ Coverage   40.31%   40.57%   +0.25%     
==========================================
  Files          12       12              
  Lines         439      456      +17     
==========================================
+ Hits          177      185       +8     
- Misses        262      271       +9
Impacted Files Coverage Δ
autohooks/version.py 0% <0%> (ø) ⬆️
autohooks/cli/check.py 0% <0%> (ø) ⬆️
autohooks/precommit/run.py 0% <0%> (ø) ⬆️
autohooks/api/git.py 0% <0%> (ø) ⬆️
autohooks/cli/activate.py 0% <0%> (ø) ⬆️
autohooks/template.py 100% <100%> (ø) ⬆️
autohooks/install.py 66.66% <100%> (+1.8%) ⬆️
autohooks/api/path.py 75% <100%> (+5%) ⬆️
autohooks/terminal.py 71.42% <100%> (ø) ⬆️
autohooks/utils.py 82.35% <100%> (ø) ⬆️
... and 2 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 55a8384...35a4ee8. Read the comment docs.

Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

I don't know why you did remove Mode.get_effective_mode. But besides it looks very very good again. Thank you very much!

autohooks/api/git.py Outdated Show resolved Hide resolved
autohooks/api/git.py Outdated Show resolved Hide resolved
autohooks/config.py Outdated Show resolved Hide resolved
autohooks/setting.py Outdated Show resolved Hide resolved
autohooks/template.py Outdated Show resolved Hide resolved
@y0urself
Copy link
Member Author

I am relatively sure, that the function is not necessary in the one case it was used.
The if-statement does the same, as the method. The remaining cases will go into the else, with or without the function. Or have I missed something out?

@bjoernricks
Copy link
Contributor

You are right currently the behavior is the same without the get_effective_mode method. But it has a semantic meaning which I don't want to remove (currently). Additionally it would have been better to remove the method in another PR.

@bjoernricks bjoernricks self-requested a review October 14, 2019 08:50
Copy link
Contributor

@bjoernricks bjoernricks 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!

@bjoernricks bjoernricks merged commit d833275 into greenbone:master Oct 14, 2019
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