From aa1b4a4a2fc8280794a02d32d1555ae366520113 Mon Sep 17 00:00:00 2001 From: Benjamin Drung Date: Wed, 4 Mar 2026 22:10:16 +0100 Subject: [PATCH] setup.py: specify type of data_files mypy comlains: ``` mypy... setup.py:98: error: Argument "data_files" to "setup" has incompatible type "list[tuple[str, list[str]]]"; expected "list[tuple[str, Sequence[str]]] | None" [arg-type] setup.py:98: note: "list" is invariant -- see https://mypy.readthedocs.io/en/stable/common_issues.html#variance setup.py:98: note: Consider using "Sequence" instead, which is covariant ``` Closes: #1127543 LP: #2143232 --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 5f983be..48b91d9 100755 --- a/setup.py +++ b/setup.py @@ -3,6 +3,7 @@ import glob import pathlib import re +from collections.abc import Sequence from setuptools import setup @@ -76,7 +77,7 @@ scripts = [ "ubuntu-upload-permission", "update-maintainer", ] -data_files = [ +data_files: list[tuple[str, Sequence[str]]] = [ ("share/bash-completion/completions", glob.glob("bash_completion/*")), ("share/man/man1", glob.glob("doc/*.1")), ("share/man/man5", glob.glob("doc/*.5")),