Typestats basically ignores symbols defined outside of the projects (except for a select few from typing[_extensions] and _typeshed). The reasoning here is that if those symbols are untyped, then there's nothing the user can do about it. That's why typestats doesn't include those in the reported counts and coverage. This avoids situations similar to how pyright --verifytypes, will never be 100% if you have an import numbers somewhere in your code. Pyright has an --excludeexternal flag for this to ignore such cases, but as far as I've seen, everyone always enables this flag.
I guess there's also something to be said for reporting transitively untyped symbols, but I can see how it's easier to reason about type-coverage if it's limited to the target project.
I suppose that a --excludeexternal flag like pyright has would be most flexible, but it's probably easier to always ignore external dependencies, like typestats currently does.
Typestats basically ignores symbols defined outside of the projects (except for a select few from
typing[_extensions]and_typeshed). The reasoning here is that if those symbols are untyped, then there's nothing the user can do about it. That's why typestats doesn't include those in the reported counts and coverage. This avoids situations similar to howpyright --verifytypes, will never be 100% if you have animport numberssomewhere in your code. Pyright has an--excludeexternalflag for this to ignore such cases, but as far as I've seen, everyone always enables this flag.I guess there's also something to be said for reporting transitively untyped symbols, but I can see how it's easier to reason about type-coverage if it's limited to the target project.
I suppose that a
--excludeexternalflag like pyright has would be most flexible, but it's probably easier to always ignore external dependencies, like typestats currently does.