From 08d0dbc42faf940bf92dbd5570e24bdc48ddeaa1 Mon Sep 17 00:00:00 2001 From: NIKHIL Date: Tue, 9 Dec 2025 01:25:14 +0530 Subject: [PATCH] fix(syntax): remove aggressive python type inference rules --- src/textual/tree-sitter/highlights/python.scm | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/textual/tree-sitter/highlights/python.scm b/src/textual/tree-sitter/highlights/python.scm index 3e7381b813..62defa2586 100644 --- a/src/textual/tree-sitter/highlights/python.scm +++ b/src/textual/tree-sitter/highlights/python.scm @@ -10,14 +10,14 @@ (interpolation) @none ;; Identifier naming conventions -((identifier) @type - (#match? @type "^[A-Z].*[a-z]")) -((identifier) @constant - (#match? @constant "^[A-Z][A-Z_0-9]*$")) - -((attribute - attribute: (identifier) @field) - (#match? @field "^([A-Z])@!.*$")) +;; ((identifier) @type +;; (#match? @type "^[A-Z].*[a-z]")) +;; ((identifier) @constant +;; (#match? @constant "^[A-Z][A-Z_0-9]*$")) +;; +;; ((attribute +;; attribute: (identifier) @field) +;; (#match? @field "^([A-Z])@!.*$")) ((identifier) @type.builtin (#any-of? @type.builtin @@ -57,14 +57,14 @@ function: (attribute attribute: (identifier) @method.call)) -((call - function: (identifier) @constructor) - (#match? @constructor "^[A-Z]")) - -((call - function: (attribute - attribute: (identifier) @constructor)) - (#match? @constructor "^[A-Z]")) +;; ((call +;; function: (identifier) @constructor) +;; (#match? @constructor "^[A-Z]")) +;; +;; ((call +;; function: (attribute +;; attribute: (identifier) @constructor)) +;; (#match? @constructor "^[A-Z]")) ;; Decorators