]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb: make typing strict in gdb/copyright.py
authorSimon Marchi <simon.marchi@efficios.com>
Fri, 11 Apr 2025 15:08:05 +0000 (11:08 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 17 Apr 2025 03:11:02 +0000 (23:11 -0400)
commit2c00b2fbb88b10cb22dfe3bc737368c9f488c70d
treea94f8cd01aef31b23106918b2ef48c1eb22c9880
parent62e213a4fbc75bb36d5ee861aa453aabf2b14f88
gdb: make typing strict in gdb/copyright.py

Add `pyright: strict` at the top of the file, then adjust the fallouts.
This annotation is understood by pyright, and thus any IDE using pyright
behind the scenes (VSCode and probably others).

I presume that any GDB developer running this script is using a recent
enough version of Python, so specify the type annotations using the
actual types when possible (e.g. `list[str]` instead of
`typing.List[str]`).  I believe this required Python 3.9.

Change-Id: I3698e28555e236a03126d4cd010dae4b5647ce48
Reviewed-By: Guinevere Larsen <guinevere@redhat.com>
gdb/copyright.py