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.

Fix pylint problems

See original GitHub issue

The goal of this issue is to enable some pylint rules that we disabled while doing the Python 3 migration.

Steps to follow to create a PR:

  1. Ask @vojtechjelinek to assign you to one of the items below
  2. Remove the assigned item from the .pylintrc
  3. Run python -m scripts.linters.pre_commit_linter --only-check-file-extensions=py --path=core --verbose to check existing issues in the codebase. (This can take 3-5 mins mins to complete.)
  4. If the above script takes too much time or you have a slow machine then consider pushing the code to GitHub and GitHub actions will run these checks for you.
  5. Fix all the issues found by running the above command.
  6. Commit all the changes and create a PR.

Example PRs: #14474

Remove some disables from the .pylintrc:

Refactor custom validators that are not working correctly:

  • #16366 (assignments tracked in linked issue)

Decided not to introduce:

  • consider-using-dict-items @mjsumpter
  • consider-using-f-string
  • super-with-arguments @jrvald
  • unnecessary-pass
  • arguments-renamed
  • import-outside-toplevel

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:108 (57 by maintainers)

github_iconTop GitHub Comments

1reaction
vojtechjelinekcommented, Nov 23, 2022
1reaction
vojtechjelinekcommented, Nov 22, 2022

@prakhar1144 Are you working on this?

@richard-johansson I think you can work on consider-using-with if @prakhar1144 doesn’t reply.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I automatically fix lint issues reported by pylint?
Some of the formatting-errors reported by pylint can be fixed with autopep8, black, or the built-in formatting supported by PyCharm and ...
Read more >
Auto-fixing annoyances with Black and Pylint - Medium
This post introduces the tools Pylint and Black for automatically resolving Python code-style problems. If you're new to Python, ...
Read more >
Pylint Errors | Improve Your Code with Pylint and Black
Working Through Pylint Errors · Error: inconsistent use of tabs and spaces · Errors: line too long , trailing whitespace , wrong import...
Read more >
Linting Python in Visual Studio Code
Linting highlights syntactical and stylistic problems in your Python source code, which often helps you identify and correct subtle programming errors or ...
Read more >
Python Linter—Write Clean Python Code (Examples)
Flake8 works such that it analyzes your code and displays all the issues. Then it is up to you to actually fix the...
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