diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2023-02-26 20:14:00 -0500 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2023-02-27 13:28:32 -0500 |
commit | 116e3492f2945d46db44d921f0b5eb03c58d5c93 (patch) | |
tree | 8c709212c7658170414c503b009a7991fae6d56a /gdb/gdbcopyright.py | |
parent | 05e4e893736c870ad5d2fd4e7ea8d95a94cdff3c (diff) | |
download | gdb-116e3492f2945d46db44d921f0b5eb03c58d5c93.zip gdb-116e3492f2945d46db44d921f0b5eb03c58d5c93.tar.gz gdb-116e3492f2945d46db44d921f0b5eb03c58d5c93.tar.bz2 |
gdb: gdbarch*.py, copyright.py: add type annotations
Add type annotations to gdbarch*.py to fix all errors shown by pyright.
There is one change in copyright.py too, to fix this one:
/home/simark/src/binutils-gdb/gdb/gdbarch.py
/home/simark/src/binutils-gdb/gdb/gdbarch.py:206:13 - error: Type of "copyright" is partially unknown
Type of "copyright" is "(tool: Unknown, description: Unknown) -> str" (reportUnknownMemberType)
Change-Id: Ia109b53e267f6e2f5bd79a1288d0d5c9508c9ac4
Reviewed-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Andrew Burgess <aburgess@redhat.com>
Diffstat (limited to 'gdb/gdbcopyright.py')
-rw-r--r-- | gdb/gdbcopyright.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbcopyright.py b/gdb/gdbcopyright.py index e87ce0d..4e27356 100644 --- a/gdb/gdbcopyright.py +++ b/gdb/gdbcopyright.py @@ -18,7 +18,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. -def copyright(tool, description): +def copyright(tool: str, description: str): # Search the tool source itself for the correct copyright years. with open(tool, "r") as f: for line in f: |