PeerAssets / pypeerassets

Reference implementation of the PeerAssets protocol.
BSD 3-Clause "New" or "Revised" License
12 stars 16 forks source link

PEP 484 type hints #98

Closed belovachap closed 6 years ago

belovachap commented 6 years ago

@peerchemist @saeveritt

Hello again! This pull request closes #33 (ideally :p)

When I run mypy --ignore-missing-imports --disallow-untyped-defs pypeerassets the computer no longer yells at me which I think is a good sign that we're fairly type hinted. It seems like a useful tool overall, would keep trying to use :+1:

I had to make some uninformed guesses at the "right type" here and there but most of the tests pass (although I did delete a bunch of "older looking ones" and I silenced the last hand full of failing tests with @pytest.mark.xfail... to be looked at soon). The functions in __main__.py seemed at home in pautils.py so I moved them over there :) Although maybe there was a reason for them living in main that I don't know about :thinking:

belovachap commented 6 years ago

All those comments sound reasonable. I'll rebase on the most recent work and patch it up a bit :)

belovachap commented 6 years ago

I didn't move the functions around in this latest version :) Mostly just type hinting and small updates based on mypy feedback.