Ask Your Question

Auto-editing glitch

asked 2019-09-09 03:38:48 -0500

Michael's avatar

updated 2019-09-09 13:40:08 -0500

I'm trying to change the signature of the following function by assigning a default value max_area=-1

def drawContours(self, contours, min_area, max_area):

First step: Typing the equal sign gives (as expected)

def drawContours(self, contours, min_area, max_area = ):

Second step: Type the minus. Result is now:

def drawContours(self, contours, min_area, max_area = )-> :

Attached my settings (not quite sure, which one is responsible here. Apparently a combination that tries very hard to enforce a type hint). image description

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2019-09-09 13:39:34 -0500

Ah, I just found it. It occurs when there's a space after the = and before the -. Should be fixed in our next update. Turning off Editor > PEP8 > Spaces Around = in Argument Lists is a way to reduce how often this will occur. Thanks again for reporting this!

edit flag offensive delete link more

answered 2019-09-09 07:46:36 -0500

This looks like a bug that has been fixed in more recent versions of Wing. If you can't upgrade I think turning off Correct Out-of-Order Typing will solve it.

edit flag offensive delete link more


Version (rev 18f7c8f3b915) here, this should be the latest one, right?

Michael's avatar Michael  ( 2019-09-09 09:21:58 -0500 )edit

Yes, that's the latest. Oddly I can't reproduce this, although I may be missing the necessary context that is causing it to fail to see that the error correction should not be applied. If you have a case that always causes it that you could email to that would be great to have. In any case, thanks for reporting this bug!

Wingware Support's avatar Wingware Support  ( 2019-09-09 12:58:26 -0500 )edit

Oddly I can't reproduce this.

Same here. I have refactored the code since providing this report, but even checking out the last commit before filing the issue cannot reproduce the problem. But it was visible this morning in very stable form, so I guess there is something. Perhaps in some cached information, not longer available now.

Michael's avatar Michael  ( 2019-09-09 13:25:32 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-09-09 03:38:48 -0500

Seen: 2,193 times

Last updated: Sep 09 '19