I'm using flake8
in Visual Studio Code, writing some code using Python 3.6 variable annotations. It worked without any problems so far, but I encountered a strange warning.
This works fine:
style: str = """
width: 100%;
...
"""
# Doing sth with `style`
This too:
img_style: str = """
width: 100%;
...
"""
# Doing sth with `img_style`
This however does not, it yields below warning:
iframe_style: str = """
width: 100%;
...
"""
# Doing sth with `iframe_style`
Well, technically it does work fine; the code runs. But somehow flake8
is not happy with this.
The multiline string and the code following is always the same.
When I omit the "f" (i_rame_style
), I don't get a warning, too! So I guess for some reason flake8 thinks of a if foo: bar()
here!?
What am I missing here? Is this a bug in flake8
?