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.
unidiomatic-typecheck
1 parent e724596 commit 323a2fcCopy full SHA for 323a2fc
3 files changed
doc/data/messages/u/unidiomatic-typecheck/bad.py
@@ -0,0 +1,3 @@
1
+test_score = {"Biology": 95, "History": 80}
2
+if type(test_score) is dict: # [unidiomatic-typecheck]
3
+ pass
doc/data/messages/u/unidiomatic-typecheck/good.py
+if isinstance(test_score, dict):
doc/data/messages/u/unidiomatic-typecheck/related.rst
@@ -0,0 +1,2 @@
+* `Builtin function type() <https://docs.python.org/3/library/functions.html#type>`_
+* `Builtin function isinstance() <https://docs.python.org/3/library/functions.html#isinstance>`_
0 commit comments