https://software.codidact.com/categories/38/tags/7172.rssNew Posts Tagged 'mypy' - Software DevelopmentSoftware Development - Codidact2023-08-24T06:19:52Zhttps://software.codidact.com/posts/289455How can I properly type-hint methods in different files that would lead to circular imports?mr Tsjolderhttps://software.codidact.com/users/643002023-08-20T05:41:36Z2023-08-24T06:19:52Z<p>I am writing a Python package where I have two classes in different files that (indirectly) depend on each other.
If I wouldn't care about type-hints, there would be no problem, but unfortunate...https://software.codidact.com/posts/289150How to resolve the mypy error "Returning Any from function declared to return 'Dict[str, Any]'" in Python?ShadowsRangerhttps://software.codidact.com/users/580872023-07-30T10:09:25Z2023-07-30T11:47:01Z<p>I have a function that loads JSON data and is declared to return a dictionary with string keys and values of any type (Dict[str, Any]). However, mypy is raising an error stating that I am return...https://software.codidact.com/posts/287630What's causing mypy to give an `[assignment]` error in this nested for loop?true_bluehttps://software.codidact.com/users/363832022-12-28T00:56:31Z2022-12-28T01:38:08Z<p>I started adding types to my (working) solution to Exercism's "Kindergarten Garden" exercise, to learn how typing with python and Mypy (strict) works. While doing so, I ran into a Mypy error tha...