Skip to content

Commit 474b785

Browse files
committed
Fix emoji path
1 parent da28041 commit 474b785

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,4 @@ output/
2424
examples/1D-ARC/
2525
examples/data/
2626
site/
27+
.cache/

src/cax/utils/emoji.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ def get_emoji(emoji: str) -> Image:
4040
"""
4141
# Get the emoji image
4242
code = hex(ord(emoji))[2:].lower()
43-
url = f"https://github.com/googlefonts/noto-emoji/blob/main/png/128/emoji_u{code}.png?raw=true"
43+
url = f"https://raw.githubusercontent.com/googlefonts/noto-emoji/refs/heads/main/png/128/emoji_u{code}.png"
4444
image_pil = get_image_from_url(url)
4545
return image_pil

tests/test_utils/test_emoji.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_get_emoji(emoji: str, mock_urlopen: MagicMock, mock_pil_image: MagicMoc
6363

6464
result = get_emoji(emoji)
6565

66-
expected_url = f"https://github.com/googlefonts/noto-emoji/blob/main/png/128/emoji_u{hex(ord(emoji))[2:].lower()}.png?raw=true"
66+
expected_url = f"https://raw.githubusercontent.com/googlefonts/noto-emoji/refs/heads/main/png/128/emoji_u{hex(ord(emoji))[2:].lower()}.png"
6767
mock_urlopen.assert_called_once_with(expected_url)
6868

6969
# Check that PIL.Image.open was called correctly (it's called inside get_image_from_url)

0 commit comments

Comments
 (0)