closeio-api icon indicating copy to clipboard operation
closeio-api copied to clipboard

feat: including typehints; tox to manage packages; mypy to static check; remove unnecessary requirements; change circle ci to use tox; run black and isort to format

Open pedroimpulcetto opened this issue 1 year ago • 1 comments

Hey there, I'm trying to keep this repository alive by implementing Mypy as a static type checker and making some small improvements, not changing the repository core. I hope it looks good 🙏 but feel free to suggest or decline any changes.

🛠️ Adding Mypy for Better Type Checking

A development dependency, Mypy, was added. It checks for type-related errors before you run the code, making it less prone to runtime errors and smoothing the development process.

📦 Dependency Changes in requirements.txt

The dependencies pytest and responses have been removed. These dependencies aren't necessary for the closeio_api package as they are dev-dependencies, so they were added in tox.ini for testing purposes only.

🔄 Updates in .circleci/config.yml

We are now using pip install tox to run tests and Mypy. A new step, 'Mypy', has been introduced, which runs Mypy on the codebase, ensuring type safety.

💡 Type Hints in closeio_api

Several improvements have been made to the closeio_api/__init__.py file. The main changes include adding type hints to variables and function parameters. This enhancement helps catch type errors at an early stage, making the code safer and more maintainable.

pedroimpulcetto avatar May 22 '24 20:05 pedroimpulcetto

Hey @pedroimpulcetto, thank you for your contribution. I'm excited to see our client getting improvements!

I've left a few comments on things I noticed right away, however I'd really appreciate if we did this as a series of smaller, more focused, separate PRs. I'd be happy to help review and ship those.

I really appreciate your time to take a look at it @tsx, thank you! I completely agree with you, I think I got too carried away with the changes 😅 I will do that smaller and focused on each scope.

pedroimpulcetto avatar May 24 '24 13:05 pedroimpulcetto