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 hinting #138

Merged
merged 25 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
36f0d6f
Support Type Hinting
thethiny Aug 31, 2021
43b70f4
Merge pull request #135 from thethiny/master
SethMMorton Oct 24, 2021
cd0520f
Add a mypy env to tox
SethMMorton Oct 24, 2021
7a44a5e
Remove support for Python 3.5 and 3.4
SethMMorton Oct 24, 2021
f87d6b5
The ns enum actually now is a python enum
SethMMorton Oct 24, 2021
6d4d95c
Satisfy mypy for library as-is
SethMMorton Oct 24, 2021
70ba693
Add type hints to "minor" files
SethMMorton Oct 25, 2021
d8b0f25
Fully typehint utils.py
SethMMorton Oct 27, 2021
3123552
Fully type hint natsort.py
SethMMorton Oct 27, 2021
0a9f42b
Expose some internal types to the user
SethMMorton Oct 27, 2021
49aa573
Remove type annotations from documentation
SethMMorton Oct 28, 2021
90c68f3
natsort now passes mypy with --strict
SethMMorton Oct 28, 2021
64f13fe
Add type annotations to tests
SethMMorton Oct 29, 2021
2988edb
Rename some types
SethMMorton Oct 29, 2021
b4c9978
Expose the NSType in the public API
SethMMorton Oct 29, 2021
be8d85e
Simplify types
SethMMorton Oct 29, 2021
68ae5ae
Fix other bugs introduced in the shuffle
SethMMorton Oct 29, 2021
49e6d7f
Static analysis now happens on Python 3.6
SethMMorton Oct 29, 2021
13ef04c
Run mypy in CI
SethMMorton Oct 29, 2021
13a7615
Add py.typed
SethMMorton Oct 29, 2021
14f72a4
Eliminate unneeded cast in __main__.py
SethMMorton Oct 29, 2021
4cc58e2
Actually do overloads correctly
SethMMorton Oct 31, 2021
239c024
Remove fastnumbers type ignore statement
SethMMorton Nov 2, 2021
7fbc69f
Need to disable zip_safe with py.typed
SethMMorton Nov 2, 2021
3461338
Install fastnumbers for mypy
SethMMorton Nov 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Install fastnumbers for mypy
Otherwise it complains that it cannot find the types, understandably.
  • Loading branch information
SethMMorton committed Nov 3, 2021
commit 3461338e52292926bc2148dd5fdda37f253b5860
2 changes: 1 addition & 1 deletion .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
python-version: '3.6'

- name: Install MyPy
run: pip install mypy hypothesis pytest pytest-mock
run: pip install mypy hypothesis pytest pytest-mock fastnumbers

- name: Run MyPy
run: mypy --strict natsort tests
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ deps =
hypothesis
pytest
pytest-mock
fastnumbers
commands =
mypy --strict natsort tests
skip_install = true
Expand Down