mirror of
https://github.com/catppuccin/python.git
synced 2026-02-04 20:07:47 +08:00
This brings us closer to a single source of truth being the Catppuccin palette json. This fixture can be also now be used for auto-generating the library code which is planned in #2.
16 lines
403 B
Python
16 lines
403 B
Python
import json
|
|
from typing import Dict
|
|
from urllib.request import urlopen
|
|
|
|
import pytest
|
|
|
|
ColourJSON = Dict[str, str]
|
|
FlavourJSON = Dict[str, ColourJSON]
|
|
PaletteJSON = Dict[str, FlavourJSON]
|
|
|
|
|
|
@pytest.fixture
|
|
def palette_json() -> PaletteJSON:
|
|
url = "https://raw.githubusercontent.com/catppuccin/palette/ec883a880bc24d43a01c78e7d9602abf6b1780dd/palette.json"
|
|
return json.loads(urlopen(url).read())
|