Merge pull request #7989 from radarhere/typehints_imagecms

Removed type hint ignores
This commit is contained in:
Hugo van Kemenade 2024-04-22 07:42:21 +03:00 committed by GitHub
commit 492c726350
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -838,8 +838,8 @@ def getProfileName(profile: _CmsProfileCompatible) -> str:
if not (model or manufacturer):
return (profile.profile.profile_description or "") + "\n"
if not manufacturer or len(model) > 30: # type: ignore[arg-type]
return model + "\n" # type: ignore[operator]
if not manufacturer or (model and len(model) > 30):
return f"{model}\n"
return f"{model} - {manufacturer}\n"
except (AttributeError, OSError, TypeError, ValueError) as v: