mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-11 16:52:29 +03:00
Renamed parameter
This commit is contained in:
parent
54421b5f56
commit
f76f64a187
|
@ -272,18 +272,18 @@ class ImageCmsProfile:
|
|||
msg = "Invalid type for Profile" # type: ignore[unreachable]
|
||||
raise TypeError(msg)
|
||||
|
||||
def __getattr__(self, attr: str) -> Any:
|
||||
if attr in ("product_name", "product_info"):
|
||||
def __getattr__(self, name: str) -> Any:
|
||||
if name in ("product_name", "product_info"):
|
||||
deprecate(
|
||||
f"ImageCms.ImageCmsProfile.{attr}",
|
||||
f"ImageCms.ImageCmsProfile.{name}",
|
||||
13,
|
||||
action=(
|
||||
f"Use ImageCms.ImageCmsProfile.profile.{attr} instead. "
|
||||
f"Note that {attr} has been set to 'None' since Pillow 2.3.0."
|
||||
f"Use ImageCms.ImageCmsProfile.profile.{name} instead. "
|
||||
f"Note that {name} has been set to 'None' since Pillow 2.3.0."
|
||||
),
|
||||
)
|
||||
return None
|
||||
msg = f"'{self.__class__.__name__}' has no attribute '{attr}'"
|
||||
msg = f"'{self.__class__.__name__}' has no attribute '{name}'"
|
||||
raise AttributeError(msg)
|
||||
|
||||
def _set(self, profile: core.CmsProfile, filename: str | None = None) -> None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user