linkml 1.9.0rc1__tar.gz → 1.9.1rc3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (163) hide show
  1. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/PKG-INFO +6 -9
  2. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/build.py +1 -7
  3. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/ifabsent_processor.py +20 -20
  4. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/lifecycle.py +2 -1
  5. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/naming.py +1 -1
  6. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/template.py +5 -5
  7. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/type_designators.py +1 -3
  8. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/csvgen.py +3 -3
  9. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen.py +20 -25
  10. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/dotgen.py +4 -4
  11. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/erdiagramgen.py +7 -7
  12. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/excelgen.py +2 -3
  13. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/golanggen.py +2 -2
  14. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/golrgen.py +3 -3
  15. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/jsonldcontextgen.py +4 -4
  16. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/jsonschemagen.py +5 -5
  17. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/markdowngen.py +8 -10
  18. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/mermaidclassdiagramgen.py +2 -2
  19. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/oocodegen.py +10 -10
  20. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/owlgen.py +19 -18
  21. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/plantumlgen.py +15 -15
  22. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/prefixmapgen.py +5 -5
  23. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/projectgen.py +10 -10
  24. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/array.py +15 -21
  25. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/build.py +4 -4
  26. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/includes.py +1 -1
  27. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/pydanticgen.py +24 -28
  28. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/template.py +36 -36
  29. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pythongen.py +21 -29
  30. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/rdfgen.py +2 -2
  31. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/shaclgen.py +9 -9
  32. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/shexgen.py +3 -3
  33. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sparqlgen.py +3 -3
  34. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sqlalchemygen.py +2 -2
  35. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/terminusdbgen.py +2 -3
  36. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/typescriptgen.py +3 -3
  37. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/yumlgen.py +13 -13
  38. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/cli.py +1 -1
  39. linkml-1.9.1rc3/linkml/linter/config/datamodel/config.py +469 -0
  40. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/config/datamodel/config.yaml +51 -3
  41. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/config/default.yaml +3 -0
  42. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/markdown_formatter.py +2 -2
  43. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/linter.py +4 -3
  44. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/rules.py +38 -19
  45. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/reporting/model.py +11 -15
  46. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/transformers/logical_model_transformer.py +9 -8
  47. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/transformers/relmodel_transformer.py +6 -6
  48. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/transformers/schema_renamer.py +2 -2
  49. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/converter.py +1 -1
  50. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/deprecation.py +3 -3
  51. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/execute_tutorial.py +5 -6
  52. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/generator.py +17 -16
  53. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/helpers.py +2 -2
  54. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/logictools.py +5 -4
  55. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/mergeutils.py +51 -5
  56. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/schema_builder.py +8 -8
  57. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/schema_fixer.py +8 -8
  58. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/schemaloader.py +16 -15
  59. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/schemasynopsis.py +29 -29
  60. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/sqlutils.py +5 -5
  61. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/typereferences.py +5 -6
  62. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/validation.py +2 -2
  63. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/cli.py +7 -6
  64. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/delimited_file_loader.py +2 -1
  65. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/json_loader.py +2 -1
  66. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/loader.py +2 -1
  67. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/passthrough_loader.py +2 -1
  68. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/yaml_loader.py +2 -1
  69. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/jsonschema_validation_plugin.py +2 -1
  70. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/pydantic_validation_plugin.py +2 -1
  71. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/recommended_slots_plugin.py +3 -2
  72. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/shacl_validation_plugin.py +2 -1
  73. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/validation_plugin.py +1 -1
  74. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/report.py +3 -3
  75. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/validator.py +3 -2
  76. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validators/jsonschemavalidator.py +6 -5
  77. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/workspaces/datamodel/workspaces.py +21 -26
  78. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/workspaces/example_runner.py +7 -6
  79. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/pyproject.toml +14 -8
  80. linkml-1.9.0rc1/linkml/linter/config/datamodel/config.py +0 -475
  81. linkml-1.9.0rc1/setup.py +0 -141
  82. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/LICENSE +0 -0
  83. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/README.md +0 -0
  84. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/__init__.py +0 -0
  85. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/_version.py +0 -0
  86. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/cli/__init__.py +0 -0
  87. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/cli/__main__.py +0 -0
  88. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/cli/main.py +0 -0
  89. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/PythonGenNotes.md +0 -0
  90. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/README.md +0 -0
  91. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/__init__.py +0 -0
  92. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/common/__init__.py +0 -0
  93. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/dbmlgen.py +0 -0
  94. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/class.md.jinja2 +0 -0
  95. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/class_diagram.md.jinja2 +0 -0
  96. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/common_metadata.md.jinja2 +0 -0
  97. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/enum.md.jinja2 +0 -0
  98. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/index.md.jinja2 +0 -0
  99. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/index.tex.jinja2 +0 -0
  100. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/schema.md.jinja2 +0 -0
  101. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/slot.md.jinja2 +0 -0
  102. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/subset.md.jinja2 +0 -0
  103. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/docgen/type.md.jinja2 +0 -0
  104. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/graphqlgen.py +0 -0
  105. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/javagen/example_template.java.jinja2 +0 -0
  106. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/javagen/java_record_template.jinja2 +0 -0
  107. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/javagen.py +0 -0
  108. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/jsonldgen.py +0 -0
  109. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/legacy/__init__.py +0 -0
  110. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/linkmlgen.py +0 -0
  111. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/namespacegen.py +0 -0
  112. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/protogen.py +0 -0
  113. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/__init__.py +0 -0
  114. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/black.py +0 -0
  115. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/attribute.py.jinja +0 -0
  116. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/base_model.py.jinja +0 -0
  117. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/class.py.jinja +0 -0
  118. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/conditional_import.py.jinja +0 -0
  119. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/enum.py.jinja +0 -0
  120. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/footer.py.jinja +0 -0
  121. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/imports.py.jinja +0 -0
  122. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/module.py.jinja +0 -0
  123. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/pydanticgen/templates/validator.py.jinja +0 -0
  124. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/python/__init__.py +0 -0
  125. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/python/python_ifabsent_processor.py +0 -0
  126. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/shacl/__init__.py +0 -0
  127. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/shacl/shacl_data_type.py +0 -0
  128. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/shacl/shacl_ifabsent_processor.py +0 -0
  129. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sqlalchemy/__init__.py +0 -0
  130. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sqlalchemy/sqlalchemy_declarative_template.py +0 -0
  131. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sqlalchemy/sqlalchemy_imperative_template.py +0 -0
  132. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sqltablegen.py +0 -0
  133. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/sssomgen.py +0 -0
  134. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/string_template.md +0 -0
  135. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/summarygen.py +0 -0
  136. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/generators/yamlgen.py +0 -0
  137. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/__init__.py +0 -0
  138. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/config/datamodel/.linkmllint.yaml +0 -0
  139. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/config/datamodel/__init__.py +0 -0
  140. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/config/recommended.yaml +0 -0
  141. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/__init__.py +0 -0
  142. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/formatter.py +0 -0
  143. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/json_formatter.py +0 -0
  144. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/terminal_formatter.py +0 -0
  145. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/linter/formatters/tsv_formatter.py +0 -0
  146. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/reporting/__init__.py +0 -0
  147. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/transformers/__init__.py +0 -0
  148. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/transformers/model_transformer.py +0 -0
  149. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/__init__.py +0 -0
  150. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/cli_utils.py +0 -0
  151. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/datautils.py +0 -0
  152. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/datavalidator.py +0 -0
  153. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/exceptions.py +0 -0
  154. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/utils/rawloader.py +0 -0
  155. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/__init__.py +0 -0
  156. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/loaders/__init__.py +0 -0
  157. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/plugins/__init__.py +0 -0
  158. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validator/validation_context.py +0 -0
  159. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validators/__init__.py +0 -0
  160. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/validators/sparqlvalidator.py +0 -0
  161. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/workspaces/__init__.py +0 -0
  162. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/workspaces/datamodel/__init__.py +0 -0
  163. {linkml-1.9.0rc1 → linkml-1.9.1rc3}/linkml/workspaces/datamodel/workspaces.yaml +0 -0
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: linkml
3
- Version: 1.9.0rc1
3
+ Version: 1.9.1rc3
4
4
  Summary: Linked Open Data Modeling Language
5
5
  Home-page: https://linkml.io/linkml/
6
6
  Keywords: schema,linked data,data modeling,rdf,owl,biolink
7
7
  Author: Chris Mungall
8
8
  Author-email: cjmungall@lbl.gov
9
- Requires-Python: >=3.8.1,<4.0.0
9
+ Requires-Python: >=3.9.0,<4.0.0
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
12
12
  Classifier: Intended Audience :: Developers
@@ -17,11 +17,9 @@ Classifier: Programming Language :: Python :: 3
17
17
  Classifier: Programming Language :: Python :: 3.9
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Programming Language :: Python :: 3.10
21
- Classifier: Programming Language :: Python :: 3.11
22
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
23
22
  Classifier: Programming Language :: Python :: 3.8
24
- Classifier: Programming Language :: Python :: 3.9
25
23
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
26
24
  Provides-Extra: black
27
25
  Provides-Extra: numpydantic
@@ -34,11 +32,10 @@ Requires-Dist: graphviz (>=0.10.1)
34
32
  Requires-Dist: hbreader
35
33
  Requires-Dist: isodate (>=0.6.0)
36
34
  Requires-Dist: jinja2 (>=3.1.0)
37
- Requires-Dist: jsonasobj2 (>=1.0.3,<2.0.0)
35
+ Requires-Dist: jsonasobj2 (>=1.0.3,<2.dev0)
38
36
  Requires-Dist: jsonschema[format] (>=4.0.0)
39
- Requires-Dist: linkml-dataops
40
- Requires-Dist: linkml-runtime (>=1.8.1,<2.0.0)
41
- Requires-Dist: numpydantic (>=1.6.1) ; (python_version >= "3.9") and (extra == "numpydantic" or extra == "tests")
37
+ Requires-Dist: linkml-runtime (>=1.9.1,<2.0.0)
38
+ Requires-Dist: numpydantic (>=1.6.1) ; extra == "numpydantic" or extra == "tests"
42
39
  Requires-Dist: openpyxl
43
40
  Requires-Dist: parse
44
41
  Requires-Dist: prefixcommons (>=0.1.7)
@@ -5,13 +5,7 @@ Models for intermediate build results
5
5
  """
6
6
 
7
7
  import dataclasses
8
- from typing import Any, TypeVar
9
-
10
- try:
11
- from typing import Annotated
12
- except ImportError:
13
- from typing_extensions import Annotated
14
-
8
+ from typing import Annotated, Any, TypeVar
15
9
 
16
10
  from linkml_runtime.linkml_model import (
17
11
  ClassDefinition,
@@ -2,7 +2,7 @@ import abc
2
2
  import re
3
3
  import sys
4
4
  from abc import ABC
5
- from typing import Any, Optional, Type, Union
5
+ from typing import Any, Optional, Union
6
6
 
7
7
  if sys.version_info < (3, 10):
8
8
  from typing_extensions import TypeAlias
@@ -39,25 +39,25 @@ from linkml_runtime.linkml_model.types import (
39
39
  )
40
40
 
41
41
  TYPES_TYPE: TypeAlias = Union[
42
- Type[Boolean],
43
- Type[Curie],
44
- Type[Date],
45
- Type[DateOrDatetime],
46
- Type[Datetime],
47
- Type[Decimal],
48
- Type[Double],
49
- Type[Float],
50
- Type[Integer],
51
- Type[Jsonpath],
52
- Type[Jsonpointer],
53
- Type[Ncname],
54
- Type[Nodeidentifier],
55
- Type[Objectidentifier],
56
- Type[Sparqlpath],
57
- Type[String],
58
- Type[Time],
59
- Type[Uri],
60
- Type[Uriorcurie],
42
+ type[Boolean],
43
+ type[Curie],
44
+ type[Date],
45
+ type[DateOrDatetime],
46
+ type[Datetime],
47
+ type[Decimal],
48
+ type[Double],
49
+ type[Float],
50
+ type[Integer],
51
+ type[Jsonpath],
52
+ type[Jsonpointer],
53
+ type[Ncname],
54
+ type[Nodeidentifier],
55
+ type[Objectidentifier],
56
+ type[Sparqlpath],
57
+ type[String],
58
+ type[Time],
59
+ type[Uri],
60
+ type[Uriorcurie],
61
61
  ]
62
62
 
63
63
  TYPES = [
@@ -2,7 +2,8 @@
2
2
  Lifestyle methods mixin
3
3
  """
4
4
 
5
- from typing import Iterable, TypeVar
5
+ from collections.abc import Iterable
6
+ from typing import TypeVar
6
7
 
7
8
  from linkml_runtime import SchemaView
8
9
  from linkml_runtime.linkml_model.meta import (
@@ -10,7 +10,7 @@ class NamingProfiles(str, Enum):
10
10
  graphql = "graphql"
11
11
 
12
12
 
13
- class NameCompatibility(object):
13
+ class NameCompatibility:
14
14
  """Make a name compatible to the given profile"""
15
15
 
16
16
  # heading double underscores and digit reserved to names starting with a digit
@@ -5,7 +5,7 @@ See :mod:`.linkml.generators.pydanticgen.template` for example implementation
5
5
  """
6
6
 
7
7
  from copy import copy
8
- from typing import Any, ClassVar, Dict, List, Optional, Union
8
+ from typing import Any, ClassVar, Optional, Union
9
9
 
10
10
  from jinja2 import Environment
11
11
  from pydantic import BaseModel
@@ -27,7 +27,7 @@ class TemplateModel(BaseModel):
27
27
  template: ClassVar[str]
28
28
  _environment: ClassVar[Environment]
29
29
 
30
- meta_exclude: ClassVar[List[str]] = None
30
+ meta_exclude: ClassVar[list[str]] = None
31
31
 
32
32
  def render(self, environment: Optional[Environment] = None, **kwargs) -> str:
33
33
  """
@@ -62,7 +62,7 @@ class TemplateModel(BaseModel):
62
62
  return copy(cls._environment)
63
63
 
64
64
  @classmethod
65
- def exclude_from_meta(cls: "TemplateModel") -> List[str]:
65
+ def exclude_from_meta(cls: "TemplateModel") -> list[str]:
66
66
  """
67
67
  Attributes in the source definition to exclude from linkml_meta
68
68
  """
@@ -73,9 +73,9 @@ class TemplateModel(BaseModel):
73
73
 
74
74
 
75
75
  def _render(
76
- item: Union[TemplateModel, Any, List[Union[Any, TemplateModel]], Dict[str, Union[Any, TemplateModel]]],
76
+ item: Union[TemplateModel, Any, list[Union[Any, TemplateModel]], dict[str, Union[Any, TemplateModel]]],
77
77
  environment: Environment,
78
- ) -> Union[str, List[str], Dict[str, str]]:
78
+ ) -> Union[str, list[str], dict[str, str]]:
79
79
  if isinstance(item, TemplateModel):
80
80
  return item.render(environment)
81
81
  elif isinstance(item, list):
@@ -1,5 +1,3 @@
1
- from typing import List
2
-
3
1
  from linkml_runtime.linkml_model.meta import ClassDefinition, SlotDefinition
4
2
  from linkml_runtime.utils.schemaview import SchemaView
5
3
 
@@ -22,7 +20,7 @@ def get_type_designator_value(sv: SchemaView, type_designator_slot: SlotDefiniti
22
20
 
23
21
  def get_accepted_type_designator_values(
24
22
  sv: SchemaView, type_designator_slot: SlotDefinition, class_def: ClassDefinition
25
- ) -> List[str]:
23
+ ) -> list[str]:
26
24
  """
27
25
  returns the accepted values for a type designator field for a given class, depending on its range
28
26
  this implements the logic described in https://github.com/linkml/linkml/issues/945:
@@ -6,7 +6,7 @@ import os
6
6
  from csv import DictWriter
7
7
  from dataclasses import dataclass
8
8
  from io import StringIO
9
- from typing import List, Optional, Set
9
+ from typing import Optional
10
10
 
11
11
  import click
12
12
  from linkml_runtime.linkml_model.meta import ClassDefinition, ClassDefinitionName
@@ -36,7 +36,7 @@ class CsvGenerator(Generator):
36
36
  sep: Optional[str] = None
37
37
  """Separator for columns"""
38
38
 
39
- closure: Optional[Set[ClassDefinitionName]] = None
39
+ closure: Optional[set[ClassDefinitionName]] = None
40
40
  """List of classes to include in output"""
41
41
 
42
42
  writer: Optional[DictWriter] = None
@@ -57,7 +57,7 @@ class CsvGenerator(Generator):
57
57
  out = "\n".join([out, f"# version: {self.schema.version}"])
58
58
  return out
59
59
 
60
- def visit_schema(self, classes: List[ClassDefinitionName] = None, **_) -> None:
60
+ def visit_schema(self, classes: list[ClassDefinitionName] = None, **_) -> None:
61
61
  # Note: classes comes from the "root" argument
62
62
  self.closure = set()
63
63
 
@@ -1,11 +1,12 @@
1
1
  import importlib.util
2
2
  import logging
3
3
  import os
4
+ from collections.abc import Iterable, Iterator
4
5
  from copy import deepcopy
5
6
  from dataclasses import dataclass, field
6
7
  from enum import Enum
7
8
  from pathlib import Path
8
- from typing import Dict, Iterable, Iterator, List, Optional, Tuple, Union
9
+ from typing import Optional, Union
9
10
 
10
11
  import click
11
12
  from jinja2 import Environment, FileSystemLoader, Template
@@ -135,7 +136,7 @@ class DocGenerator(Generator):
135
136
  """markdown dialect (e.g MyST, Python)"""
136
137
  sort_by: str = "name"
137
138
  visit_all_class_slots = False
138
- template_mappings: Dict[str, str] = None
139
+ template_mappings: dict[str, str] = None
139
140
  directory: str = None
140
141
  """directory in which to write documents"""
141
142
 
@@ -462,7 +463,7 @@ class DocGenerator(Generator):
462
463
  else:
463
464
  return e.name
464
465
 
465
- def links(self, e_list: List[DefinitionName]) -> List[str]:
466
+ def links(self, e_list: list[DefinitionName]) -> list[str]:
466
467
  """Render list of element documentation pages as hyperlinks.
467
468
 
468
469
  :param e_list: list of elements
@@ -521,7 +522,7 @@ class DocGenerator(Generator):
521
522
  mixins=True,
522
523
  descriptions=False,
523
524
  focus: DefinitionName = None,
524
- ) -> Tuple[str, int]:
525
+ ) -> tuple[str, int]:
525
526
  sv = self.schemaview
526
527
  if element.is_a:
527
528
  pre, depth = self._tree(
@@ -681,7 +682,7 @@ class DocGenerator(Generator):
681
682
  else:
682
683
  return "mermaid"
683
684
 
684
- def mermaid_diagram(self, class_names: List[Union[str, ClassDefinitionName]] = None) -> str:
685
+ def mermaid_diagram(self, class_names: list[Union[str, ClassDefinitionName]] = None) -> str:
685
686
  """
686
687
  Render a mermaid diagram for a set of classes
687
688
 
@@ -750,8 +751,7 @@ class DocGenerator(Generator):
750
751
  """
751
752
  elts = self.schemaview.class_induced_slots(class_name)
752
753
  _ensure_ranked(elts)
753
- for e in elts:
754
- yield e
754
+ yield from elts
755
755
 
756
756
  def all_class_objects(self) -> Iterator[ClassDefinition]:
757
757
  """
@@ -762,8 +762,7 @@ class DocGenerator(Generator):
762
762
  """
763
763
  elts = self.schemaview.all_classes(imports=self.render_imports).values()
764
764
  _ensure_ranked(elts)
765
- for e in elts:
766
- yield e
765
+ yield from elts
767
766
 
768
767
  def all_slot_objects(self) -> Iterator[SlotDefinition]:
769
768
  """
@@ -774,8 +773,7 @@ class DocGenerator(Generator):
774
773
  """
775
774
  elts = self.schemaview.all_slots(imports=self.render_imports).values()
776
775
  _ensure_ranked(elts)
777
- for e in elts:
778
- yield e
776
+ yield from elts
779
777
 
780
778
  def all_type_objects(self) -> Iterator[TypeDefinition]:
781
779
  """
@@ -786,10 +784,9 @@ class DocGenerator(Generator):
786
784
  """
787
785
  elts = self.schemaview.all_types(imports=self.render_imports).values()
788
786
  _ensure_ranked(elts)
789
- for e in elts:
790
- yield e
787
+ yield from elts
791
788
 
792
- def all_type_object_names(self) -> List[TypeDefinitionName]:
789
+ def all_type_object_names(self) -> list[TypeDefinitionName]:
793
790
  return [t.name for t in list(self.all_type_objects())]
794
791
 
795
792
  def all_enum_objects(self) -> Iterator[EnumDefinition]:
@@ -801,8 +798,7 @@ class DocGenerator(Generator):
801
798
  """
802
799
  elts = self.schemaview.all_enums(imports=self.render_imports).values()
803
800
  _ensure_ranked(elts)
804
- for e in elts:
805
- yield e
801
+ yield from elts
806
802
 
807
803
  def all_subset_objects(self) -> Iterator[SubsetDefinition]:
808
804
  """
@@ -813,10 +809,9 @@ class DocGenerator(Generator):
813
809
  """
814
810
  elts = self.schemaview.all_subsets(imports=self.render_imports).values()
815
811
  _ensure_ranked(elts)
816
- for e in elts:
817
- yield e
812
+ yield from elts
818
813
 
819
- def class_hierarchy_as_tuples(self) -> Iterator[Tuple[int, ClassDefinitionName]]:
814
+ def class_hierarchy_as_tuples(self) -> Iterator[tuple[int, ClassDefinitionName]]:
820
815
  """
821
816
  Generate a hierarchical representation of all classes in the schema
822
817
 
@@ -880,7 +875,7 @@ class DocGenerator(Generator):
880
875
  return slot
881
876
 
882
877
  @staticmethod
883
- def get_direct_slot_names(cls: ClassDefinition) -> List[SlotDefinitionName]:
878
+ def get_direct_slot_names(cls: ClassDefinition) -> list[SlotDefinitionName]:
884
879
  """Fetch list of all own attributes of a class, i.e.,
885
880
  all slot names of slots that belong to the domain of a class.
886
881
 
@@ -889,7 +884,7 @@ class DocGenerator(Generator):
889
884
  """
890
885
  return cls.slots + list(cls.attributes.keys())
891
886
 
892
- def get_direct_slots(self, cls: ClassDefinition) -> List[SlotDefinition]:
887
+ def get_direct_slots(self, cls: ClassDefinition) -> list[SlotDefinition]:
893
888
  """Fetch list of all own attributes of a class, i.e.,
894
889
  all slots that belong to the domain of a class.
895
890
 
@@ -900,7 +895,7 @@ class DocGenerator(Generator):
900
895
  self.inject_slot_info(self.schemaview.induced_slot(sn, cls.name)) for sn in self.get_direct_slot_names(cls)
901
896
  ]
902
897
 
903
- def get_indirect_slots(self, cls: ClassDefinition) -> List[SlotDefinition]:
898
+ def get_indirect_slots(self, cls: ClassDefinition) -> list[SlotDefinition]:
904
899
  """Fetch list of all inherited attributes of a class, i.e.,
905
900
  all slots that belong to the domain of a class.
906
901
 
@@ -917,7 +912,7 @@ class DocGenerator(Generator):
917
912
 
918
913
  def get_slot_inherited_from(
919
914
  self, class_name: ClassDefinitionName, slot_name: SlotDefinitionName
920
- ) -> List[ClassDefinitionName]:
915
+ ) -> list[ClassDefinitionName]:
921
916
  """Get the name of the class that a given slot is inherited from.
922
917
 
923
918
  :param class_name: name of the class whose slot we are checking
@@ -929,7 +924,7 @@ class DocGenerator(Generator):
929
924
  ancestors = sv.class_ancestors(class_name)
930
925
  return list(set(induced_slot.domain_of).intersection(ancestors))
931
926
 
932
- def get_mixin_inherited_slots(self, cls: ClassDefinition) -> Dict[str, List[str]]:
927
+ def get_mixin_inherited_slots(self, cls: ClassDefinition) -> dict[str, list[str]]:
933
928
  """Fetch list of all slots acquired through mixing.
934
929
 
935
930
  :param cls: class for which we want to determine the mixed in slots
@@ -944,7 +939,7 @@ class DocGenerator(Generator):
944
939
 
945
940
  return mixed_in_slots
946
941
 
947
- def example_object_blobs(self, class_name: str) -> List[Tuple[str, str]]:
942
+ def example_object_blobs(self, class_name: str) -> list[tuple[str, str]]:
948
943
  """Fetch list of all examples of a class.
949
944
 
950
945
  :param class_name: class for which we want to determine the examples
@@ -4,7 +4,7 @@ Generate dotfiles
4
4
 
5
5
  import os
6
6
  from dataclasses import dataclass
7
- from typing import List, Optional
7
+ from typing import Optional
8
8
 
9
9
  import click
10
10
  from deprecated.classic import deprecated
@@ -35,19 +35,19 @@ class DotGenerator(Generator):
35
35
  uses_schemaloader = True
36
36
 
37
37
  # ObjectVars
38
- classnames: Optional[List[str]] = None
38
+ classnames: Optional[list[str]] = None
39
39
  filename: Optional[str] = None
40
40
  dirname: Optional[str] = None
41
41
  filedot: Optional[Digraph] = None
42
42
  classdot: Optional[Digraph] = None
43
43
  cls_subj: Optional[SlotDefinition] = None
44
44
  cls_obj: Optional[SlotDefinition] = None
45
- classname: Optional[List[str]] = None
45
+ classname: Optional[list[str]] = None
46
46
  directory: Optional[str] = None
47
47
 
48
48
  def visit_schema(
49
49
  self,
50
- classname: Optional[List[str]] = None,
50
+ classname: Optional[list[str]] = None,
51
51
  directory: Optional[str] = None,
52
52
  filename: Optional[str] = None,
53
53
  **_,
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  from dataclasses import dataclass
3
3
  from enum import Enum
4
- from typing import List, Optional, Set, Union
4
+ from typing import Optional, Union
5
5
 
6
6
  import click
7
7
  import pydantic
@@ -75,7 +75,7 @@ class Entity(pydantic.BaseModel):
75
75
  """Entity in an ER diagram."""
76
76
 
77
77
  name: str
78
- attributes: List[Attribute] = []
78
+ attributes: list[Attribute] = []
79
79
 
80
80
  def __str__(self):
81
81
  attrs = "\n".join([str(a) for a in self.attributes])
@@ -97,8 +97,8 @@ class Relationship(pydantic.BaseModel):
97
97
  class ERDiagram(pydantic.BaseModel):
98
98
  """Represents an Diagram of Entities and Relationships"""
99
99
 
100
- entities: List[Entity] = []
101
- relationships: List[Relationship] = []
100
+ entities: list[Entity] = []
101
+ relationships: list[Relationship] = []
102
102
 
103
103
  def __str__(self):
104
104
  ents = "\n".join([str(e) for e in self.entities])
@@ -160,7 +160,7 @@ class ERDiagramGenerator(Generator):
160
160
 
161
161
  def serialize_classes(
162
162
  self,
163
- class_names: List[Union[str, ClassDefinitionName]],
163
+ class_names: list[Union[str, ClassDefinitionName]],
164
164
  follow_references=False,
165
165
  max_hops: int = None,
166
166
  include_upstream: bool = False,
@@ -220,7 +220,7 @@ class ERDiagramGenerator(Generator):
220
220
  else:
221
221
  return er
222
222
 
223
- def add_upstream_class(self, class_name: ClassDefinitionName, targets: Set[str], diagram: ERDiagram) -> None:
223
+ def add_upstream_class(self, class_name: ClassDefinitionName, targets: set[str], diagram: ERDiagram) -> None:
224
224
  sv = self.schemaview
225
225
  cls = sv.get_class(class_name)
226
226
  entity = Entity(name=camelcase(cls.name))
@@ -316,7 +316,7 @@ class ERDiagramGenerator(Generator):
316
316
  @click.command(name="erdiagram")
317
317
  def cli(
318
318
  yamlfile,
319
- classes: List[str],
319
+ classes: list[str],
320
320
  max_hops: Optional[int],
321
321
  follow_references: bool,
322
322
  include_upstream: bool = False,
@@ -1,7 +1,6 @@
1
1
  import logging
2
2
  from dataclasses import dataclass
3
3
  from pathlib import Path
4
- from typing import List
5
4
 
6
5
  import click
7
6
  from linkml_runtime.utils.schemaview import SchemaView
@@ -42,7 +41,7 @@ class ExcelGenerator(Generator):
42
41
  workbook.save(workbook_path)
43
42
  return workbook
44
43
 
45
- def create_workbook_and_worksheets(self, output_path: Path, classes: List[str]) -> None:
44
+ def create_workbook_and_worksheets(self, output_path: Path, classes: list[str]) -> None:
46
45
  """
47
46
  Creates a workbook with worksheets for each class.
48
47
 
@@ -89,7 +88,7 @@ class ExcelGenerator(Generator):
89
88
  self.logger.info(f"The Excel workbooks have been written to {output_path}")
90
89
 
91
90
  @staticmethod
92
- def add_columns_to_worksheet(workbook: Workbook, worksheet_name: str, sheet_headings: List[str]) -> None:
91
+ def add_columns_to_worksheet(workbook: Workbook, worksheet_name: str, sheet_headings: list[str]) -> None:
93
92
  """
94
93
  Get a worksheet by name and add a column to it in an existing workbook.
95
94
 
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  import os
3
3
  from dataclasses import dataclass
4
- from typing import List, Optional
4
+ from typing import Optional
5
5
 
6
6
  import click
7
7
  from jinja2 import Template
@@ -181,7 +181,7 @@ class GolangGenerator(Generator):
181
181
  return "string"
182
182
 
183
183
  @staticmethod
184
- def parents(cls: ClassDefinition) -> List[ClassDefinitionName]:
184
+ def parents(cls: ClassDefinition) -> list[ClassDefinitionName]:
185
185
  if cls.is_a:
186
186
  parents = [cls.is_a]
187
187
  else:
@@ -9,7 +9,7 @@ See the golr-views directory in this repo for examples
9
9
 
10
10
  import os
11
11
  from dataclasses import dataclass
12
- from typing import List, Optional
12
+ from typing import Optional
13
13
 
14
14
  import click
15
15
  from linkml_runtime.linkml_model.meta import ClassDefinition, SlotDefinition
@@ -26,7 +26,7 @@ class GOLRField(YAMLRoot):
26
26
  id: str
27
27
  description: str
28
28
  display_name: str
29
- property: List = empty_list()
29
+ property: list = empty_list()
30
30
  cardinality: Optional[str] = None
31
31
 
32
32
 
@@ -38,7 +38,7 @@ class GOLRClass(YAMLRoot):
38
38
  display_name: str
39
39
  document_category: str
40
40
  weight: int
41
- fields: List[GOLRField] = empty_list()
41
+ fields: list[GOLRField] = empty_list()
42
42
 
43
43
 
44
44
  @dataclass
@@ -6,7 +6,7 @@ Generate JSON-LD contexts
6
6
  import os
7
7
  import re
8
8
  from dataclasses import dataclass, field
9
- from typing import Any, Dict, Optional, Set, Union
9
+ from typing import Any, Optional, Union
10
10
 
11
11
  import click
12
12
  from jsonasobj2 import JsonObj, as_json
@@ -39,10 +39,10 @@ class ContextGenerator(Generator):
39
39
  file_extension = "context.jsonld"
40
40
 
41
41
  # ObjectVars
42
- emit_prefixes: Set[str] = field(default_factory=lambda: set())
42
+ emit_prefixes: set[str] = field(default_factory=lambda: set())
43
43
  default_ns: str = None
44
- context_body: Dict = field(default_factory=lambda: dict())
45
- slot_class_maps: Dict = field(default_factory=lambda: dict())
44
+ context_body: dict = field(default_factory=lambda: dict())
45
+ slot_class_maps: dict = field(default_factory=lambda: dict())
46
46
  emit_metadata: bool = False
47
47
  model: Optional[bool] = True
48
48
  base: Optional[Union[str, Namespace]] = None
@@ -3,7 +3,7 @@ import logging
3
3
  import os
4
4
  from copy import deepcopy
5
5
  from dataclasses import dataclass
6
- from typing import Any, Dict, List, Optional, Tuple, Union
6
+ from typing import Any, Optional, Union
7
7
 
8
8
  import click
9
9
  from linkml_runtime.linkml_model.meta import (
@@ -33,7 +33,7 @@ logger = logging.getLogger(__name__)
33
33
  # Note: The underlying types are a union of any built-in python datatype + any type defined in
34
34
  # linkml-runtime/utils/metamodelcore.py
35
35
  # Note the keys are all lower case
36
- json_schema_types: Dict[str, Tuple[str, Optional[str]]] = {
36
+ json_schema_types: dict[str, tuple[str, Optional[str]]] = {
37
37
  "int": ("integer", None),
38
38
  "integer": ("integer", None),
39
39
  "bool": ("boolean", None),
@@ -69,7 +69,7 @@ class JsonSchema(dict):
69
69
  identifier_name = self._lax_forward_refs.pop(canonical_name)
70
70
  self.add_lax_def(canonical_name, identifier_name)
71
71
 
72
- def add_lax_def(self, names: Union[str, List[str]], identifier_name: str) -> None:
72
+ def add_lax_def(self, names: Union[str, list[str]], identifier_name: str) -> None:
73
73
  # JSON-Schema does not have inheritance,
74
74
  # so we duplicate slots from inherited parents and mixins
75
75
  # Maps e.g. Person --> Person__identifier_optional
@@ -147,7 +147,7 @@ class JsonSchema(dict):
147
147
  return json.dumps(self, **kwargs)
148
148
 
149
149
  @classmethod
150
- def ref_for(cls, class_name: Union[str, List[str]], identifier_optional: bool = False, required: bool = True):
150
+ def ref_for(cls, class_name: Union[str, list[str]], identifier_optional: bool = False, required: bool = True):
151
151
  def _ref(class_name):
152
152
  def_name = camelcase(class_name)
153
153
  def_suffix = cls.OPTIONAL_IDENTIFIER_SUFFIX if identifier_optional else ""
@@ -459,7 +459,7 @@ class JsonSchemaGenerator(Generator, LifecycleMixin):
459
459
 
460
460
  def get_type_info_for_slot_subschema(
461
461
  self, slot: Union[SlotDefinition, AnonymousSlotExpression]
462
- ) -> Tuple[str, str, Union[str, List[str]]]:
462
+ ) -> tuple[str, str, Union[str, list[str]]]:
463
463
  # JSON Schema type (https://json-schema.org/understanding-json-schema/reference/type.html)
464
464
  typ = None
465
465
  # Reference to a JSON schema entity (https://json-schema.org/understanding-json-schema/structuring.html#ref)
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import re
3
3
  from dataclasses import dataclass
4
- from typing import Any, Callable, Dict, List, Optional, Set, Union
4
+ from typing import Any, Callable, Optional, Union
5
5
 
6
6
  import click
7
7
  from jsonasobj2 import JsonObj, values
@@ -44,20 +44,20 @@ class MarkdownGenerator(Generator):
44
44
  # ObjectVars
45
45
  directory: Optional[str] = None
46
46
  image_directory: Optional[str] = None
47
- classes: Set[ClassDefinitionName] = None
47
+ classes: set[ClassDefinitionName] = None
48
48
  image_dir: bool = False
49
49
  index_file: str = "index.md"
50
50
  noimages: bool = False
51
51
  noyuml: bool = False
52
52
  no_types_dir: bool = False
53
53
  warn_on_exist: bool = False
54
- gen_classes: Optional[Set[ClassDefinitionName]] = None
54
+ gen_classes: Optional[set[ClassDefinitionName]] = None
55
55
  gen_classes_neighborhood: Optional[References] = None
56
56
 
57
57
  def visit_schema(
58
58
  self,
59
59
  directory: str = None,
60
- classes: Set[ClassDefinitionName] = None,
60
+ classes: set[ClassDefinitionName] = None,
61
61
  image_dir: bool = False,
62
62
  index_file: str = "index.md",
63
63
  noimages: bool = False,
@@ -267,10 +267,8 @@ class MarkdownGenerator(Generator):
267
267
 
268
268
  items.append(self.header(2, "Domain and Range"))
269
269
  items.append(
270
- (
271
- f"{self.class_link(slot.domain)} &#8594;{self.predicate_cardinality(slot)} "
272
- f"{self.class_type_link(slot.range)}"
273
- )
270
+ f"{self.class_link(slot.domain)} &#8594;{self.predicate_cardinality(slot)} "
271
+ f"{self.class_type_link(slot.range)}"
274
272
  )
275
273
 
276
274
  items.append(self.header(2, "Parents"))
@@ -374,7 +372,7 @@ class MarkdownGenerator(Generator):
374
372
 
375
373
  def prop_list(
376
374
  title: str,
377
- entries: Union[List, Dict],
375
+ entries: Union[list, dict],
378
376
  formatter: Optional[Callable[[Element], str]] = None,
379
377
  ) -> Optional[str]:
380
378
  if formatter is None:
@@ -457,7 +455,7 @@ class MarkdownGenerator(Generator):
457
455
  # - related mappings
458
456
  # - deprecated element has exact replacement
459
457
  # - deprecated element has possible replacement
460
- if type(obj) == EnumDefinition:
458
+ if type(obj) is EnumDefinition:
461
459
  items.insert(0, enum_list("Permissible Values", obj))
462
460
  items.insert(1, "\n")
463
461