Enable `use-list-literal` rule
See original GitHub issueMake the following change and replaced list()
with []
diff --git a/pylintrc b/pylintrc
index c0d8e9866..d8efe2105 100644
--- a/pylintrc
+++ b/pylintrc
@@ -182,7 +182,8 @@ enable=c-extension-no-member,
consider-merging-isinstance,
consider-using-dict-items,
unnecessary-comprehension,
- consider-using-set-comprehension
+ consider-using-set-comprehension,
+ use-list-literal
See https://pylint.pycqa.org/en/latest/user_guide/messages/refactor/use-list-literal.html for more information.
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Judges and the law: 6.2 The literal rule - The Open University
The literal rule says that the intention of Parliament is best found in the ordinary and natural meaning of the words used. As...
Read more >The Rules Behind Statutory Interpretation - LawTeacher.net
There are four Rules of Statutory Interpretation, these are the literal rule, the golden rule, the mischief rule and the purposive approach.
Read more >What is "no-string-literal" rule in tslint? - Stack Overflow
It means you can't access objects using the bracket notation. For example: object["property"]. This way, a simple typo will throw an error and...
Read more >Interpretation, Rules and Principles of Statutory
This is called the literal rule. (3) Ordinary words must be given their ordinary meanings and technical words their technical meanings, unless absurdity ......
Read more >Consider removing no-callback-literal rule #1352 - GitHub
I strongly recommend removing this rule. First of all, the use-cases of callback with literal is much more common than we expect, currently...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We can check the number of lambda assignments first by running pylint after updating
pylintrc
. If it’s a few, we can manually fix them.Oh I see. Mine is 2.9.6 and I noticed it’s a bit old. I will install the latest version and run pylint again.