LGTM unnecessary pass: why is it there?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
chennes
Veteran
Posts: 3881
Joined: Fri Dec 23, 2016 3:38 pm
Location: Norman, OK, USA
Contact:

LGTM unnecessary pass: why is it there?

Post by chennes »

This is utterly trivial, I'm really just curious: LGTM (and other linters) identify an unnecessary "pass" statement in PathOpTools.py line 232:

Code: Select all

        # if we get to this point the assumption is that makeOffset2D can deal with the edge
        pass # pylint: disable=unnecessary-pass
It's literally more "code" to ignore the pass than to just remove it :lol: . Why is it there?!
Chris Hennes
Pioneer Library System
GitHub profile, LinkedIn profile, chrishennes.com
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: LGTM unnecessary pass: why is it there?

Post by sliptonic »

My guess is that it was always bogus but whoever add the pylint pass didn't understand it and thought it was faster to suppress than to figure it out.
:lol:
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: LGTM unnecessary pass: why is it there?

Post by mlampert »

It's a remnant from py2 where it was not redundant. In py3 a comment properly indented is enough, py2 demanded an actual code line. They can be safely removed by now.
Post Reply