osl-incubator / makim

Make Improved
https://osl-incubator.github.io/makim/
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

linter: Improve mypy configuration #116

Open xmnlab opened 1 day ago

xmnlab commented 1 day ago

Currently, mypy is not very well configured.

This is the new configuration proposed:

[tool.mypy]
python_version = "3.8"
check_untyped_defs = true
strict = true
ignore_missing_imports = true
warn_unused_ignores = true
warn_redundant_casts = true
warn_unused_configs = true
show_error_codes = true
exclude = ["scripts/"]
xmnlab commented 1 day ago

@abhijeetSaroha could you work on that? if so, I can add here the label for the psf grant.

after this change maybe a bunch of changes in the annotations would be necessary.

abhijeetSaroha commented 1 day ago

Sure, I'd be happy to work on this!

Could you provide more details on the specific areas you're looking to improve with this change? Also, any specific scripts or modules where these annotations may need updates would be helpful to know in advance.

xmnlab commented 1 day ago

mypy is used as a tool for checking type annotation .. the current configuration is not good ... it is very fragile .. so if this new configuration it will be more strict ..

I am doing the same for sugar: https://github.com/osl-incubator/sugar/pull/125/files but I am changing more things there