A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://realpython.com/lessons/using-pylint-recap-and-summary/ below:

Recap and Summary (Video) – Real Python

Congratualations, you’ve made it until the end! This is the last video of the course and provides you a little summary of what you’ve learned during the course. Furthermore, a few recommondations are given.

Congratulations, you made it to the end of the course! What’s your #1 takeaway or favorite thing you learned? How are you going to put your newfound skills to use? Leave a comment in the discussion section and let us know.

Very useful tool and thanks Dan for putting this in a simple video format. Now I will look for the sublime text plugin for this....

Thanks Dan! I do like linters but as you said, the tools are not perfect and somethings have more subjective answers. Oh and I bought the Python tricks book too…it’s really cool!! :D Thank you!

I use the anaconda navigator and jupyter as my IDE. Anaconda also offers sypder as a Python IDE along with Jupyter. For those using Jupyter, which I still love, Spyder is a very nice complement to it. From time to time, export your notebook file as a python program ( .py) file. Then import into Spyder. Spyder can use pylint for static code analysis. You may need to install pylint via conda via the command line: conda install -c anaconda pylint

Congrats!

What plugin you suggest to Atom?

Thanks for an interesting course Dan. I was wondering how one would go about using pylint on an entire python package. So say I have the following structure: /main.py, /src, /src/module1, /src/module2, /src/module3, /tests, /tests/module1, /tests/module2, /tests/module3, /doc

In main.py I import all the needed modules. Is there a way to use pylint on main.py so that it checks all the underlying modules which may contain various classes and functions.

Is there a way to use pylint on main.py so that it checks all the underlying modules which may contain various classes and functions?

Great question! Depending on the project layout, it can be a bit tricky to get pylint to check all Python source files.

If your subfolders contain __init__.py files that designate them as Python packages you should be able to run pylint ./<your-toplevel-package> and pylint will lint everything in that package.

Alternatively, you can use a shell command to gather all .py source files and then pass that list to pylint. Assuming you’re on Linux/macOS, something like this would do the trick:

find . -type f -name "*.py" | xargs pylint 

I see your example folder structure included “test” folders. If you’re already using pytest to run your tests, then check out the pytest-pylint plugin. It will lint your Python files with pylint as part of a test run. That’s probably the most convenient option.

Hope this helps you out. You can get more info here in this Stack Overflow discussion

Become a Member to join the conversation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4