On Thu, 8 Dec 2022 at 21:19, Richard Kimberly Heck <rikih...@gmail.com>
wrote:

> On 12/8/22 13:45, Scott Kostyshak wrote:
> > Perhaps it doesn't make sense to clean up lyx_2_4.py (except for looking
> > for bugs), but what would you think about adding an agreed-upon set of
> > pylint warnings to our test suite for lyx_2_5.py?
>
> I don't think it could hurt.
>

+1, and even to run these kinds of checks during tests.


> > lyx_2_4.py:836:16: W0612: Unused variable 'k' (unused-variable)
>
> This is a weird one. Jürgen should have a look. Probably it's harmless.
> Basically, it's the loop variable, and it's not actually being used in
> the loop, just to control the number of iterations. So it might just be
> a style thing more than a substance thing.
>

The Python standard for variables that are introduced just because the
syntax requires it (like iterating X times) is to name that variable _ (or
to prefix it with an underscore if there are more than one). For
instance, pylint
recognises this <https://github.com/PyCQA/pylint/issues/1058>.
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to