We are currently integrating pyright checks in our project. We found that generally pyright is great at inferring the return types by just looking at the source code of libraries. However for abstractmethods which only contain a docstring it assumes that the method is supposed to return None since there's no return statement.
This minimal set of hints seems to help pyright figure out how plumbum paths work.
Coverage: 83.946%. Remained the same when pulling 45620b52fcad69e16d8514d99ebb535d64c597fd on moskupols:type-hint-return-path-abstractmethods into c03482b010115288bbe1e8167c121a897e8634fe on tomerfiliba:master.
We are currently integrating pyright checks in our project. We found that generally pyright is great at inferring the return types by just looking at the source code of libraries. However for abstractmethods which only contain a docstring it assumes that the method is supposed to return None since there's no return statement. This minimal set of hints seems to help pyright figure out how plumbum paths work.