Refactor code structure for improved readability and maintainability
This commit is contained in:
parent
389d72a136
commit
aa4c067ea8
1685 changed files with 393439 additions and 71932 deletions
15
.venv_codegen/Lib/site-packages/black/schema.py
Normal file
15
.venv_codegen/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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue