[geany/geany] efbfe7: Display python type annotations correctly formatted
Jiří Techet
git-noreply at xxxxx
Sun Jan 9 22:32:40 UTC 2022
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Enrico Tröger <enrico.troeger at uvena.de>
Date: Sun, 09 Jan 2022 22:32:40 UTC
Commit: efbfe7dea7929a53415da0d20412f605a0354c82
https://github.com/geany/geany/commit/efbfe7dea7929a53415da0d20412f605a0354c82
Log Message:
-----------
Display python type annotations correctly formatted
Modified Paths:
--------------
src/tagmanager/tm_parser.c
Modified: src/tagmanager/tm_parser.c
13 lines changed, 9 insertions(+), 4 deletions(-)
===================================================================
@@ -933,10 +933,11 @@ gchar *tm_parser_format_variable(TMParserType lang, const gchar *name, const gch
switch (lang)
{
- case TM_PARSER_PASCAL:
- return g_strconcat(name, " : ", type, NULL);
case TM_PARSER_GO:
return g_strconcat(name, " ", type, NULL);
+ case TM_PARSER_PASCAL:
+ case TM_PARSER_PYTHON:
+ return g_strconcat(name, ": ", type, NULL);
default:
return g_strconcat(type, " ", name, NULL);
}
@@ -966,15 +967,19 @@ gchar *tm_parser_format_function(TMParserType lang, const gchar *fname, const gc
{
switch (lang)
{
- case TM_PARSER_PASCAL:
case TM_PARSER_GO:
+ case TM_PARSER_PASCAL:
+ case TM_PARSER_PYTHON:
{
/* retval after function */
const gchar *sep;
switch (lang)
{
case TM_PARSER_PASCAL:
- sep = " : ";
+ sep = ": ";
+ break;
+ case TM_PARSER_PYTHON:
+ sep = " -> ";
break;
default:
sep = " ";
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list