[geany/geany] 7340a8: Remove invalid python-specific code

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:      7340a8786b6e60d205ee2df0cff606c30273f334
             https://github.com/geany/geany/commit/7340a8786b6e60d205ee2df0cff606c30273f334

Log Message:
-----------
Remove invalid python-specific code

The code in the comment maybe used to be true some time ago but now
no kind maps to namespace for Python.


Modified Paths:
--------------
    src/symbols.c

Modified: src/symbols.c
6 lines changed, 1 insertions(+), 5 deletions(-)
===================================================================
@@ -2511,11 +2511,7 @@ gint symbols_get_current_function(GeanyDocument *doc, const gchar **tagname)
 gint symbols_get_current_scope(GeanyDocument *doc, const gchar **tagname)
 {
 	TMTagType tag_types = (tm_tag_function_t | tm_tag_method_t | tm_tag_class_t |
-			tm_tag_struct_t | tm_tag_enum_t | tm_tag_union_t);
-
-	/* Python parser reports imports as namespaces which confuses the scope detection */
-	if (doc && doc->file_type->lang != filetypes[GEANY_FILETYPES_PYTHON]->lang)
-		tag_types |= tm_tag_namespace_t;
+			tm_tag_struct_t | tm_tag_enum_t | tm_tag_union_t | tm_tag_namespace_t);
 
 	return get_current_tag_name_cached(doc, tagname, tag_types);
 }



--------------
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