<div dir="ltr"><div dir="ltr"><span style="color:rgb(80,0,80)">> E203 - whitespace before ‘,’, ‘;’, or ‘:’</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> E266 - too many leading ‘#’ for block comment</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> E501 - line too long</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> E731 - do not assign a lambda expression, use a def</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> C0111 - Missing %s docstring</span><br style="color:rgb(80,0,80)"><span style="color:rgb(80,0,80)">> F0401 - Unable to import %s<br></span><span style="color:rgb(80,0,80)"><br></span>E203, E266 and E501 were disabled due to pylama fighting with the autoformatters, so I decided to let the autoformatters win. I think that C0111 was suppressed because this set of suppressions was from mainline DTS and that has a lot of functions without documentation. F0401 is disabled due to dependencies on TRex vendored python libraries, since those will not be possible to import inside of the container. I don't remember why E731 is set, but it may be due to the rte flow rule generator I wrote for mainline DTS, which makes use of lambdas extensively to enable lazy evaluation, so that DTS doesn't need to keep ~2 billion rules in memory.<span style="color:rgb(80,0,80)"><br><br><br></span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 9, 2022 at 10:13 AM Juraj Linkeš <juraj.linkes@pantheon.tech> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
<br>
> -----Original Message-----<br>
> From: Bruce Richardson <<a href="mailto:bruce.richardson@intel.com" target="_blank">bruce.richardson@intel.com</a>><br>
> Sent: Friday, September 9, 2022 3:53 PM<br>
> To: Juraj Linkeš <juraj.linkes@pantheon.tech><br>
> Cc: <a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>; <a href="mailto:david.marchand@redhat.com" target="_blank">david.marchand@redhat.com</a>;<br>
> <a href="mailto:ronan.randles@intel.com" target="_blank">ronan.randles@intel.com</a>; <a href="mailto:Honnappa.Nagarahalli@arm.com" target="_blank">Honnappa.Nagarahalli@arm.com</a>;<br>
> <a href="mailto:ohilyard@iol.unh.edu" target="_blank">ohilyard@iol.unh.edu</a>; <a href="mailto:lijuan.tu@intel.com" target="_blank">lijuan.tu@intel.com</a>; <a href="mailto:dev@dpdk.org" target="_blank">dev@dpdk.org</a><br>
> Subject: Re: [PATCH v4 1/9] dts: add project tools config<br>
> <br>
> On Fri, Sep 09, 2022 at 01:38:33PM +0000, Juraj Linkeš wrote:<br>
> ><br>
> ><br>
> > > -----Original Message-----<br>
> > > From: Bruce Richardson <<a href="mailto:bruce.richardson@intel.com" target="_blank">bruce.richardson@intel.com</a>><br>
> > > Sent: Wednesday, September 7, 2022 6:17 PM<br>
> > > To: Juraj Linkeš <juraj.linkes@pantheon.tech><br>
> > > Cc: <a href="mailto:thomas@monjalon.net" target="_blank">thomas@monjalon.net</a>; <a href="mailto:david.marchand@redhat.com" target="_blank">david.marchand@redhat.com</a>;<br>
> > > <a href="mailto:ronan.randles@intel.com" target="_blank">ronan.randles@intel.com</a>; <a href="mailto:Honnappa.Nagarahalli@arm.com" target="_blank">Honnappa.Nagarahalli@arm.com</a>;<br>
> > > <a href="mailto:ohilyard@iol.unh.edu" target="_blank">ohilyard@iol.unh.edu</a>; <a href="mailto:lijuan.tu@intel.com" target="_blank">lijuan.tu@intel.com</a>; <a href="mailto:dev@dpdk.org" target="_blank">dev@dpdk.org</a><br>
> > > Subject: Re: [PATCH v4 1/9] dts: add project tools config<br>
> > ><br>
> > > On Fri, Jul 29, 2022 at 10:55:42AM +0000, Juraj Linkeš wrote:<br>
> > > > .gitignore contains standard Python-related files.<br>
> > > ><br>
> > > > Apart from that, add configuration for Python tools used in DTS:<br>
> > > > Poetry, dependency and package manager Black, formatter Pylama,<br>
> > > > static analysis Isort, import sorting<br>
> > > ><br>
> > > > .editorconfig modifies the line length to 88, which is the default<br>
> > > > Black uses. It seems to be the best of all worlds. [0]<br>
> > > ><br>
> > > > [0]<br>
> > > > <a href="https://black.readthedocs.io/en/stable/the_black_code_style/curren" rel="noreferrer" target="_blank">https://black.readthedocs.io/en/stable/the_black_code_style/curren</a><br>
> > > > t_st<br>
> > > > yle.html#line-length<br>
> > > ><br>
> > > > Signed-off-by: Owen Hilyard <<a href="mailto:ohilyard@iol.unh.edu" target="_blank">ohilyard@iol.unh.edu</a>><br>
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech><br>
> > ><br>
> > > Thanks for the work on this. Some review comments inline below.<br>
> > ><br>
> > > /Bruce<br>
> > ><br>
> > > > ---<br>
> > > >  dts/.editorconfig  |   7 +<br>
> > > >  dts/.gitignore     |  14 ++<br>
> > > >  dts/README.md      |  15 ++<br>
> > > >  dts/poetry.lock    | 474<br>
> > > +++++++++++++++++++++++++++++++++++++++++++++<br>
> > > >  dts/pylama.ini     |   8 +<br>
> > > >  dts/pyproject.toml |  43 ++++<br>
> > > >  6 files changed, 561 insertions(+)  create mode 100644<br>
> > > > dts/.editorconfig  create mode 100644 dts/.gitignore  create mode<br>
> > > > 100644 dts/README.md  create mode 100644 dts/poetry.lock  create<br>
> > > > mode 100644 dts/pylama.ini  create mode 100644 dts/pyproject.toml<br>
> > > ><br>
> > > > diff --git a/dts/.editorconfig b/dts/.editorconfig new file mode<br>
> > > > 100644 index 0000000000..657f959030<br>
> > > > --- /dev/null<br>
> > > > +++ b/dts/.editorconfig<br>
> > > > @@ -0,0 +1,7 @@<br>
> > > > +# SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022<br>
> > > > +PANTHEON.tech s.r.o.<br>
> > > > +# See <a href="https://editorconfig.org/" rel="noreferrer" target="_blank">https://editorconfig.org/</a> for syntax reference.<br>
> > > > +#<br>
> > > > +<br>
> > > > +[*.py]<br>
> > > > +max_line_length = 88<br>
> > ><br>
> > > It seems strange to have two different editorconfig settings in<br>
> > > DPDK. Is there a reason that:<br>
> > > a) we can't use 79, the current DPDK default and recommended length by<br>
> > >    pycodestyle? Or alternatively:<br>
> > > b) change all of DPDK to use the 88 setting?<br>
> > ><br>
> > > Also, 88 seems an unusual number. How was it chosen/arrived at?<br>
> > ><br>
> ><br>
> > The commit message contains a link to Black's documentation where they<br>
> explain it:<br>
> > <a href="https://black.readthedocs.io/en/stable/the_black_code_style/current_st" rel="noreferrer" target="_blank">https://black.readthedocs.io/en/stable/the_black_code_style/current_st</a><br>
> > yle.html#line-length<br>
> ><br>
> > Let me know what you think about it. I think it's reasonable. I'll move the<br>
> config to the top level .editorconfig file.<br>
> ><br>
> <br>
> I have no objection to moving this to the top level, but others may like to keep<br>
> our python style as standard. Realistically I see three choices here:<br>
> <br>
> 1. Force DTS to conform to existing DPDK python style of 79 characters 2. Allow<br>
> DTS to use 88 chars but the rest of DPDK to keep with 79 chars 3. Allow all of<br>
> DPDK to use 88 chars.<br>
> <br>
> Of the 3, I like relaxing the 79/80 char limit so #3 seems best to me as you<br>
> suggest. However, I'd wait a few days for a desenting opinion before I'd do a<br>
> new patchset revision. :-)<br>
> <br>
<br>
Ok, I'll wait.<br>
<br>
> /Bruce<br>
<br>
</blockquote></div></div>