by trial and error I found that I can put this into pylintrc:
But I cannot find anything in the documentation where this is mentioned.
Why is that so? Should I have searched harder?
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
Hi. On my new project, pylint takes 2 seconds. If I add a call to a class in 3rd party package 'pyglet', then pylint checking time goes up to 2 minutes. I presume it's checking pyglet. How do I tell pylint not to do that?
$ mkvirtualenv -p python3.7 pylinttest
(pylinttest) $ pip install -U pylint pyglet
(pylinttest) $ cat pylint_test.py
win = pyglet.window.Window()
(pylinttest) $ pylint pylint_test.py
************* Module pylint_test
pylint_test.py:5:0: C0305: Trailing newlines (trailing-newlines)
pylint_test.py:1:0: C0111: Missing module docstring (missing-docstring)
pylint_test.py:3:0: C0111: Missing function docstring (missing-docstring)
* 2 MINUTE PAUSE HERE*
pylint_test.py:3:11: W0613: Unused argument 'title' (unused-argument)
pylint_test.py:4:4: W0612: Unused variable 'win' (unused-variable)
If I change the line:
win = pyglet.window.Window()
by removing the '( )', so that we no longer call Window:
win = pyglet.window.Window
then pylint checks go back down to 2 seconds.
I tried many different config settings, on the command line and in my pylintrc, such as:
to no avail.
Forgive me, I must be missing something obvious. Any pointers what I should go read about would appreciated.
Jonathan Hartley +1(507)513-1101
I am using Bandit and was wondering how do you define your severity and confidence levels? In other words, what makes a High severity a vulnerability High instead of Medium or Low? How do you define the confidence of the finding?
Thank you in advance for the information,
Secure Decisions div. of Applied Visions, Inc.
6 Bayview Avenue
Northport, NY 11768
I hope this is the right place to ask this question. I have also submitted an issue at https://github.com/PyCQA/pylint/issues/2726.
I'm currently researching how to build static bug checkers of python packages in the Robot Operating System (http://www.ros.org) at the IT University of Copenhagen.
I have a few questions related to the possibility of using pylint in order to build some of these checkers.
It is possible to create so-called packages in ROS using Python (among other languages). I'm trying to see if it is possible to verify that the imported modules in these packages exist with pylint, but I'm having a hard time getting the expected behaviour (I have too many false positives).
I'd like to verify whether these declared modules exist based on the requirement specification (a list of modules) of the ROS package - without installing all the required modules using e.g. pip.
I have tried using the parameter `--extension-pkg-whitelist=packagename` but I am still getting false positives.
What I'm wondering is:
* Do I have to install all the declared modules using e.g. pip in order for pylint to detect them correctly? That would pretty much defeat the purpose of the checker I’m developing.
* Is it possible to feed pylint a requirements.txt (or a similar format) that will then allow pylint to detect these imports as non-errors (again without installing)?
Thanks for any answers in advance,
It's better late than never (and also things were not funny in my life
the previous years), I've juste made a release for both Baron and
RedBaron to fully support up to python 3 grammar up to python 3.7.
This release might not be fully dry yet but it's there.
Baron and RedBaron are 2 projects that works together to allow you to
write code that both query and modify python /source/ code
programmatically, they can be used to build custom refactoring script,
tooling, analysing etc... Baron being the parser and RedBaron the API
for humans on top of that.
A huge focus has been put on creating a high level intuitive and
powerful API to make those kind of complicated jobs as intuitive and
as easy as possible but working on source code is still pretty hard.
You can get an good idea in RedBaron's documentation
https://redbaron.readthedocs.io (it's full of examples everywhere)
Next steps in the roadmap are as boring as needed:
* maybe python 3.8 support in advance
* bug fixes, bugs fixes, bug fixes, bug fixes...
* some needed features like the visitor/walker pattern
And that's already a huge amount of work ^^'
I also have R&D plans for exploring if it's possible to create a new
generic refactoring syntax tree that could be plug into RedBaron while
having no knowledge at all of the input language but that's long term.
Up until recently (for several years) my work on RedBaron was fully
volunteer based, if you wish to support it I've opened an
OpenCollective for that https://opencollective.com/redbaron/ (and
seeing who reports bugs and where they work I know this work is
useful). I would also be very interested in doing this kind of
research and work professionally for a structure but I'm not really
sure where to look.
I'll also be at FOSDEM if you want to say hi :)
Laurent Peuch -- Bram