We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72e2e2a commit 34c6aedCopy full SHA for 34c6aed
doc/data/messages/c/compare-to-empty-string/bad.py
@@ -0,0 +1,8 @@
1
+x = ""
2
+y = "hello"
3
+
4
+if x == "": # [compare-to-empty-string]
5
+ print("x is an empty string")
6
7
+if y != "": # [compare-to-empty-string]
8
+ print("y is not an empty string")
doc/data/messages/c/compare-to-empty-string/details.rst
doc/data/messages/c/compare-to-empty-string/good.py
@@ -1 +1,8 @@
-# This is a placeholder for correct code for this message.
+if not x:
+if y:
doc/data/messages/c/compare-to-empty-string/pylintrc
@@ -0,0 +1,2 @@
+[main]
+load-plugins=pylint.extensions.emptystring
0 commit comments