From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Fabrice Salvaire via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#71293: 29.3; indentation issue for Python mode Date: Fri, 31 May 2024 16:52:26 +0200 Message-ID: Reply-To: Fabrice Salvaire Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------KFv7biMFF80Ly1oTOuQwf0cT" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: 71293@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 31 16:53:17 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sD3d6-0003sL-7m for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 31 May 2024 16:53:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sD3ci-0003l6-KK; Fri, 31 May 2024 10:52:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD3ch-0003kt-7R for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 10:52:51 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD3cg-0002UQ-V9 for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 10:52:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sD3cr-00019f-Vl for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 10:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Fabrice Salvaire Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 May 2024 14:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71293 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17171671764425 (code B ref -1); Fri, 31 May 2024 14:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 May 2024 14:52:56 +0000 Original-Received: from localhost ([127.0.0.1]:55164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD3cl-00019H-6x for submit@debbugs.gnu.org; Fri, 31 May 2024 10:52:56 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:54050) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sD3ch-000198-Bw for submit@debbugs.gnu.org; Fri, 31 May 2024 10:52:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sD3cV-0003kM-3a for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 10:52:39 -0400 Original-Received: from smtp-18.smtpout.orange.fr ([80.12.242.18] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sD3cN-0002TR-1r for bug-gnu-emacs@gnu.org; Fri, 31 May 2024 10:52:38 -0400 Original-Received: from [192.168.1.2] ([82.124.140.120]) by smtp.orange.fr with ESMTPA id D3cIsaAuBuGjeD3cIsAqjk; Fri, 31 May 2024 16:52:27 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1717167147; bh=17R6vw/0p/qgj8J+b/BATjRmWqplmx5HzJ4dkmbAmfk=; h=Message-ID:Date:MIME-Version:To:Subject:From; b=tbdZlarE7zxZs1ppslVmz9SpvEFWIoPxwq5xqxYriWiJmo2UslNU+vFBtEhW8JCoy xROLfdtr/ldJFvHGaZ0EYBtwc0ta7zLuW4olStnkrgRlmgmtitAbfVTqo3RJ3IZ912 1dzgS8/M3wrQGp0yjO93isO7kgCeHLoi3cvr2jnbJgDGzINEDeioWen/JcPVZ6K0lj BrmWEhDvsxEIZBD1G5BwyvAmSPf8Tf8904sxjA3nqT2ffRvfpsHr97VugqpaxkR7LD r9O0k+EBneDvv6qLLh38ZrboN5yIbUrQ5rWJO542k6EtB1vPrvpDbT4UNuKq2Zwm7+ tUe24x73gSH+Q== X-ME-Helo: [192.168.1.2] X-ME-Auth: ZmFicmljZS5zYWx2YWlyZUB3YW5hZG9vLmZy X-ME-Date: Fri, 31 May 2024 16:52:27 +0200 X-ME-IP: 82.124.140.120 Content-Language: fr-FR, en-GB Received-SPF: pass client-ip=80.12.242.18; envelope-from=fabrice.salvaire@orange.fr; helo=smtp.smtpout.orange.fr X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HEXHASH_WORD=1.159, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_HELO_TEMPERROR=0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286280 Archived-At: This is a multi-part message in MIME format. --------------KFv7biMFF80Ly1oTOuQwf0cT Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit I observed many times indentation issues for modern Python 3. For examples: ``` class Foo: def __init__(self, ...): self.foo = ... # TAB won't indent to pos+4 ``` A workaround is sometimes to close and reopen the file. Thus I suspect a wrong state. But I don't found any explanation. I am using Python mode with treesitter enabled but I think it is not yet used for indentation ??? --- In GNU Emacs 29.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of 2024-03-25 built on 8d1efaa99cf549ff83f11657c3f4678a Windowing system distributor 'The X.Org Foundation', version 11.0.12302006 System Description: Fedora Linux 39 (Workstation Edition) Configured using: 'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no --with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json --with-native-compilation=aot --with-tree-sitter --with-sqlite3 --with-webp --with-xinput2 build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ' LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++ 'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3 ZLIB Important settings: value of $LC_ALL: fr_FR.utf8 value of $LANG: fr_FR.utf8 locale-coding-system: utf-8-unix Major mode: Python Minor modes in effect: global-flycheck-eglot-mode: t flycheck-eglot-mode: t eglot--managed-mode: t treemacs-icons-dired-mode: t treemacs-filewatch-mode: t treemacs-follow-mode: t treemacs-hide-gitignored-files-mode: t treemacs-git-mode: t treemacs-fringe-indicator-mode: always shell-dirtrack-mode: t flycheck-color-mode-line-mode: t whitespace-mode: t highlight-indent-guides-mode: t doom-modeline-mode: t server-mode: t global-git-gutter-mode: t git-gutter-mode: t flycheck-pos-tip-mode: t yas-global-mode: t yas-minor-mode: t global-corfu-mode: t corfu-mode: t global-treesit-auto-mode: t global-flycheck-mode: t flycheck-mode: t flyspell-lazy-mode: t undo-fu-session-global-mode: t undo-fu-session-mode: t which-key-mode: t ivy-mode: t recentf-mode: t override-global-mode: t tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: /home/.../.config/emacs/checkout/highlight-indent-guides/highlight-indent-guides hides /home/.../.config/emacs/elpa/highlight-indent-guides-20200820.2328/highlight-indent-guides /home/.../.config/emacs/emacs.d/tree-sitter hides /home/.../.config/emacs/elpa/tree-sitter-20220212.1632/tree-sitter /home/.../.config/emacs/elpa/auctex-14.0.4/tex-site hides /usr/share/emacs/site-lisp/tex-site /home/.../.config/emacs/elpa/cmake-mode-20240412.1329/cmake-mode hides /usr/share/emacs/site-lisp/cmake/cmake-mode /home/.../.config/emacs/elpa/auctex-14.0.4/auctex hides /usr/share/emacs/site-lisp/site-start.d/auctex /home/.../.config/emacs/elpa/transient-20240415.1548/transient hides /usr/share/emacs/29.3/lisp/transient /home/.../.config/emacs/elpa/jsonrpc-1.0.25/jsonrpc hides /usr/share/emacs/29.3/lisp/jsonrpc /home/.../.config/emacs/emacs.d/frame hides /usr/share/emacs/29.3/lisp/frame /home/.../.config/emacs/emacs.d/completion hides /usr/share/emacs/29.3/lisp/completion /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package hides /usr/share/emacs/29.3/lisp/use-package/use-package /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-ensure hides /usr/share/emacs/29.3/lisp/use-package/use-package-ensure /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-lint hides /usr/share/emacs/29.3/lisp/use-package/use-package-lint /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-delight hides /usr/share/emacs/29.3/lisp/use-package/use-package-delight /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-diminish hides /usr/share/emacs/29.3/lisp/use-package/use-package-diminish /home/.../.config/emacs/elpa/bind-key-20230203.2004/bind-key hides /usr/share/emacs/29.3/lisp/use-package/bind-key /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-bind-key hides /usr/share/emacs/29.3/lisp/use-package/use-package-bind-key /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-core hides /usr/share/emacs/29.3/lisp/use-package/use-package-core /home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-jump hides /usr/share/emacs/29.3/lisp/use-package/use-package-jump /home/.../.config/emacs/elpa/csharp-mode-20221126.2005/csharp-mode hides /usr/share/emacs/29.3/lisp/progmodes/csharp-mode /home/.../.config/emacs/elpa/eglot-1.17/eglot hides /usr/share/emacs/29.3/lisp/progmodes/eglot /home/.../.config/emacs/elpa/eldoc-1.15.0/eldoc hides /usr/share/emacs/29.3/lisp/emacs-lisp/eldoc Features: (shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums view treemacs-bookmarks treemacs-tags bookmark shortdoc smerge-mode help-fns radix-tree smex ido mule-util dabbrev yank-media markdown-mode edit-indirect noutline outline jka-compr vc-git vc-dispatcher flycheck-eglot eglot external-completion jsonrpc flymake-proc flymake diff ert pp ewoc debug backtrace dired-aux diredfl treemacs-icons-dired treemacs treemacs-header-line treemacs-compatibility treemacs-mode treemacs-interface treemacs-persistence treemacs-filewatch-mode filenotify treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-faces treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture inline hl-line ht treemacs-logging treemacs-customization treemacs-macros ffap tramp tramp-loaddefs trampver tramp-integration tramp-compat shell pcomplete parse-time iso8601 counsel dired-x dired dired-loaddefs compile swiper pulse flycheck-color-mode-line face-remap whitespace highlight-indent-guides doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core shrink-path f s dash nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon nerd-icons-data-pomicon nerd-icons-data-ipsicon server two-column git-gutter flycheck-pos-tip pos-tip astro-ts-mode css-mode smie eww xdg url-queue shr pixel-fill kinsoku url-file svg puny mm-url gnus nnheader gnus-util text-property-search time-date mail-utils range mm-util mail-prsvr typescript-ts-mode rjsx-mode js2-mode etags fileloop js c-ts-common cc-mode cc-fonts cc-guess cc-menus cc-cmds imenu finder-inf pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg esh-module esh-groups esh-util cc-styles cc-align cc-engine cc-vars cc-defs qmake-mode yasnippet corfu combobulate combobulate-json combobulate-yaml combobulate-css combobulate-js-ts combobulate-python combobulate-html combobulate-query derived savehist xref files-x scheme combobulate-ui transient format-spec combobulate-display combobulate-ztree combobulate-contrib combobulate-envelope combobulate-manipulation python project compat comint ansi-osc combobulate-navigation combobulate-misc combobulate-interface generator combobulate-rules combobulate-settings diff-mode tempo treesit-auto treesit flycheck-languagetool flycheck ansi-color find-func edmacro kmacro flyspell-lazy flyspell ispell undo-fu undo-fu-session column-marker multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-pop mc-edit-lines mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu dom thingatpt mc-cycle-cursors multiple-cursors-core advice comp comp-cstr warnings icons rect which-key ivy delsel ring ivy-faces ivy-overlay colir color recentf tree-widget wid-edit all-the-icons all-the-icons-faces data-material data-weathericons data-octicons data-fileicons data-faicons data-alltheicons fabrice-dark-theme cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish use-package-bind-key bind-key easy-mmode use-package-core preview-latex clang-rename clang-include-fixer let-alist clang-format xml auctex astro-ts-mode-autoloads async-autoloads auto-complete-autoloads cmake-mode-autoloads auctex-autoloads tex-site company-box-autoloads company-autoloads corfu-autoloads counsel-autoloads csv-mode-autoloads dap-mode-autoloads diredfl-autoloads dockerfile-mode-autoloads doom-modeline-autoloads anaphora-autoloads exec-path-from-shell-autoloads flycheck-eglot-autoloads eglot-autoloads flycheck-autoloads gcmh-autoloads ghub-autoloads git-gutter-autoloads graphql-mode-autoloads haskell-mode-autoloads helpful-autoloads elisp-refs-autoloads impatient-showdown-autoloads impatient-mode-autoloads htmlize-autoloads json-mode-autoloads jsonrpc-autoloads live-py-mode-autoloads lsp-docker-autoloads lsp-latex-autoloads consult-autoloads lsp-treemacs-autoloads lsp-ui-autoloads lsp-mode-autoloads eldoc-autoloads multiple-cursors-autoloads nerd-icons-autoloads nginx-mode-autoloads numpydoc-autoloads php-mode-autoloads poly-markdown-autoloads markdown-mode-autoloads pos-tip-autoloads protobuf-mode-autoloads pyimport-autoloads python-docstring-autoloads python-insert-docstring-autoloads f-autoloads smartparens-autoloads sphinx-doc-autoloads swift-mode-autoloads swiper-autoloads ivy-autoloads rx tempel-autoloads tree-sitter-langs-autoloads treemacs-all-the-icons-autoloads treemacs-evil-autoloads evil-autoloads goto-chg-autoloads treemacs-icons-dired-autoloads treemacs-magit-autoloads magit-autoloads pcase magit-section-autoloads git-commit-autoloads transient-autoloads treemacs-persp-autoloads treemacs-projectile-autoloads projectile-autoloads treemacs-tab-bar-autoloads treemacs-autoloads posframe-autoloads dash-autoloads treesit-auto-autoloads typescript-mode-autoloads undo-fu-autoloads undo-fu-session-autoloads edit-indirect-autoloads mmm-mode-autoloads web-mode-autoloads which-key-autoloads with-editor-autoloads info compat-autoloads ws-butler-autoloads xterm-color-autoloads yaml-mode-autoloads yasnippet-autoloads zettelkasten-autoloads package browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process native-compile emacs) Memory information: ((conses 16 1147620 125902) (symbols 48 41533 3) (strings 32 191964 10621) (string-bytes 1 6293942) (vectors 16 80207) (vector-slots 8 2129282 168825) (floats 8 1126 738) (intervals 56 51981 11176) (buffers 984 34)) --------------KFv7biMFF80Ly1oTOuQwf0cT Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit I observed many times indentation issues for modern Python 3.

For examples:
```
class Foo:
def __init__(self, ...):
self.foo = ... # TAB won't indent to pos+4
```

A workaround is sometimes to close and reopen the file.
Thus I suspect a wrong state.
But I don't found any explanation.

I am using Python mode with treesitter enabled but I think it is not yet used for indentation ???

---
In GNU Emacs 29.3 (build 1, x86_64-redhat-linux-gnu, GTK+ Version 3.24.41, cairo version 1.18.0) of
2024-03-25 built on 8d1efaa99cf549ff83f11657c3f4678a
Windowing system distributor 'The X.Org Foundation', version 11.0.12302006
System Description: Fedora Linux 39 (Workstation Edition)

Configured using:
'configure --build=x86_64-redhat-linux-gnu --host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin
--sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run
--sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-dbus --with-gif
--with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no
--with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json
--with-native-compilation=aot --with-tree-sitter --with-sqlite3 --with-webp --with-xinput2
build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu CC=gcc
'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
-pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3
-Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
LDFLAGS=-Wl,-z,relro PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++
'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON LIBOTF LIBSELINUX
LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND
SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM XWIDGETS GTK3
ZLIB

Important settings:
value of $LC_ALL: fr_FR.utf8
value of $LANG: fr_FR.utf8
locale-coding-system: utf-8-unix

Major mode: Python

Minor modes in effect:
global-flycheck-eglot-mode: t
flycheck-eglot-mode: t
eglot--managed-mode: t
treemacs-icons-dired-mode: t
treemacs-filewatch-mode: t
treemacs-follow-mode: t
treemacs-hide-gitignored-files-mode: t
treemacs-git-mode: t
treemacs-fringe-indicator-mode: always
shell-dirtrack-mode: t
flycheck-color-mode-line-mode: t
whitespace-mode: t
highlight-indent-guides-mode: t
doom-modeline-mode: t
server-mode: t
global-git-gutter-mode: t
git-gutter-mode: t
flycheck-pos-tip-mode: t
yas-global-mode: t
yas-minor-mode: t
global-corfu-mode: t
corfu-mode: t
global-treesit-auto-mode: t
global-flycheck-mode: t
flycheck-mode: t
flyspell-lazy-mode: t
undo-fu-session-global-mode: t
undo-fu-session-mode: t
which-key-mode: t
ivy-mode: t
recentf-mode: t
override-global-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t

Load-path shadows:
/home/.../.config/emacs/checkout/highlight-indent-guides/highlight-indent-guides hides /home/.../.config/emacs/elpa/highlight-indent-guides-20200820.2328/highlight-indent-guides
/home/.../.config/emacs/emacs.d/tree-sitter hides /home/.../.config/emacs/elpa/tree-sitter-20220212.1632/tree-sitter
/home/.../.config/emacs/elpa/auctex-14.0.4/tex-site hides /usr/share/emacs/site-lisp/tex-site
/home/.../.config/emacs/elpa/cmake-mode-20240412.1329/cmake-mode hides /usr/share/emacs/site-lisp/cmake/cmake-mode
/home/.../.config/emacs/elpa/auctex-14.0.4/auctex hides /usr/share/emacs/site-lisp/site-start.d/auctex
/home/.../.config/emacs/elpa/transient-20240415.1548/transient hides /usr/share/emacs/29.3/lisp/transient
/home/.../.config/emacs/elpa/jsonrpc-1.0.25/jsonrpc hides /usr/share/emacs/29.3/lisp/jsonrpc
/home/.../.config/emacs/emacs.d/frame hides /usr/share/emacs/29.3/lisp/frame
/home/.../.config/emacs/emacs.d/completion hides /usr/share/emacs/29.3/lisp/completion
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package hides /usr/share/emacs/29.3/lisp/use-package/use-package
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-ensure hides /usr/share/emacs/29.3/lisp/use-package/use-package-ensure
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-lint hides /usr/share/emacs/29.3/lisp/use-package/use-package-lint
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-delight hides /usr/share/emacs/29.3/lisp/use-package/use-package-delight
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-diminish hides /usr/share/emacs/29.3/lisp/use-package/use-package-diminish
/home/.../.config/emacs/elpa/bind-key-20230203.2004/bind-key hides /usr/share/emacs/29.3/lisp/use-package/bind-key
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-bind-key hides /usr/share/emacs/29.3/lisp/use-package/use-package-bind-key
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-core hides /usr/share/emacs/29.3/lisp/use-package/use-package-core
/home/.../.config/emacs/elpa/use-package-20230426.2324/use-package-jump hides /usr/share/emacs/29.3/lisp/use-package/use-package-jump
/home/.../.config/emacs/elpa/csharp-mode-20221126.2005/csharp-mode hides /usr/share/emacs/29.3/lisp/progmodes/csharp-mode
/home/.../.config/emacs/elpa/eglot-1.17/eglot hides /usr/share/emacs/29.3/lisp/progmodes/eglot
/home/.../.config/emacs/elpa/eldoc-1.15.0/eldoc hides /usr/share/emacs/29.3/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr emacsbug message rfc822 mml mml-sec epa epg rfc6068 epg-config mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums view treemacs-bookmarks treemacs-tags bookmark shortdoc smerge-mode help-fns radix-tree
smex ido mule-util dabbrev yank-media markdown-mode edit-indirect noutline outline jka-compr vc-git
vc-dispatcher flycheck-eglot eglot external-completion jsonrpc flymake-proc flymake diff ert pp ewoc
debug backtrace dired-aux diredfl treemacs-icons-dired treemacs treemacs-header-line
treemacs-compatibility treemacs-mode treemacs-interface treemacs-persistence treemacs-filewatch-mode
filenotify treemacs-follow-mode treemacs-rendering treemacs-annotations treemacs-async
treemacs-workspaces treemacs-dom treemacs-visuals treemacs-fringe-indicator treemacs-faces
treemacs-icons treemacs-scope treemacs-themes treemacs-core-utils pfuture inline hl-line ht
treemacs-logging treemacs-customization treemacs-macros ffap tramp tramp-loaddefs trampver
tramp-integration tramp-compat shell pcomplete parse-time iso8601 counsel dired-x dired
dired-loaddefs compile swiper pulse flycheck-color-mode-line face-remap whitespace
highlight-indent-guides doom-modeline doom-modeline-segments doom-modeline-env doom-modeline-core
shrink-path f s dash nerd-icons nerd-icons-faces nerd-icons-data nerd-icons-data-mdicon
nerd-icons-data-flicon nerd-icons-data-codicon nerd-icons-data-devicon nerd-icons-data-sucicon
nerd-icons-data-wicon nerd-icons-data-faicon nerd-icons-data-powerline nerd-icons-data-octicon
nerd-icons-data-pomicon nerd-icons-data-ipsicon server two-column git-gutter flycheck-pos-tip
pos-tip astro-ts-mode css-mode smie eww xdg url-queue shr pixel-fill kinsoku url-file svg puny
mm-url gnus nnheader gnus-util text-property-search time-date mail-utils range mm-util mail-prsvr
typescript-ts-mode rjsx-mode js2-mode etags fileloop js c-ts-common cc-mode cc-fonts cc-guess
cc-menus cc-cmds imenu finder-inf pyvenv eshell esh-cmd esh-ext esh-opt esh-proc esh-io esh-arg
esh-module esh-groups esh-util cc-styles cc-align cc-engine cc-vars cc-defs qmake-mode yasnippet
corfu combobulate combobulate-json combobulate-yaml combobulate-css combobulate-js-ts
combobulate-python combobulate-html combobulate-query derived savehist xref files-x scheme
combobulate-ui transient format-spec combobulate-display combobulate-ztree combobulate-contrib
combobulate-envelope combobulate-manipulation python project compat comint ansi-osc
combobulate-navigation combobulate-misc combobulate-interface generator combobulate-rules
combobulate-settings diff-mode tempo treesit-auto treesit flycheck-languagetool flycheck ansi-color
find-func edmacro kmacro flyspell-lazy flyspell ispell undo-fu undo-fu-session column-marker
multiple-cursors mc-separate-operations rectangular-region-mode mc-mark-pop mc-edit-lines
mc-hide-unmatched-lines-mode mc-mark-more sgml-mode facemenu dom thingatpt mc-cycle-cursors
multiple-cursors-core advice comp comp-cstr warnings icons rect which-key ivy delsel ring ivy-faces
ivy-overlay colir color recentf tree-widget wid-edit all-the-icons all-the-icons-faces data-material
data-weathericons data-octicons data-fileicons data-faicons data-alltheicons fabrice-dark-theme
cl-extra help-mode use-package use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core preview-latex clang-rename
clang-include-fixer let-alist clang-format xml auctex astro-ts-mode-autoloads async-autoloads
auto-complete-autoloads cmake-mode-autoloads auctex-autoloads tex-site company-box-autoloads
company-autoloads corfu-autoloads counsel-autoloads csv-mode-autoloads dap-mode-autoloads
diredfl-autoloads dockerfile-mode-autoloads doom-modeline-autoloads anaphora-autoloads
exec-path-from-shell-autoloads flycheck-eglot-autoloads eglot-autoloads flycheck-autoloads
gcmh-autoloads ghub-autoloads git-gutter-autoloads graphql-mode-autoloads haskell-mode-autoloads
helpful-autoloads elisp-refs-autoloads impatient-showdown-autoloads impatient-mode-autoloads
htmlize-autoloads json-mode-autoloads jsonrpc-autoloads live-py-mode-autoloads lsp-docker-autoloads
lsp-latex-autoloads consult-autoloads lsp-treemacs-autoloads lsp-ui-autoloads lsp-mode-autoloads
eldoc-autoloads multiple-cursors-autoloads nerd-icons-autoloads nginx-mode-autoloads
numpydoc-autoloads php-mode-autoloads poly-markdown-autoloads markdown-mode-autoloads
pos-tip-autoloads protobuf-mode-autoloads pyimport-autoloads python-docstring-autoloads
python-insert-docstring-autoloads f-autoloads smartparens-autoloads sphinx-doc-autoloads
swift-mode-autoloads swiper-autoloads ivy-autoloads rx tempel-autoloads tree-sitter-langs-autoloads
treemacs-all-the-icons-autoloads treemacs-evil-autoloads evil-autoloads goto-chg-autoloads
treemacs-icons-dired-autoloads treemacs-magit-autoloads magit-autoloads pcase
magit-section-autoloads git-commit-autoloads transient-autoloads treemacs-persp-autoloads
treemacs-projectile-autoloads projectile-autoloads treemacs-tab-bar-autoloads treemacs-autoloads
posframe-autoloads dash-autoloads treesit-auto-autoloads typescript-mode-autoloads undo-fu-autoloads
undo-fu-session-autoloads edit-indirect-autoloads mmm-mode-autoloads web-mode-autoloads
which-key-autoloads with-editor-autoloads info compat-autoloads ws-butler-autoloads
xterm-color-autoloads yaml-mode-autoloads yasnippet-autoloads zettelkasten-autoloads package
browse-url url url-proxy url-privacy url-expand url-methods url-history url-cookie
generate-lisp-file url-domsuf url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp byte-compile url-vars
cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks
lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page
tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock
syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian
philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese
eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray
oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads xwidget-internal dbusbind inotify dynamic-setting
system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty
make-network-process native-compile emacs)

Memory information:
((conses 16 1147620 125902)
(symbols 48 41533 3)
(strings 32 191964 10621)
(string-bytes 1 6293942)
(vectors 16 80207)
(vector-slots 8 2129282 168825)
(floats 8 1126 738)
(intervals 56 51981 11176)
(buffers 984 34))

--------------KFv7biMFF80Ly1oTOuQwf0cT--