This work is done according to "Milestone 2: Implement typings in conda-smithy" as stated in the Scope of Work with Sovereign Tech Fund (STF) (https://www.sovereigntechfund.de/).
This PR addresses the typing request from this issue
The above command will create stub files in the stubs folder. Here's an example of what the content of a stub file will look like. It gives suggestions for types.
Introduction
This work is done according to "Milestone 2: Implement typings in conda-smithy" as stated in the Scope of Work with Sovereign Tech Fund (STF) (https://www.sovereigntechfund.de/).
This PR addresses the typing request from this issue
Setup
Setup details are here: https://github.com/neighbourhoodie/conda-smithy/wiki
Steps followed to add type
As suggested in the ticket in the conda-smithy repo, MonkeyType is used to generate type hints for the python code.
Generate type hints
Install MonkeyType
Run tests using MonkeyType. This will dump call traces into a SQLite database in the file
monkeytype.sqlite3
in the current working directory.Make a separate folder called
stubs
to save the type hint filesGenerate stub files for each of the modules found in the SQLite database
The above command will create stub files in the
stubs
folder. Here's an example of what the content of a stub file will look like. It gives suggestions for types.The suggestions generated in the stub file were used make changes to the actual python code.
Checklist
news
entryNote:
Please note that there are some errors thrown by mypy that couldn't resolved at the moment and there is more room for further type improvements there.