Is BaseTzInfo a part of public API?
Asked by
andreymal
There are two things:
1) I want to check that a some object is a pytz timezone;
2) and I want to use mypy+typeshed for static type checking.
`isinstance(obj, pytz.BaseTzInfo)` works great. But mypy prints error: `Module has no attribute "BaseTzInfo"`. That's because typeshed thinks that BaseTzInfo is not a part of public API, so I can't use it.
So, my question is in the title: is BaseTzInfo a part of public API?
If this is a public API, please describe it in the documentation explicitly. Then I can open a bug report in the typeshed repository.
If this is a private API, then why? How should I check object type?
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- pytz Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Stuart Bishop
- Solved:
- Last query:
- Last reply:
To post a message you must log in.