Skip to content

Commit f853830

Browse files
authored
Merge pull request #6455 from dev-hato/update_puremagic_3
puremagicアップデート
2 parents 9826072 + 3e0a843 commit f853830

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

plugins/hato.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,12 @@ def earth_quake(client: BaseClient):
182182
map_img.save(map_file, format="PNG")
183183

184184
filename = ["map"]
185-
ext = puremagic.what(map_file.name)
185+
ext = puremagic.from_file(map_file.name)
186186

187187
if ext:
188188
filename.append(ext)
189189

190-
client.upload(
191-
file=map_file.name, filename=os.path.extsep.join(filename)
192-
)
190+
client.upload(file=map_file.name, filename="".join(filename))
193191

194192

195193
@action("textlint")
@@ -282,14 +280,12 @@ def amesh(client: BaseClient, place: str):
282280
amesh_img.save(weather_map_file, format="PNG")
283281

284282
filename = ["amesh"]
285-
ext = puremagic.what(weather_map_file.name)
283+
ext = puremagic.from_file(weather_map_file.name)
286284

287285
if ext:
288286
filename.append(ext)
289287

290-
client.upload(
291-
file=weather_map_file.name, filename=os.path.extsep.join(filename)
292-
)
288+
client.upload(file=weather_map_file.name, filename="".join(filename))
293289

294290

295291
@action("amedas", with_client=True)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ dependencies = [
2121
"markupsafe==3.0.3",
2222
"numpy==2.2.6",
2323
"emoji==2.15.0",
24-
"puremagic==1.30",
24+
"puremagic==2.0.0",
2525
"audioop-lts==0.2.2",
2626
"psycopg[binary,pool]==3.3.3",
2727
"sudden-death==0.0.1",

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)