I am having a try of the dataclasses
feature in Python 3.7, but get this warning below word 'hue':
'hue' used before definition
Python (use-before-def)
I suppose it is a linter warrning. I tried several linters that python extension provided, but none of them work.
from dataclasses import dataclass
@dataclass
class Color:
hue: int
lightness: float = 2.0
c = Color(2)
Is there a way to have syntax checking etc enabled but avoid receiving this warning?
warning using pep8
warning using pylint or mypy
You can set "python.analysis.disabled": ["use-before-def"]
to disable the check (docs). The mis-classification of this as an issue has been reported.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With