I have the plugin pylint. But I get some errors. Like this error:
Missing module docstringPylint(C0114:missing-module-docstring)
and this error:
Formatting a regular string which could be a f-stringPylint(C0209:consider-using-f-string)
and this is my settings.json file in visual studio code:
"python.linting.enabled": true,
"python.linting.pylintArgs": [
"--disable=line-too-long",
"--disable=unused-argument",
"--disable=C0111",
"--errors-only"
],
and this is the code fragment where the errors occur:
class Leg:
pass
class Back:
pass
class Chair:
def __init__(self, num_legs):
self.legs = [leg() for leg in range(num_legs)]
self.back = Back()
def __repr__(self):
return "I have {} and one back".format(len(self.legs))
print(Chair(5))
and of course I googled this. But the suggestion I found on the net is that I have to change the settings of python.linting as described above. But no change is detecetd.
And I also restarted vs code a couple of times.
So does somebody know how to tackle this?
Thank you
CodePudding user response:
(C0209:consider-using-f-string)
C0114:missing-module-docstring
I believe you have read this issue. You can add the following content to disable these string warnings:
"python.linting.pylintArgs": [
"--disable=C0114",
"--disable=C0209",
],