After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 617135 - Improved Python
Improved Python
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
2.10.x
Other Linux
: Normal enhancement
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2010-04-28 23:04 UTC by Patryk Zawadzki
Modified: 2014-02-06 14:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (3.47 KB, patch)
2010-04-28 23:04 UTC, Patryk Zawadzki
reviewed Details | Review
Improve Python syntax highlighting (4.61 KB, patch)
2014-02-06 11:07 UTC, Sébastien Wilmet
none Details | Review

Description Patryk Zawadzki 2010-04-28 23:04:18 UTC
Created attachment 159833 [details] [review]
Proposed patch

The attached patch adds coloring to modules, functions and classes.
Comment 1 Sébastien Wilmet 2014-02-05 15:52:36 UTC
Comment on attachment 159833 [details] [review]
Proposed patch

The patch looks good, but unfortunately it is outdated. The python.lang file is now in data/language-specs/. Please also provide the patch with the 'git format-patch' command, so we have the commit message.
Comment 2 Patryk Zawadzki 2014-02-05 16:10:25 UTC
Sorry, I don't really have time to do that. I hope you can understand, it's been a couple of years. Feel free to adapt my changes.
Comment 3 Sébastien Wilmet 2014-02-06 11:07:41 UTC
Created attachment 268275 [details] [review]
Improve Python syntax highlighting

- Highlighting for the function name and class name, also in the "import
  from".
- Highlighting for decorators.

Thanks to Patryk Zawadzki for the initial patch.
Comment 4 Sébastien Wilmet 2014-02-06 11:11:09 UTC
> also in the "import from"

I mean in the "from ... import ...".

The above patch can be tested with the following Python code:


from itertools import count

@viking_chorus
def menu_item():
    print("spam")
    
class blah:
    def foo:
        pass