mypy will cry at py2+py3 if it doesn't understand the py2 half of
hybridized code

pyfkakes alike

but there's a lot of things to grep for:

- sys.error
- except ImportError -C 3
- __unicode__
- unicode(
- most "from __future__" ... except "annotations"
- class xxxx(object):  ---> "(object)" part can go.



In debian/rules:

    The PYBUILD_python2 rules should be dropped and the "_python3" suffix
can be dropped.


In debian/control:

Boilerplate like  "This is the Python3 version of the library". This is
mostly non-sensical now. The tools that generate d/control could be trimmed
too.

Debian Code Search can help for both.


Greetings


Le jeu. 15 août 2024, 12:57, Andrey Rakhmatullin <w...@debian.org> a écrit :

> On Thu, Aug 15, 2024 at 12:11:55PM +0200, Jerome BENOIT wrote:
> > is there a reliable way to isolate Python2 idiosyncrasies in Python3
> scripts ?
>
> Do you mean code that still works in Python 3 but can be simplified?
> Lots of linters do this in whole or in part, though I don't have
> suggestions for something that does *only* this. You can also look at
> pyupgrade.
>
> --
> WBR, wRAR
>

Reply via email to