question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable `use-list-literal` rule

See original GitHub issue

Make 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:closed
  • Created 10 months ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
harupycommented, Nov 7, 2022

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.

0reactions
shogohidacommented, Nov 7, 2022

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found