pyodide-mkdocs-theme 5.1.8__tar.gz → 5.4.3__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. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/PKG-INFO +4 -2
  2. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/PMT_tools/p5/__init__.py +1 -1
  3. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/__main__.py +18 -8
  4. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/__version__.py +1 -0
  5. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/__init__.py +2 -2
  6. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/exceptions.py +8 -6
  7. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors}/__init__.py +6 -2
  8. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/_inclusions_tools.py +288 -0
  9. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base0_extractors.py +305 -0
  10. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base1_contents_extractor.py +563 -0
  11. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base2_inclusions.py +204 -0
  12. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/base3_generic_extractors.py +97 -0
  13. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/files_extractors/concrete_extractors.py +207 -0
  14. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/html_builder/__init__.py +1 -0
  15. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +214 -0
  16. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps.py +1 -1
  17. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/indent_parser.py +38 -28
  18. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/IDEs.py +1 -1
  19. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/figure.py +1 -8
  20. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_ide.py +8 -8
  21. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_manager.py +331 -98
  22. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_playground.py +3 -4
  23. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_py_btn.py +1 -1
  24. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_run_macro.py +5 -0
  25. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_term_ide.py +3 -1
  26. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +479 -0
  27. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/py_script.py +68 -42
  28. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/qcm.py +33 -2
  29. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/messages/__init__.py +5 -9
  30. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +360 -0
  31. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/messages/de_lang.py +166 -126
  32. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/messages/en_lang.py +166 -126
  33. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/messages/fr_lang.py +172 -130
  34. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/messages/proxy.py +178 -0
  35. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/parsing.py +0 -2
  36. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/__init__.py +3 -3
  37. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin/config.py +22 -0
  38. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_base.py +112 -108
  39. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +484 -0
  40. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_files.py +104 -13
  41. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_indent.py +42 -4
  42. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_macros.py +14 -11
  43. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_meta.py +84 -86
  44. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_templates.py +16 -15
  45. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/plugin/pyodide_macros_plugin.py +9 -6
  46. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/__init__.py +1 -1
  47. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/_string_tools_and_constants.py +5 -53
  48. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/common_tree_src.py +173 -98
  49. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/config_option_src.py +68 -74
  50. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/definitions/macros_configs.py +76 -82
  51. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/definitions/plugin_config.py +26 -9
  52. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/definitions/sub_configs.py +248 -47
  53. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/dumpers.py +19 -4
  54. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config/lang_src.py +165 -0
  55. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/macro_config_src.py +10 -4
  56. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/plugin_config_src.py +65 -53
  57. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/sub_config_src.py +29 -27
  58. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools}/macros_data.py +29 -14
  59. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools/maestro_tools.py +246 -0
  60. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools}/pages_and_macros_py_configs.py +29 -27
  61. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools}/test_cases.py +96 -76
  62. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/pyodide_logger.py +39 -15
  63. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/tools_and_constants.py +276 -42
  64. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/de/mkdocs.yml +12 -6
  65. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/en/mkdocs.yml +12 -6
  66. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/fr/docs/exo.py +11 -11
  67. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/fr/mkdocs.yml +12 -6
  68. pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/scripts/models/main.py +26 -0
  69. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/models/mkdocs.yml +12 -6
  70. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/0-config.js +84 -66
  71. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/0-legacy-subscriber.js +4 -4
  72. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/functools.js +152 -40
  73. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/process_and_gui.js +32 -15
  74. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/0-generic-python-snippets-pyodide.js +80 -8
  75. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-packagesInstaller-install-pyodide.js +23 -10
  76. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-runtimeManager-runtime-pyodide.js +3 -2
  77. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/2-0-runnersManager-runners.js +14 -7
  78. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/2-pyodideSectionsRunner-runner-pyodide.js +23 -5
  79. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/3-terminalRunner-term.js +6 -0
  80. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideLogistic-ide.js +7 -0
  81. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-ideRunner-ide.js +49 -34
  82. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/5-ideTester-ides_test.js +281 -225
  83. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/6-idePlayground-playground.js +2 -2
  84. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/qcms-qcm.js +12 -8
  85. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-scripts/subscriptions.js +126 -10
  86. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/0-generic.css +9 -3
  87. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/qcm.css +7 -7
  88. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/testing.css +34 -17
  89. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyproject.toml +9 -7
  90. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/__version__.py +0 -1
  91. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/html_builder/_html_builder.py +0 -133
  92. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/_inclusions.py +0 -336
  93. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/common_extractors.py +0 -123
  94. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/composite_file_data.py +0 -387
  95. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/generic_extractors.py +0 -336
  96. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/root_extractors.py +0 -257
  97. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/runners_extractors.py +0 -506
  98. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_files_data/snippets_extractor.py +0 -38
  99. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/macros/ide_tester.py +0 -332
  100. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/messages/classes.py +0 -289
  101. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/maestro_contracts.py +0 -261
  102. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools/maestro_tools.py +0 -303
  103. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/scripts/de/main.py +0 -140
  104. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/scripts/en/main.py +0 -139
  105. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/scripts/fr/main.py +0 -143
  106. pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/scripts/models/main.py +0 -43
  107. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/LICENSE +0 -0
  108. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/README.md +0 -0
  109. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/PMT_tools/vis/__init__.py +0 -0
  110. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/PMT_tools/vis_network/__init__.py +0 -0
  111. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/__init__.py +0 -0
  112. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/basthon_p5_to_pmt.py +0 -0
  113. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/__init__.py +0 -0
  114. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/html_dependencies/deps_class.py +0 -0
  115. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/__init__.py +0 -0
  116. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/macros/ide_terminal.py +0 -0
  117. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/pyodide_macros/paths_utils.py +0 -0
  118. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/definitions/__init__.py +0 -0
  119. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/config → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_config}/definitions/docs_dirs_config.py +0 -0
  120. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools}/__init__.py +0 -0
  121. {pyodide_mkdocs_theme-5.1.8/pyodide_mkdocs_theme/pyodide_macros/plugin/tools → pyodide_mkdocs_theme-5.4.3/pyodide_mkdocs_theme/pyodide_macros/plugin_tools}/options_alterations.py +0 -0
  122. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/de/docs/exo.py +0 -0
  123. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/de/docs/index.md +0 -0
  124. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/en/docs/exo.py +0 -0
  125. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/en/docs/index.md +0 -0
  126. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/fr/docs/index.md +0 -0
  127. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/models/.gitignore +0 -0
  128. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/models/pyodide_plot.py +0 -0
  129. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/models/requirements.txt +0 -0
  130. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/scripts/models/toolbox.py +0 -0
  131. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/README.md +0 -0
  132. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/__init__.py +0 -0
  133. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/.qcm-circle.svg +0 -0
  134. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-check-64.png +0 -0
  135. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-download-64.png +0 -0
  136. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-play-64.png +0 -0
  137. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-restart-64.png +0 -0
  138. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-save-64.png +0 -0
  139. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-step-64.png +0 -0
  140. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-stop-64.png +0 -0
  141. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-upload-64.png +0 -0
  142. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/assets/images/icons8-zip-64.png +0 -0
  143. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/base_pmt.html +0 -0
  144. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/jsLogger.js +0 -0
  145. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-libs/mathjax-libs.js +0 -0
  146. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/1-error_logs-pyodide.js +0 -0
  147. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/3-btnRunner-py_btn.js +0 -0
  148. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/4-0-idesManager-ide.js +0 -0
  149. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/6-2-init-playground.js +0 -0
  150. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-per-pages/start-pyodide.js +0 -0
  151. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/js-scripts/overlord.js +0 -0
  152. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/main.html +0 -0
  153. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/mkdocs_theme.yml +0 -0
  154. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/partials/content.html +0 -0
  155. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/partials/copyright.html +0 -0
  156. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/partials/footer.html +0 -0
  157. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/partials/header.html +0 -0
  158. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/partials/social.html +0 -0
  159. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/btns-header.css +0 -0
  160. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/history.css +0 -0
  161. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/hourglass.css +0 -0
  162. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/ide.css +0 -0
  163. {pyodide_mkdocs_theme-5.1.8 → pyodide_mkdocs_theme-5.4.3}/pyodide_mkdocs_theme/templates/pyodide-css/terminal.css +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyodide-mkdocs-theme
3
- Version: 5.1.8
3
+ Version: 5.4.3
4
4
  Summary: Package embedding the necessary tools to host pyodide, ACE editors, jQuery terminals in mkdocs documentations
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: mkdocs,mkdocs-plugin,pyodide,IDE,terminal
@@ -23,9 +23,11 @@ Classifier: Programming Language :: JavaScript
23
23
  Classifier: Topic :: Documentation
24
24
  Classifier: Topic :: Software Development :: Documentation
25
25
  Classifier: Topic :: Text Processing :: Markup :: HTML
26
+ Requires-Dist: click (<=8.2.1)
26
27
  Requires-Dist: mkdocs (>=1.6)
27
- Requires-Dist: mkdocs-macros-plugin (>=1.2.0)
28
+ Requires-Dist: mkdocs-macros-plugin (>=1.4)
28
29
  Requires-Dist: mkdocs-material (>=9.5)
30
+ Requires-Dist: pymdown-extensions (>=10.11)
29
31
  Project-URL: Bug Tracker, https://gitlab.com/frederic-zinelli/pyodide-mkdocs-theme/-/issues
30
32
  Project-URL: Documentation, http://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/
31
33
  Project-URL: Homepage, http://frederic-zinelli.gitlab.io/pyodide-mkdocs-theme/
@@ -4,7 +4,7 @@ p5.js wrapper for Pyodide-MkDocs-Theme, by Frédéric Zinelli.
4
4
  Basic use:
5
5
 
6
6
  1. Import p5 as a namespace (no wildcard imports!):
7
- 2. Define the setup and draw callbacks, using calls to the original p6 JS functions,
7
+ 2. Define the setup and draw callbacks, using calls to the original p5 JS functions,
8
8
  using`p5.functionName()` syntax.
9
9
  3. Call `p5.run(setup, draw, preload, target="div_id")` at the end of the code (`preload`
10
10
  is optional / `target` is also optional and defaults to the current PMT option value
@@ -27,11 +27,18 @@ from contextlib import redirect_stdout
27
27
  from .__version__ import __version__
28
28
  from .basthon_p5_to_pmt import update_basthon_p5_code
29
29
 
30
-
31
30
  PMT_SCRIPTS = 'scripts'
32
31
 
33
32
  MIMES = "https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types"
34
- LANGS = ('de', 'en', 'fr')
33
+
34
+
35
+ # WARNING: do not import PMT python packages from here, otherwise troubles in devops scripts.
36
+ MESSAGES_DIR = Path(__file__).parent / 'pyodide_macros' / 'messages'
37
+ LANG_FILE_SUFFIX = "_lang.py"
38
+ N_END = len(LANG_FILE_SUFFIX)
39
+ LANGS = tuple(
40
+ p.name[:-N_END] for p in MESSAGES_DIR.iterdir() if p.name.endswith(LANG_FILE_SUFFIX)
41
+ )
35
42
 
36
43
 
37
44
 
@@ -60,9 +67,10 @@ parser.add_argument(
60
67
  parser.add_argument(
61
68
  '--lang', action='extend', nargs='*', choices=LANGS, default=[],
62
69
  help=f'Optional. Choices: { ", ".join(LANGS) }. '
63
- 'Print the base python code to customize some messages. '
64
- 'Can also be used with other arguments to get the information in languages other '
65
- 'than "fr", when relevant.'
70
+ 'Can be used with other arguments to get the information/files in languages other '
71
+ 'than "fr", when relevant. '
72
+ '([DEPRECATED]: Print the base python code to customize some messages. From PMT 5.3.0, '
73
+ "use the plugin's configuration to change PMT messages.)"
66
74
  )
67
75
  parser.add_argument( # Effect strictly equivalent to --lang, but present for semantic
68
76
  '-M', '--macros', action='store_true',
@@ -240,8 +248,7 @@ def main():
240
248
  'plot': 'pyodide_plot.py',
241
249
  'py': 'docs/exo.py',
242
250
  'toolbox': 'toolbox.py',
243
- 'yml': 'mkdocs.yml',
244
- 'lang': 'main.py' ,
251
+ 'yml': 'mkdocs.yml'
245
252
  }
246
253
 
247
254
  if args.basthonP5:
@@ -275,7 +282,10 @@ def main():
275
282
 
276
283
  if not did_some and args.lang:
277
284
  did_some = True
278
- handle_one_file(args, 'lang')
285
+ print(
286
+ "From PMT 5.3.0, you should update Lang messages directly through the plugin's configuration. "
287
+ "The old `env.lang.overload` way is still supported, but it should not be used anymore."
288
+ )
279
289
 
280
290
 
281
291
  if raise_toolbox:
@@ -0,0 +1 @@
1
+ __version__ = "5.4.3"
@@ -19,8 +19,8 @@ If not, see <https://www.gnu.org/licenses/>.
19
19
 
20
20
 
21
21
  from .plugin.pyodide_macros_plugin import PyodideMacrosPlugin
22
- from .plugin.config.dumpers import *
23
- from .plugin.tools.macros_data import (
22
+ from .plugin_config.dumpers import *
23
+ from .plugin_tools.macros_data import (
24
24
  MacroData,
25
25
  MacroDataIDE,
26
26
  MacroDataTerminal,
@@ -103,7 +103,8 @@ class PmtInvalidSyntaxError(PmtIndentParserError):
103
103
 
104
104
  class PmtIndentedMacroError(PmtIndentParserError):
105
105
  """
106
- A macro with indent has been called while text is found on its left.
106
+ A macro with indent has been called while text is found on its left, or a user defined
107
+ macro with indent has been used and it didn't call the methods managing the indentation.
107
108
  """
108
109
 
109
110
  class PmtTabulationError(PmtIndentParserError):
@@ -162,11 +163,11 @@ class PmtMacrosInvalidArgumentError(PmtMacrosError):
162
163
 
163
164
  class PmtMultiRemSourcesError(PmtMacrosError):
164
165
  """
165
- REMs contents set both with a md file and through a PYODIDE:section.
166
+ REMs contents set both with a md file and through a PMT:section.
166
167
  """
167
168
 
168
169
 
169
- class PmtMacrosInvalidPyFileError(PmtMacrosError):
170
+ class PmtMacrosInvalidPmtFileError(PmtMacrosError):
170
171
  """
171
172
  File missing or with invalid content.
172
173
  """
@@ -176,12 +177,12 @@ class PmtMacrosComposerError(PmtMacrosError):
176
177
  Invalid composition instruction.
177
178
  """
178
179
 
179
- class PmtMacrosInvalidSectionError(PmtMacrosInvalidPyFileError):
180
+ class PmtMacrosInvalidSectionError(PmtMacrosInvalidPmtFileError):
180
181
  """
181
- Invalid PYODIDE section name.
182
+ Invalid PMT section name.
182
183
  """
183
184
 
184
- class PmtPythonPyInclusionError(PmtMacrosInvalidPyFileError):
185
+ class PmtPythonPyInclusionError(PmtMacrosInvalidPmtFileError):
185
186
  """
186
187
  Error found while resolving python files inclusions instructions
187
188
  (`## {{ py_name:section }}`)
@@ -210,3 +211,4 @@ PyodideMacrosParsingError = PmtInvalidSyntaxError
210
211
  PyodideMacrosIndentError = PmtIndentParserError
211
212
  PyodideMacrosTabulationError = PmtTabulationError
212
213
  PyodideMacrosMetaError = PmtMetadataError
214
+ PmtMacrosInvalidPyFileError = PmtMacrosInvalidPmtFileError
@@ -17,5 +17,9 @@ along with this program.
17
17
  If not, see <https://www.gnu.org/licenses/>.
18
18
  """
19
19
 
20
- from .common_extractors import IdeFilesExtractor, SnippetsExtractor, SourceFilesExtractor
21
- from .composite_file_data import CompositeFilesDataExtractor
20
+ from .concrete_extractors import (
21
+ FileExtractor,
22
+ PythonExtractor,
23
+ PythonSnippetsExtractor,
24
+ SqlExtractor,
25
+ )
@@ -0,0 +1,288 @@
1
+ """
2
+ pyodide-mkdocs-theme
3
+ Copyleft GNU GPLv3 🄯 2024 Frédéric Zinelli
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13
+ See the GNU General Public License for more details.
14
+
15
+ You should have received a copy of the GNU General Public License
16
+ along with this program.
17
+ If not, see <https://www.gnu.org/licenses/>.
18
+ """
19
+ # pylint: disable=multiple-statements, missing-function-docstring
20
+
21
+
22
+ import re
23
+ from pathlib import Path
24
+ from dataclasses import dataclass
25
+ from typing import ClassVar, Dict, List, Literal, Tuple, TYPE_CHECKING, Union
26
+
27
+
28
+ from ..exceptions import PmtMacrosInvalidPmtFileError
29
+ from ..tools_and_constants import ScriptData
30
+ from ..parsing import add_indent
31
+ from ..indent_parser import IndentParser
32
+
33
+
34
+ if TYPE_CHECKING:
35
+ from .concrete_extractors import FileExtractor
36
+
37
+
38
+ CWD = Path.cwd()
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+ class InclusionParser(IndentParser):
54
+ """
55
+ Parser dedicated to analyze the sections and replacements instructions for inclusions (it does
56
+ not handle the full instruction!).
57
+ """
58
+
59
+ _CACHE: ClassVar[Dict[str,List]] = {}
60
+
61
+ LOOKING_FOR: ClassVar[str] = "python inclusions informations"
62
+
63
+ targets: List[ScriptData]
64
+ replacements: List[Tuple[str,str]]
65
+
66
+
67
+ def gathered_data_as_str(self):
68
+ replacements = ''.join(
69
+ f"\n {src!r} -> {repl!r}" for src,repl in self.replacements
70
+ ) or "\n ()"
71
+ return f"""\
72
+ Content parsed: {self.content!r}
73
+ Targeted sections:
74
+ { ', '.join(self.targets) or () }
75
+ Replacements:{ replacements }"""
76
+
77
+
78
+ def start_parsing(self):
79
+ self.targets = []
80
+ self.replacements = []
81
+
82
+ while self.is_(':'):
83
+ self.eat_section()
84
+
85
+ if '*' in self.targets and len(self.targets) > 1:
86
+ self.fatal("Cannot use '*' in combination with other section names.")
87
+
88
+ while self.is_('[|]'):
89
+ self.eat_replacement()
90
+
91
+ if self.tokens_left():
92
+ got_repl = bool(self.replacements)
93
+ self.eat('[|]'if got_repl else '[:|]')
94
+
95
+ return self.targets, self.replacements
96
+
97
+
98
+ def eat_section(self):
99
+ self.eat()
100
+ is_all = self.is_('[*]')
101
+ section = self.eat() if is_all else self.eat_id()
102
+ self.targets.append(section)
103
+
104
+ def eat_replacement(self):
105
+ self.eat()
106
+ src = self.eat_repl_segment()
107
+ self.eat_arrow()
108
+ repl = self.eat_repl_segment()
109
+ self.replacements.append((src,repl))
110
+
111
+ def eat_arrow(self):
112
+ i = self.i
113
+ arrow = ''.join( self.tokens[i:i+2] )
114
+ if arrow != "->":
115
+ show = repr(arrow) if arrow else 'EOF'
116
+ self.fatal(
117
+ f"Expected an arrow `->` to specify the replacement to use, but found { show }"
118
+ )
119
+ self.eat()
120
+ self.eat()
121
+
122
+ def eat_repl_segment(self):
123
+ if self.is_string():
124
+ return self.eat_string()
125
+ else:
126
+ return self.eat_id()
127
+
128
+
129
+ def eat_id(self):
130
+ return self.eat(r'\w+')
131
+
132
+ def eat_string(self):
133
+ i = self.i
134
+ self.err_stack_opening()
135
+ self._eat_until_paired()
136
+ self.err_stack_closing()
137
+ j = self.i
138
+ str_repr = ''.join(self.tokens[i:j])
139
+ return eval(str_repr) # Using eval to automatically handle escaped chars
140
+
141
+
142
+ INCLUSION_PARSER = InclusionParser()
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+ @dataclass
158
+ class InclusionConfig:
159
+ """ Regroup the data for one inclusion instruction """
160
+
161
+ ALL_SECTIONS: ClassVar[List[str]] = ['*']
162
+
163
+ parent: 'FileExtractor' = None
164
+
165
+ inclusion_instruction: str = None
166
+ """
167
+ Full inclusion instruction as string (with leading indent). Used to make the strings substitutions.
168
+ """
169
+
170
+ indent: str = ""
171
+ """ Leading indentation level, as string. """
172
+
173
+ redirection: str = ""
174
+ """ Redirection instruction (may be empty string) """
175
+
176
+ rel_path: str = ""
177
+ """ Relative path to the file targeted to resolved this inclusion. """
178
+
179
+ targets: List[Union[ScriptData, Literal['*']]] = None
180
+ """
181
+ List of children sections name to insert (in order). May be '*' if all sections of the target file
182
+ must be included (using default sections ordering).
183
+ """
184
+
185
+ replacements: Dict[str,str] = None
186
+ """ Replacements to apply after resolving the inclusions. """
187
+
188
+
189
+
190
+
191
+ @classmethod
192
+ def build_for(cls, parent:'FileExtractor', m:re.Match):
193
+ """
194
+ Build the InclusionConfig instance for the given parent Extractor, with the given match object.
195
+ """
196
+ indent, src, rel_path, targets_str = m['indent'], m['src'], m['rel_path'], m['targets']
197
+
198
+ targets, replacements = INCLUSION_PARSER.parse(targets_str.strip(), parent.exo_file)
199
+
200
+ return cls(parent, m[0], indent, src, rel_path, targets, replacements)
201
+
202
+
203
+
204
+ def get_child_target_sections(self, child:'FileExtractor'):
205
+ """
206
+ No validation at this step, just produce the list of expected sections to include.
207
+ Resolve the `*` case on the way.
208
+ """
209
+ if self.targets == self.ALL_SECTIONS:
210
+ return [
211
+ section for section in self.parent.env.allowed_pmt_sections_in_order
212
+ if section in child.contents
213
+ ]
214
+ return self.targets
215
+
216
+
217
+ def apply(self, content:str):
218
+
219
+ child = self.get_child()
220
+ targets = self.get_child_target_sections(child)
221
+
222
+ sub_content = "\n\n".join(
223
+ child.resolve_section_inclusions(child_section) for child_section in targets
224
+ )
225
+
226
+ for src,repl in self.replacements:
227
+ sub_content = sub_content.replace(src,repl)
228
+
229
+ indented = add_indent(sub_content, self.indent, leading=True)
230
+ content = content.replace(self.inclusion_instruction, indented)
231
+ return content
232
+
233
+
234
+
235
+ def get_child(self):
236
+ """
237
+ Extract the correct target/child file for the current inclusion/page/macro.
238
+
239
+ Raise PmtMacrosInvalidPmtFileError if:
240
+ - `rel_path` is not given (unless the redirection is `[py]`).
241
+ - or if no target file can be found (whatever the way it is sought for: "by exercice" or
242
+ "by chapter" modes).
243
+ """
244
+ redirect = self.redirection
245
+ rel_path = self.rel_path
246
+
247
+ if not redirect and not rel_path: # Include a section from the current file
248
+ return self.parent
249
+
250
+ elif redirect=='[md]':
251
+ source = self.parent.get_current_md()
252
+
253
+ elif redirect in ('[py]', '[src]'):
254
+ source = self.parent.get_src_file()
255
+ if not rel_path:
256
+ rel_path = source.stem
257
+
258
+ elif redirect=='[cwd]':
259
+ md = self.parent.get_current_md()
260
+ source = CWD / md.stem
261
+
262
+ else:
263
+ source = self.parent.exo_file
264
+
265
+
266
+ if not rel_path:
267
+ raise PmtMacrosInvalidPmtFileError(
268
+ "Inclusions using `[md]` or `[cwd]` require to specify a relative path information "
269
+ f"(aka, `py_name`).\nOccurred in:\n{ self.parent.env.log() }"
270
+ )
271
+
272
+ as_path = Path(rel_path)
273
+ tail = as_path.suffix or self.parent.EXTENSION
274
+ if as_path.suffix and rel_path.endswith(tail):
275
+ rel_path = rel_path[:-len(tail)]
276
+
277
+ runner_file = self.parent.env._get_sibling(source, rel_path, tail=tail)
278
+
279
+ if not runner_file:
280
+ raise PmtMacrosInvalidPmtFileError(
281
+ f"No file matching {(redirect or '')+rel_path!r} could be found, starting from "
282
+ f"the { source.parent } directory."
283
+ )
284
+
285
+ _, child = self.parent.get_file_extractor_for(
286
+ self.parent.env, rel_path, runner_file=runner_file, allow_snippets_py=True
287
+ )
288
+ return child