-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto inserted colon causes pylint error #1227
Comments
From pierre.raybaut on 2013-01-27T04:36:55Z @-Carlos: I agree with Steve that the automatic colon insertion algorithm should take into account comments. In other words, in CodeEditor.__do_insert_colons, commented parts of 'leadingtext' should be removed in the process... and that is not trivial because it would require a sophisticated text parsing adapted to Python language grammar. Note that such an algorithm would be needed by other parts of Spyder (like the fact that code completion should not be triggered inside a comment). If you we are not able to provide a mature feature, I think that we should disable it by default. In other words, I can accept to skip let this Issue opened for v2.2 but in the meantime this means that the feature is still experimental, so we have to disable it by default. Status: Accepted |
From ccordoba12 on 2013-01-27T06:38:35Z @-Pierre: This is actually next in my TODO list and I have an idea on how we could solve it in a different way: using syntax highlighting. The idea would be to detect comments/strings by the color they are highlighted with. If their colors match the ones assigned to them by the current color scheme, then we can be sure about it's syntactical role. I found some promising code snippets a while back but I was quite busy last semester to study them at depth. After I publish beta2 this afternoon, I'll put my full attention to this problem and I think I can fix it by the next weekend. If not, then we can disable the feature by default (like you say) and I'll try to fix it during the 2.2 cycle. Labels: -Priority-Medium Priority-High |
From pierre.raybaut on 2013-01-27T07:06:43Z Funny, I was pretty sure that Qt was not exposing any interface to retrieve the information of text formatting (color, bold, italic, ...) related to syntax highlighting. I thought I already looked into it. But if it is possible then that's good news indeed. |
From ccordoba12 on 2013-03-30T22:32:30Z This issue was updated by revision 242294e8afe8 . Status: Started |
From ccordoba12 on 2013-04-05T14:34:08Z Jed, please help me verify the test case provided by Steve is now working correctly. |
From jed.lud...@gmail.com on 2013-04-05T19:34:28Z Looks like it is working at revision b6204549563f under Windows 7, Status: Verified |
From steve.f....@gmail.com on 2013-01-17T15:49:35Z
Spyder Version: 2.2.0beta1
Python Version: 2.7.3
Qt Version: 4.7.4, PyQt4 (API v1) 4.8.6 on Windows
What steps will reproduce the problem?
Please provide any additional information below
.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1227
The text was updated successfully, but these errors were encountered: