diff options
author | 2023-05-06 16:12:32 +0100 | |
---|---|---|
committer | 2023-05-09 15:41:50 +0100 | |
commit | 613840ebcf303e84048d48ace37fb001c1afe687 (patch) | |
tree | 9acaf0bae0527fe8389483a419b44e06997ca060 /bot/exts/avatar_modification/_effects.py | |
parent | Migrate to ruff (diff) |
Apply fixes for ruff linting
Co-authored-by: wookie184 <[email protected]>
Co-authored-by: Amrou Bellalouna <[email protected]>
Diffstat (limited to 'bot/exts/avatar_modification/_effects.py')
-rw-r--r-- | bot/exts/avatar_modification/_effects.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/avatar_modification/_effects.py b/bot/exts/avatar_modification/_effects.py index f1c2e6d1..fcc62ebb 100644 --- a/bot/exts/avatar_modification/_effects.py +++ b/bot/exts/avatar_modification/_effects.py @@ -1,8 +1,8 @@ import math import random +from collections.abc import Callable from io import BytesIO from pathlib import Path -from typing import Callable, Optional import discord from PIL import Image, ImageDraw, ImageOps @@ -55,7 +55,7 @@ class PfpEffects: @staticmethod def crop_avatar_circle(avatar: Image.Image) -> Image.Image: - """This crops the avatar given into a circle.""" + """Crop the avatar given into a circle.""" mask = Image.new("L", avatar.size, 0) draw = ImageDraw.Draw(mask) draw.ellipse((0, 0) + avatar.size, fill=255) @@ -64,7 +64,7 @@ class PfpEffects: @staticmethod def crop_ring(ring: Image.Image, px: int) -> Image.Image: - """This crops the given ring into a circle.""" + """Crop the given ring into a circle.""" mask = Image.new("L", ring.size, 0) draw = ImageDraw.Draw(mask) draw.ellipse((0, 0) + ring.size, fill=255) @@ -108,7 +108,7 @@ class PfpEffects: return image @staticmethod - def easterify_effect(image: Image.Image, overlay_image: Optional[Image.Image] = None) -> Image.Image: + def easterify_effect(image: Image.Image, overlay_image: Image.Image | None = None) -> Image.Image: """ Applies the easter effect to the given image. |