oBrstisf8o
oBrstisf8o

Reputation: 316

How to suppress mypy error: "some/path/to/module" shadows library module "module"

I'm well aware that normally you wouldn't want to suppress this error, but my case is special. I'm "poly-filling" skulpt with some modules that it lacks in stdlib ("typing" and "typing_extensions" to be exact). How can I suppress this error? Preferably where:

  1. Suppression only applies for specific files.
  2. Mypy doesn't use type-hins/annotations from my local file, but rather from where it would take them if it didn't exist...
  3. Mypy still runs on that specified file.

Upvotes: 2

Views: 353

Answers (0)

Related Questions