SethMMorton / natsort

Simple yet flexible natural sorting in Python.
https://pypi.org/project/natsort/
MIT License
907 stars 52 forks source link

Type hinting #138

Closed SethMMorton closed 3 years ago

SethMMorton commented 3 years ago

The idea is to fully type-hint natsort and make it 100% clean to mypy in --strict mode. We'll see if we get there :)

insilications commented 3 years ago

Very nice! Excited to see typing support being build.

codecov[bot] commented 3 years ago

Codecov Report

Merging #138 (3461338) into master (afe1226) will decrease coverage by 2.78%. The diff coverage is 93.47%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #138      +/-   ##
==========================================
- Coverage   99.35%   96.57%   -2.79%     
==========================================
  Files          10       10              
  Lines         466      613     +147     
==========================================
+ Hits          463      592     +129     
- Misses          3       21      +18     
Impacted Files Coverage Δ
natsort/natsort.py 90.47% <82.27%> (-9.53%) :arrow_down:
natsort/utils.py 98.31% <96.11%> (-1.69%) :arrow_down:
natsort/__init__.py 100.00% <100.00%> (ø)
natsort/__main__.py 100.00% <100.00%> (ø)
natsort/compat/fake_fastnumbers.py 100.00% <100.00%> (ø)
natsort/compat/fastnumbers.py 92.85% <100.00%> (+0.54%) :arrow_up:
natsort/compat/locale.py 95.74% <100.00%> (+0.50%) :arrow_up:
natsort/ns_enum.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 afe1226...3461338. Read the comment docs.

SethMMorton commented 3 years ago

Huzzah! Before I merge this, I think I want to add type hints to fastnumbers so that I don't need to ignore that package in the mypy configuration.