From 1432b5d1a2c581ab644f8869041551a465dd6609 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 30 Sep 2023 15:35:10 +0200 Subject: [PATCH] generator: fix some type annotations --- rust2rpm/generator.py | 4 ++-- rust2rpm/metadata.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust2rpm/generator.py b/rust2rpm/generator.py index 11f3c5e..5da8d91 100644 --- a/rust2rpm/generator.py +++ b/rust2rpm/generator.py @@ -107,7 +107,7 @@ def spec_render_crate( rpmautospec: bool, auto_changelog_entry: bool, date: Optional[time.struct_time] = None, - packager: str, + packager: Optional[str], ): template = spec_file_template("crate.spec") @@ -268,7 +268,7 @@ def spec_render_workspace( rpmautospec: bool, auto_changelog_entry: bool, date: Optional[time.struct_time] = None, - packager: str, + packager: Optional[str], ) -> str: template = spec_file_template("workspace.spec") diff --git a/rust2rpm/metadata.py b/rust2rpm/metadata.py index 044c77e..466a916 100644 --- a/rust2rpm/metadata.py +++ b/rust2rpm/metadata.py @@ -72,7 +72,7 @@ def guess_main_package(metadata: Metadata, hint: Optional[str] = None, interacti def package_uses_rust_1_60_feature_syntax(features: dict[str, list[str]]) -> bool: - for (name, deps) in features.items(): + for name, deps in features.items(): for dep in deps: if "?/" in dep: return True