curveresearch / curvesim

Simulates Curve Finance pools
MIT License
156 stars 32 forks source link

Use mypy #252

Closed chanhosuh closed 1 year ago

chanhosuh commented 1 year ago

Description

Closes #253. Makes progress toward #162.

As part of fixing mypy errors, ended up sneaking a new interface in (see changelog entry).

TODO:

Hygiene checklist

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

github-actions[bot] commented 1 year ago

Coverage report

The coverage rate went from 75.9% to 76.19% :arrow_up: The branch rate is 63%.

100% of new lines are covered.

Diff Coverage details (click to unfold) ### curvesim/logging.py `100%` of new lines are covered (`92.98%` of the complete file). ### curvesim/pool/base.py `100%` of new lines are covered (`49.41%` of the complete file). ### curvesim/pool/cryptoswap/pool.py `100%` of new lines are covered (`90.21%` of the complete file). ### curvesim/pool/stableswap/metapool.py `100%` of new lines are covered (`94.22%` of the complete file). ### curvesim/pipelines/simple/strategy.py `100%` of new lines are covered (`100%` of the complete file). ### curvesim/pool/snapshot.py `100%` of new lines are covered (`95.95%` of the complete file). ### curvesim/iterators/price_samplers/price_volume.py `100%` of new lines are covered (`93.54%` of the complete file). ### curvesim/pool/stableswap/pool.py `100%` of new lines are covered (`97.01%` of the complete file). ### curvesim/pool/cryptoswap/calcs/__init__.py `100%` of new lines are covered (`87.5%` of the complete file). ### curvesim/templates/__init__.py `100%` of new lines are covered (`100%` of the complete file). ### curvesim/templates/log.py `100%` of new lines are covered (`100%` of the complete file). ### curvesim/pipelines/vol_limited_arb/strategy.py `100%` of new lines are covered (`48%` of the complete file). ### curvesim/pool/cryptoswap/calcs/factory_2_coin.py `100%` of new lines are covered (`85.46%` of the complete file). ### curvesim/pool/cryptoswap/calcs/tricrypto_ng.py `100%` of new lines are covered (`91.16%` of the complete file). ### curvesim/templates/strategy.py `100%` of new lines are covered (`100%` of the complete file). ### curvesim/metrics/state_log/log.py `100%` of new lines are covered (`95.65%` of the complete file).