Thread (44 messages) 44 messages, 10 authors, 2022-09-28

Re: [RFC net-next 3/4] ynl: add a sample python library

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2022-08-15 23:12:51
Also in: linux-doc

On Fri, 2022-08-12 at 15:53 -0700, Jakub Kicinski wrote:
On Thu, 11 Aug 2022 13:09:06 -0700 Stephen Hemminger wrote:
quoted
Looks interesting, you might want to consider running your code
through some of the existing Python checkers such as flake8 and pylint.
If you want this to be generally available in repos, best to follow the language conventions

For example flake8 noticed:
 $ flake8 --max-line-length=120 ./tools/net/ynl/samples/ynl.py 
./tools/net/ynl/samples/ynl.py:251:55: F821 undefined name 'file_name'
Thanks! I'll make sure to check flake8 (pylint is too noisy for me :()
FWIW, I've come to really believe in also adding type annotations (and
checking them with mypy, of course, I even use --strict), which has
helped even my smaller projects a lot. YMMV, but it might be something
to look into.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help