datacontract / datacontract-cli

CLI to manage your datacontract.yaml files
https://cli.datacontract.com
Other
458 stars 87 forks source link

Type hinting/annotation style #356

Open roykoand opened 3 months ago

roykoand commented 3 months ago

Is there any type hinting style in datacontract-cli?

What do you think about usage of type hinting libraries/checkers in the CI of this repo? mypy?

Data contract specification module is a good example. Some Pydantic models are type hinted without using typing.Optional https://github.com/datacontract/datacontract-cli/blob/ee32b102eea279d1da420eb377dd0c99fb8a24fb/datacontract/model/data_contract_specification.py#L87-L100 and some with: https://github.com/datacontract/datacontract-cli/blob/ee32b102eea279d1da420eb377dd0c99fb8a24fb/datacontract/model/data_contract_specification.py#L124-L128

jochenchrist commented 3 months ago

Certainly, a good idea. Open to discuss mypy.

Would you be interested in preparing a PR?

roykoand commented 3 months ago

@jochenchrist sure, would love to work on this but can't guarantee a quick work done. We probably ought to exclude some of the mypy checks... will see and discuss in PR!