Fair Though I suspect that most people won’t concern themselves with the full details of type subtraction, and will just use a predefined type alias that means “an iterable of strings but not a single string”.
google/pytype/blob/main/docs/faq.md#why-doesnt-str-match-against-string-iterables
<!--* freshness: { exempt: true } *-->
# FAQ
<!--ts-->
* [FAQ](#faq)
* [How is pytype different from other type checkers?](#how-is-pytype-different-from-other-type-checkers)
* [Can I find out what pytype thinks the type of my expression is?](#can-i-find-out-what-pytype-thinks-the-type-of-my-expression-is)
* [How do I reference a type from within its definition? (Forward References)](#how-do-i-reference-a-type-from-within-its-definition-forward-references)
* [I'm dynamically populating a class / module using setattr or by modifying locals() / globals(). Now pytype complains about missing attributes or module members. How do I fix this?](#im-dynamically-populating-a-class--module-using-setattr-or-by-modifying-locals--globals-now-pytype-complains-about-missing-attributes-or-module-members-how-do-i-fix-this)
* [Why didn't pytype catch that my program (might) pass an invalid argument to a function?](#why-didnt-pytype-catch-that-my-program-might-pass-an-invalid-argument-to-a-function)
* [How do I declare that something can be either byte string or unicode?](#how-do-i-declare-that-something-can-be-either-byte-string-or-unicode)
* [I'm trying to use a mixin, but pytype raises errors about it. What should I do?](#im-trying-to-use-a-mixin-but-pytype-raises-errors-about-it-what-should-i-do)
* [Why is pytype taking so long?](#why-is-pytype-taking-so-long)
* [How do I disable all pytype checks for a particular file?](#how-do-i-disable-all-pytype-checks-for-a-particular-file)
* [How do I disable all pytype checks for a particular import?](#how-do-i-disable-all-pytype-checks-for-a-particular-import)
* [How do I write code that is seen by pytype but ignored at runtime?](#how-do-i-write-code-that-is-seen-by-pytype-but-ignored-at-runtime)
* [How do I silence overzealous pytype errors when adding multiple types to a dict (or list, set, etc.)?](#how-do-i-silence-overzealous-pytype-errors-when-adding-multiple-types-to-a-dict-or-list-set-etc)
* [How do I get type information for third-party libraries?](#how-do-i-get-type-information-for-third-party-libraries)
* [Why doesn't str match against string iterables?](#why-doesnt-str-match-against-string-iterables)
This file has been truncated. show original