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.

Python: Move pylint flags to config

See original GitHub issue

Description

We currently add several flags to pylint in the CI’s Python Checkstyle step. Moving this configuration to a config file would make it easier to maintain over time.

Current Behavior

smoke-tests.yml

   - name: Python Checkstyle
      timeout-minutes: 20
      run: |
        pylint --disable=F0401 --disable=W0511 --disable=E1101 --disable=R0801 --disable=R0903  ./src/*/*.py
        # disabled warnings: import loading, todos, function members, duplicate code, public methods

Desired Behavior

   - name: Python Checkstyle
      timeout-minutes: 20
      run: |
        pylint 

Open Questions

  • should this be by service or for the entire project?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
rajatdiptabiswascommented, Apr 25, 2020

Thanks @Daniel-Sanche @bharathkkb I’ll try my best to get it done

0reactions
rajatdiptabiswascommented, Apr 27, 2020

Hi @bharathkkb!

Sure. I’ll make changes to the master branch itself then.

I think you’re right about leaving the --rcfile flag. Better to be explicit and mention the rcfile location rather than not.

Things I should do be doing now:

  1. Put the comments beside the disable codes as you mentioned here
  2. Remove the flags from the Makefile and change the line to pylint --rcfile=./.pylintrc ./src/*/*.py instead
  3. Kindly confirm the structure of the .pylintrc file as well. Do I remove the defaults and just leave the disable portion as you mentioned here? I believe we’ll need confirmation from @Daniel-Sanche for this matter.

Are these correct? If you give me the green light, I shall start working on these right away!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pylint configuration - CodeFlow
Pylint requires configuration via a .pylint configuration file as detailed in Pylint's documentation. If you don't specify your custom configuration file we ...
Read more >
Pylint features - Pylint 2.16.0-dev documentation
This message can't be emitted when using Python < 3.5. yield-inside-async-function ... Move this import to the top of the file. ungrouped-imports (C0412)....
Read more >
Pylint configuration - Codeac
Pylint requires configuration via a .pylint configuration file as detailed in Pylint's documentation. If you don't specify your custom configuration file we ...
Read more >
How do I disable a Pylint warning? - python - Stack Overflow
I've tried adding disable=C0321 in the Pylint configuration file, but Pylint insists on reporting it anyway. Variations on that line (like disable=0321 or ......
Read more >
Pylint Documentation - Read the Docs
Pylint is a tool that checks for errors in Python code, tries to enforce a coding ... This can be done easily through...
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