6

How do I fix this error? It seems feedparser does not support mypy typings? I could not find a typeshed implementation for feedparser

UPDATE 1

I see an option called ignore_missing_imports that I can add to pyproject.toml. Isn't it a bad idea to do this?

PirateApp
  • 5,433
  • 4
  • 57
  • 90

1 Answers1

7

I see an option called ignore_missing_imports that I can add to pyproject.toml. Isn't it a bad idea to do this?

Yes, it usually is a bad idea to enable this on all modules. Consider using a more constrained approach:

You can ignore missing imports only for this specific package by adding a [tools.mypy.override] section in pyproject.toml. This way you don't need enable the flag on everything.

[[tool.mypy.overrides]]
module = "feedparser.*"
ignore_missing_imports = true

The work for supporting typing in feedparser has been merged to the develop branch and you should be able to remove this workaround when it is released.

PIG208
  • 2,060
  • 2
  • 10
  • 25