Skip to content

[meta] update pre-commit #270

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ default_language_version:
python: python3.11
repos:
- repo: https://github.com/psf/black
rev: 24.8.0
rev: 25.1.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 6.0.1
hooks:
- id: isort
ci:
Expand Down
6 changes: 3 additions & 3 deletions smmdata/smmdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
_ = Translator("SMMData", __file__)

BOOKMARKS_ICON_URL = f"{SMMB_BASE_URL}/assets/favicon/icon76-08f927f066250b84f628e92e0b94f58d.png"
EMBED_EMPTY_VALUE = "\N{Invisible Separator}"
EMBED_EMPTY_VALUE = "\N{INVISIBLE SEPARATOR}"


@cog_i18n(_)
Expand Down Expand Up @@ -54,8 +54,8 @@ async def level(self, ctx, lvl: Level):
url=lvl.url,
)
embed.add_field(name=_("Game Style"), value=lvl.gameskin, inline=False)
embed.add_field(name="\N{White Medium Star} " + _("Stars"), value=lvl.stars)
embed.add_field(name="\N{Footprints} " + _("Unique Players"), value=lvl.players)
embed.add_field(name="\N{WHITE MEDIUM STAR} " + _("Stars"), value=lvl.stars)
embed.add_field(name="\N{FOOTPRINTS} " + _("Unique Players"), value=lvl.players)
embed.add_field(name=_("Share count"), value=lvl.shares)
embed.add_field(name=_("Clears"), value=f"{lvl.clears}/{lvl.attempts} ({lvl.clear_rate}%)")
if lvl.first_clear_name:
Expand Down
40 changes: 20 additions & 20 deletions weather/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,20 @@
]

WEATHER_STATES = {
"clear-day": "\N{Black Sun with Rays}",
"clear-night": "\N{Night with Stars}",
"rain": "\N{Cloud with Rain}",
"snow": "\N{Cloud with Snow}",
"sleet": "\N{Snowflake}",
"wind": "\N{Wind Blowing Face}",
"fog": "\N{Foggy}",
"cloudy": "\N{White Sun Behind Cloud}",
"partly-cloudy-day": "\N{White Sun with Small Cloud}",
"partly-cloudy-night": "\N{Night with Stars}",
"clear-day": "\N{BLACK SUN WITH RAYS}",
"clear-night": "\N{NIGHT WITH STARS}",
"rain": "\N{CLOUD WITH RAIN}",
"snow": "\N{CLOUD WITH SNOW}",
"sleet": "\N{SNOWFLAKE}",
"wind": "\N{WIND BLOWING FACE}",
"fog": "\N{FOGGY}",
"cloudy": "\N{WHITE SUN BEHIND CLOUD}",
"partly-cloudy-day": "\N{WHITE SUN WITH SMALL CLOUD}",
"partly-cloudy-night": "\N{NIGHT WITH STARS}",
}

# Emoji that will be used for "unknown" strings
UNKNOWN_EMOJI = "\N{White Question Mark Ornament}"
UNKNOWN_EMOJI = "\N{WHITE QUESTION MARK ORNAMENT}"

T_ = Translator("Weather", __file__)
_ = lambda s: s
Expand Down Expand Up @@ -587,21 +587,21 @@ async def wind_bearing_direction(self, bearing: int):
async def num_to_moon(self, moonphase: float) -> str:
"""Converts lunation number to lunar phase emoji"""
if moonphase == 0:
return "\N{New Moon Symbol}"
return "\N{NEW MOON SYMBOL}"
if 0 < moonphase < 0.25:
return "\N{Waxing Crescent Moon Symbol}"
return "\N{WAXING CRESCENT MOON SYMBOL}"
if moonphase == 0.25:
return "\N{First Quarter Moon Symbol}"
return "\N{FIRST QUARTER MOON SYMBOL}"
if 0.25 < moonphase < 0.5:
return "\N{Waxing Gibbous Moon Symbol}"
return "\N{WAXING GIBBOUS MOON SYMBOL}"
if moonphase == 0.5:
return "\N{First Quarter Moon Symbol}"
return "\N{FIRST QUARTER MOON SYMBOL}"
if 0.5 < moonphase < 0.75:
return "\N{Waning Gibbous Moon Symbol}"
return "\N{WANING GIBBOUS MOON SYMBOL}"
if moonphase == 0.75:
return "\N{Last Quarter Moon Symbol}"
return "\N{LAST QUARTER MOON SYMBOL}"
if 0.75 < moonphase < 1:
return "\N{Waning Crescent Moon Symbol}"
return "\N{WANING CRESCENT MOON SYMBOL}"
if moonphase == 1:
return "\N{Full Moon Symbol}"
return "\N{FULL MOON SYMBOL}"
return str(moonphase)
Loading