pyanalyze icon indicating copy to clipboard operation
pyanalyze copied to clipboard

Ignore statement not working for some cases (`import_failed`)

Open mflova opened this issue 1 year ago • 2 comments

So far I found this strange behaviour when trying to silence some import_failed error codes. Here is a minimal example:

# Error not reported in this file -> OK
import a  # static analysis: ignore
# Error reported in this file -> NOK
from __future__ import annotations

import a  # static analysis: ignore
# Error not reported in this file -> OK
# static analysis: ignore
from __future__ import annotations

import a

mflova avatar Oct 10 '23 14:10 mflova