Sometimes, as I enter code, PyScripter flags syntax errors that aren’t real (see above). However, the code runs fine – there are no errors. The code above was entered in one continuous input, line by line.
Running the code leaves the ‘error squiggles’ intact.
But, taking that ‘break’ as an example, if, at the end of the code, I go and un-indent and then re-indent the break, the squiggles disappear.
Any ideas?
Peet
From: pyscr...@googlegroups.com <pyscr...@googlegroups.com> On Behalf Of PyScripter
Sent: 22 November 2022 01:23
To: PyScripter <pyscr...@googlegroups.com>
Subject: Re: Color Coding Functions
This is syntax highlighting. PyScripter uses its own python syntax highlighter. Implementing the different coloring of function calls is not very hard, but you are the first to request that.
If you want to contribute to the project you can help by for instance:
On Tuesday, November 22, 2022 at 3:15:31 AM UTC+2 readys...@gmail.com wrote:
Someone mentioned that maybe a linter would do this? I'm new to programming so I'm not exactly sure where I'd start here. Is that something that could work here?
On Tuesday, November 22, 2022 at 1:12:51 AM UTC PyScripter wrote:
Interesting. My VS Code does not color function calls.
PyScripter does a make the distinction between function names and other identifiers, except in the definition of classes and functions. You can customize the coloring of identifiers, but you cannot show differently function calls from other identifiers (variables). This may be implemented in the future.
On Tuesday, November 22, 2022 at 2:55:10 AM UTC+2 readys...@gmail.com wrote:
Sure. Here's a screenshot from Visual Studio Code (first pic below). The function name is color coded as is the subsequent function call at the bottom of the example code. But in PyScripter (the 2nd picture), the function isn't color coded when it's called, only after it's defined. Is there a way that every occurrence of a function would get color coded?
On Tuesday, November 22, 2022 at 12:16:12 AM UTC PyScripter wrote:
I am not sure what you are referring to. Could you provide a complete example with some screenshots?
Also, which version of PyScripter are you using?
On Monday, November 21, 2022 at 7:36:11 PM UTC+2 readys...@gmail.com wrote:
When I create a function, by default PyScripter will change the color of the function to red. Cool. This is what I want.
But when I use that function later in the script, it's just plain white text.
Example:
def openFile (filename): # note the function is in red text.
code....
openFile(filename) # note the function is NOT colored at all.
This is making my code harder to read/decipher.
Any fixes?
--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyscripter/0172b6ab-0f7d-462a-8b92-80ed00d46b57n%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "PyScripter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyscripter+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyscripter/01d001d8fe7b%24eb7b0490%24c2710db0%24%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyscripter/d770fce6-4975-4cb9-88b8-39ecd960feefn%40googlegroups.com.
V4.2.1.0; Python 3.11
Just to repeat, the code runs just fine.
If I outdent each line then re-indent, false errors disappear.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyscripter/d770fce6-4975-4cb9-88b8-39ecd960feefn%40googlegroups.com.
No, that’s not the problem (and by-the-by I always use spaces anyway).
The code runs perfectly - complete *with* the supposed errors. In other words, code is erroneously being flagged as having errors.
Peet
From: pyscr...@googlegroups.com <pyscr...@googlegroups.com> On Behalf Of Albert Prauser
Sent: 23 November 2022 06:00
To: pyscr...@googlegroups.com
Subject: Re: Weird false syntax errors
Hello,
To view this discussion on the web visit https://groups.google.com/d/msgid/pyscripter/CAJkOJv8i6UNQUY_5RU7ruP1WA%2BigMzbg%3D1MqRC0Y4K8pk4KV_Q%40mail.gmail.com.