File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 22Contains the main functionality of the JSONSchemaLexer.
33"""
44
5+ from __future__ import annotations
6+
57from importlib .resources import files
68from pathlib import Path
7- from typing import Any , ClassVar
9+ from typing import TYPE_CHECKING
810import json
911
1012from pygments .lexers .data import ( # type: ignore[reportMissingTypeStubs]
1113 JsonLexer ,
1214)
1315from pygments .token import Token
1416
17+ if TYPE_CHECKING :
18+ from collections .abc import Sequence
19+ from typing import Any , ClassVar
20+
1521
1622class JSONSchemaLexer (JsonLexer ):
1723 """
@@ -20,13 +26,13 @@ class JSONSchemaLexer(JsonLexer):
2026
2127 name = "JSON Schema"
2228 url = "https://json-schema.org"
23- aliases : ClassVar [ list [ str ] ] = ["jsonschema" , "json-schema" ]
24- mimetypes : ClassVar [ list [ str ] ] = [
29+ aliases : Sequence [ str ] = ["jsonschema" , "json-schema" ]
30+ mimetypes : Sequence [ str ] = [
2531 "application/schema+json" ,
2632 "application/schema-instance+json" ,
2733 ]
2834
29- data_types : ClassVar [list [str ]] = [
35+ data_types : ClassVar [Sequence [str ]] = [
3036 '"object"' ,
3137 '"integer"' ,
3238 '"string"' ,
You can’t perform that action at this time.
0 commit comments