First time here? Check out the FAQ!
1

Auto-editing glitch

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

Michael's avatar
171
Michael
asked 2019-09-09 03:38:48 -0500
Wingware Support's avatar
4.1k
Wingware Support
updated 2019-09-09 13:40:08 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

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.

Wingware Support's avatar
4.1k
Wingware Support
answered 2019-09-09 07:46:36 -0500
edit flag offensive 0 remove flag delete link

Comments

Version 7.1.1.0 (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 support@wingware.com 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
add a comment see more comments
0

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!

Wingware Support's avatar
4.1k
Wingware Support
answered 2019-09-09 13:39:34 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer