fix(python): impossible patterns

This commit is contained in:
Zooce 2025-12-03 13:51:50 -08:00
parent c5623d3486
commit e1820bbda1
3 changed files with 15 additions and 14 deletions

View file

@ -1779,8 +1779,8 @@ return {
}, },
python = { python = {
install_info = { install_info = {
revision = 'v0.25.0', revision = 'v0.25.2',
url = 'https://github.com/tree-sitter/tree-sitter-python', url = 'https://github.com/tree-sitter/py-tree-sitter',
}, },
maintainers = { '@stsewd', '@theHamsta' }, maintainers = { '@stsewd', '@theHamsta' },
tier = 1, tier = 1,

View file

@ -81,8 +81,10 @@
; doc-strings ; doc-strings
(expression_statement (expression_statement
(string (expression
(string_content) @spell) @string.documentation) (primary_expression
(string
(string_content) @spell))) @string.documentation)
; Tokens ; Tokens
[ [

View file

@ -45,16 +45,15 @@
":" ":"
(#set! indent.immediate 1)) @indent.begin (#set! indent.immediate 1)) @indent.begin
(ERROR ; (ERROR
"try" ; "try"
. ; .
":" ; ":"
(ERROR ; (ERROR
(block ; (block
(expression_statement ; (expression_statement
(identifier) @_except) @indent.branch)) ; (identifier) @_except) @indent.branch))
(#eq? @_except "except")) ; (#eq? @_except "except"))
((function_definition) @indent.begin ((function_definition) @indent.begin
(#set! indent.immediate 1)) (#set! indent.immediate 1))