Skip to content

Improve type hinting#440

Merged
tleonhardt merged 5 commits intomasterfrom
type_hinting
Jun 11, 2018
Merged

Improve type hinting#440
tleonhardt merged 5 commits intomasterfrom
type_hinting

Conversation

@tleonhardt
Copy link
Member

@tleonhardt tleonhardt commented Jun 9, 2018

Working on improving type hinting

Also:

  • Refactored perror() to remove a rarely used optional argument which was unnecessary

The initial type hinting is substantially complete - not 100%, but close to it. Also, the type hinting isn't perfect - I'm sure over time we will refine it after running more with something like mypy - but it is a good initial approximately correct set of types for function/method arguments and return values.

This closes #355.

Also:
- Refactored perror() to remove a rarely used optional argument which was unecessary
@tleonhardt tleonhardt added this to the 0.9.2 milestone Jun 9, 2018
@tleonhardt tleonhardt self-assigned this Jun 9, 2018
@tleonhardt tleonhardt requested review from anselor and kotfu June 9, 2018 23:29
@codecov
Copy link

codecov bot commented Jun 9, 2018

Codecov Report

Merging #440 into master will increase coverage by 0.02%.
The diff coverage is 97.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
+ Coverage   90.26%   90.28%   +0.02%     
==========================================
  Files           9        9              
  Lines        2721     2738      +17     
==========================================
+ Hits         2456     2472      +16     
- Misses        265      266       +1
Impacted Files Coverage Δ
cmd2/pyscript_bridge.py 96.55% <100%> (ø) ⬆️
cmd2/utils.py 98.52% <100%> (ø) ⬆️
cmd2/argparse_completer.py 86.94% <100%> (ø) ⬆️
cmd2/transcript.py 91.37% <100%> (+0.15%) ⬆️
cmd2/cmd2.py 90.42% <96.11%> (+0.02%) ⬆️

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 1bcf598...44282fa. Read the comment docs.

@tleonhardt tleonhardt merged commit 3ae71e8 into master Jun 11, 2018
@tleonhardt tleonhardt deleted the type_hinting branch June 11, 2018 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add type hinting

2 participants