Subject: Re: bug#67061: [PATCH] Improve syntax highlighting for python-ts-mode

From: Eli Zaretskii <[email-masked]>
Date: Sat, 11 Nov 2023 09:32:48 +0200

> From: Denis Zubarev <[email-masked]>
> Date: Sat, 11 Nov 2023 05:21:25 +0300
> 
> Improve syntax highlighting for python-ts-mode.
> 
> - Fontify compound keywords "not in" and "is not" (fixes bug#67015)
> - Fix fontification of strings inside of f-strings interpolation,
>    e.g. for f"beg {'nested'}" - 'nested' was not fontified as string.
> - Do not override the face of builtin functions (all, bytes etc.) with
>   the function call face
> - Add missing assignment expressions
> - Fontify built-ins (dict,list,etc.) as types when they are used in type hints

Yuan, any comments?

My only comment is that we should decide in which fontification
level(s) should the additional fontifications be.

> I have added tests to treesit-tests.el, but I'm not sure that it is the
> right place for them. I tried to create new file
> python-ts-mode-tests.el, but when I run tests using make, I got
> an error:
> *** No rule to make target '../lisp/progmodes/python-ts-mode.el', needed by 'lisp/progmodes/python-ts-mode-tests.log'.  Stop.
> 
> It seems that python-ts-mode is required to be in its own file, but it
> is defined in python.el.
> Adding tests to python-tests.el seems like not good idea too, because
> some CI code is searching for *-ts-mode-tests.el or treesit-tests.el files.

The tests should be in python-tests.el, and should be skipped if
(treesit-ready-p 'python t) returns nil.

What problems with CI did you see?  I don't think I understand your
last sentence above.

> >From 0b3165eb90bdc1b85688d3c9a1902c1f293972d1 Mon Sep 17 00:00:00 2001
> From: Denis Zubarev <[email-masked]>
> Date: Sat, 11 Nov 2023 04:55:44 +0300
> Subject: [PATCH] Improve syntax highlighting for python-ts-mode

This submission is too large for us to accept without a copyright
assignment.  Would you like to start your assignment copyright
paperwork rolling at this time?  If yes, I will send you the form to
fill and the instructions to email it.

Thanks.