On Mon, Mar 31, 2025 at 9:05 AM Frode Nordahl <[email protected]> wrote:
> Hello, Ales, > > On 31.03.2025 07:35, Ales Musil wrote: > > > > > > On Sun, Mar 30, 2025 at 5:30 PM Frode Nordahl <[email protected] > <mailto:[email protected]>> wrote: > > > > flake8 2.7.0 introduced the F824 check [0]. > > > > While the check sounds reasonable on the surface, we have code in > > the repository where the global variable is used only for access. > > > > My conclusion from evaluating the alternative of adjusting the code > > to appease the check is that it would invite future mistakes where > > the global variable is unintentionally shadowed in addition to > > making the code less clear and explicit. > > > > 0: https://github.com/PyCQA/flake8/pull/1974 < > https://github.com/PyCQA/flake8/pull/1974> > > 1: https://github.com/PyCQA/pyflakes/pull/825 < > https://github.com/PyCQA/pyflakes/pull/825> > > Signed-off-by: Frode Nordahl <[email protected] <mailto: > [email protected]>> > > --- > > > > > > Hi Frode, > > > > it seems that OVN has the same problem, would you have > > time to post the fix for OVN too? > > I found the issue while preparing a patch for OVN, so it would be posted > as part of that eventually, but I've expedited that specific patch. > > For main branch I'd suggest we just bump the submodule, I posted > https://mail.openvswitch.org/pipermail/ovs-dev/2025-March/422532.html > to that effect. > > Ilya has backported it to some of the branches OVN use for its stable > branches, so presumably we could choose the same tactic for those, but I > do not know how far back the CI container image build step goes. > The container goes way back to 23.06, so we will need the submodule bump for all supported branches (24.03, 24.09, 25.03) to unblock the CI. Would you please take care of those custom backports too? > -- > Frode Nordahl > > > Makefile.am | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/Makefile.am b/Makefile.am > > index a61a1cadf..cdcc4e9bd 100644 > > --- a/Makefile.am > > +++ b/Makefile.am > > @@ -406,9 +406,10 @@ ALL_LOCAL += flake8-check > > # W504 line break after binary operator > > # F*** -- warnings native to flake8 > > # F811 redefinition of unused <name> from line <N> (only from > flake8 v2.0) > > +# F824 a `global` or `nonlocal` statement where the name is never > reassigned > > # D*** -- warnings from flake8-docstrings plugin > > # H*** -- warnings from flake8 hacking plugin (custom style checks > beyond PEP8) > > -FLAKE8_IGNORE = > E121,E123,E125,E126,E127,E128,E129,E131,E203,E722,W503,W504,F811,D,H,I > > +FLAKE8_IGNORE = > E121,E123,E125,E126,E127,E128,E129,E131,E203,E722,W503,W504,F811,F824,D,H,I > > flake8-check: $(FLAKE8_PYFILES) > > $(FLAKE8_WERROR)$(AM_V_GEN) \ > > src='$^' && \ > > -- > > 2.48.1 > > > > _______________________________________________ > > dev mailing list > > [email protected] <mailto:[email protected]> > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev < > https://mail.openvswitch.org/mailman/listinfo/ovs-dev> > > > > Thanks, > > Ales > > Thanks, Ales _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
