mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Initial commit
This commit is contained in:
15
venv/Lib/site-packages/black/schema.py
Normal file
15
venv/Lib/site-packages/black/schema.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import importlib.resources
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
|
||||
def get_schema(tool_name: str = "black") -> Any:
|
||||
"""Get the stored complete schema for black's settings."""
|
||||
assert tool_name == "black", "Only black is supported."
|
||||
|
||||
pkg = "black.resources"
|
||||
fname = "black.schema.json"
|
||||
|
||||
schema = importlib.resources.files(pkg).joinpath(fname)
|
||||
with schema.open(encoding="utf-8") as f:
|
||||
return json.load(f)
|
Reference in New Issue
Block a user