Skip to content

Commit

Permalink
Ignore union-attr mypy errors in scraper modules
Browse files Browse the repository at this point in the history
This is primarily done for one widespread set of noisy (usually false positive) errors in particular: AbstractScraper.soup.find(...) returns {Tag | NavigableString | None}, and we often call find / find_all on the results of that.  NavigableString doesn't provide those methods, and having to isinstance check on every find call would be annoying
  • Loading branch information
jayaddison committed Oct 12, 2022
1 parent 39fa50b commit e33181a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mypy.ini
Expand Up @@ -31,6 +31,9 @@ warn_unreachable=False
strict_equality=True
ignore_missing_imports=True

[mypy-recipe_scrapers.*]
disable_error_code = union-attr

[mypy-tests.*]
disallow_untyped_defs=False

Expand Down

0 comments on commit e33181a

Please sign in to comment.