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]
|
msg = "Invalid type for Profile" # type: ignore[unreachable]
|
||||||
raise TypeError(msg)
|
raise TypeError(msg)
|
||||||
|
|
||||||
def __getattr__(self, attr: str) -> Any:
|
def __getattr__(self, name: str) -> Any:
|
||||||
if attr in ("product_name", "product_info"):
|
if name in ("product_name", "product_info"):
|
||||||
deprecate(
|
deprecate(
|
||||||
f"ImageCms.ImageCmsProfile.{attr}",
|
f"ImageCms.ImageCmsProfile.{name}",
|
||||||
13,
|
13,
|
||||||
action=(
|
action=(
|
||||||
f"Use ImageCms.ImageCmsProfile.profile.{attr} instead. "
|
f"Use ImageCms.ImageCmsProfile.profile.{name} instead. "
|
||||||
f"Note that {attr} has been set to 'None' since Pillow 2.3.0."
|
f"Note that {name} has been set to 'None' since Pillow 2.3.0."
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
return None
|
return None
|
||||||
msg = f"'{self.__class__.__name__}' has no attribute '{attr}'"
|
msg = f"'{self.__class__.__name__}' has no attribute '{name}'"
|
||||||
raise AttributeError(msg)
|
raise AttributeError(msg)
|
||||||
|
|
||||||
def _set(self, profile: core.CmsProfile, filename: str | None = None) -> None:
|
def _set(self, profile: core.CmsProfile, filename: str | None = None) -> None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user