Skip to content

Add type annotations#20

Merged
gaborbernat merged 6 commits into
tox-dev:mainfrom
domdfcoding:types
Jul 17, 2021
Merged

Add type annotations#20
gaborbernat merged 6 commits into
tox-dev:mainfrom
domdfcoding:types

Conversation

@domdfcoding
Copy link
Copy Markdown
Contributor

Closes #8

Copy link
Copy Markdown
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

We should also type annotate the tests.

Comment thread setup.cfg Outdated
Comment on lines +86 to +92
disallow_untyped_defs = True
disallow_incomplete_defs = True
check_untyped_defs = True
disallow_untyped_decorators = True
no_implicit_optional = True
disallow_subclassing_any = True
disallow_any_explicit = True
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather remove all this and mark the check strict.

Comment thread .github/workflows/check.yml Outdated
tox_env:
- dev
- pkg_check
- mypy
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's call it type instead of mypy; it's a type check, mypy is an implementation detail

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 17, 2021

Codecov Report

Merging #20 (c24d88f) into main (e5c2808) will increase coverage by 7.94%.
The diff coverage is 89.79%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #20      +/-   ##
==========================================
+ Coverage   74.17%   82.12%   +7.94%     
==========================================
  Files           3        6       +3     
  Lines         333      330       -3     
  Branches       71       72       +1     
==========================================
+ Hits          247      271      +24     
+ Misses         68       42      -26     
+ Partials       18       17       -1     
Flag Coverage Δ
tests 81.51% <89.79%> (+8.24%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/platformdirs/__main__.py 100.00% <ø> (+100.00%) ⬆️
src/platformdirs/__init__.py 77.65% <89.79%> (+2.74%) ⬆️
tests/test_api.py 100.00% <0.00%> (ø)
tests/conftest.py 100.00% <0.00%> (ø)
tests/test_main.py 100.00% <0.00%> (ø)
tests/test_comp_with_appdirs.py 100.00% <0.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 e5c2808...c24d88f. Read the comment docs.

The registry lookup may return a non-string value, but it should always be a string for this particular key.
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat left a comment

Choose a reason for hiding this comment

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

@gaborbernat gaborbernat merged commit 28aa5a7 into tox-dev:main Jul 17, 2021
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.

Add type hints

3 participants