ya-tagscript 2.0.0__tar.gz → 2.0.1__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.
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.github/workflows/black.yml +4 -4
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.github/workflows/coverage_comment.yml +2 -2
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.github/workflows/publish.yml +7 -7
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.github/workflows/test.yml +50 -20
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.pre-commit-config.yaml +10 -4
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/CHANGELOG.md +12 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/PKG-INFO +5 -4
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/README.md +2 -2
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/_ext/glossary_backlink_checker.py +8 -4
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/conf.py +1 -1
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/make_release.py +5 -5
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/pyproject.toml +17 -8
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interpreter/interpreter.py +2 -4
- ya_tagscript-2.0.1/src/ya_tagscript/interpreter/parse_state.py +99 -0
- ya_tagscript-2.0.1/src/ya_tagscript/interpreter/ts_parser.py +280 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/util/splitter.py +8 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/interpreter/test_interpreter.py +3 -11
- ya_tagscript-2.0.1/tests/ya_tagscript/interpreter/test_parse_state.py +39 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/interpreter/test_ts_parser.py +112 -159
- ya_tagscript-2.0.1/tests/ya_tagscript/util/test_conditionals.py +89 -0
- ya_tagscript-2.0.0/src/ya_tagscript/interpreter/parse_state.py +0 -106
- ya_tagscript-2.0.0/src/ya_tagscript/interpreter/ts_parser.py +0 -305
- ya_tagscript-2.0.0/tests/ya_tagscript/interpreter/test_parse_state.py +0 -56
- ya_tagscript-2.0.0/tests/ya_tagscript/util/test_conditionals.py +0 -214
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.flake8 +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.github/dependabot.yml +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.gitignore +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.python-version +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/.readthedocs.yaml +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/LICENSE.md +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/Makefile +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/_ext/styled_list_directive.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/adapters.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/blocks.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/changelog.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/code_examples/adapters/int_adapter_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/code_examples/adapters/member_adapter_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/code_examples/nested_blocks_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/code_examples/quickstart_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/credits.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/exceptions.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/glossary.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/index.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/interfaces.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/interpreter.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/intro.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/make.bat +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/numeric_parser.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/quickstart.rst +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/docs/requirements.txt +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/discord_adapters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/discord_adapters/attribute_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/discord_adapters/channel_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/discord_adapters/guild_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/discord_adapters/member_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/function_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/int_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/object_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/adapters/string_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/command_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/delete_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/override_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/react_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/redirect_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/actions/silence_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/conditional/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/conditional/all_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/conditional/any_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/conditional/if_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/discord/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/discord/cooldown_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/discord/embed_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/flow/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/flow/break_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/flow/shortcutredirect_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/flow/stop_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/limiters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/limiters/blacklist_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/limiters/require_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/lists/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/lists/cycle_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/lists/list_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/math/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/math/math_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/math/ordinal_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/meta/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/meta/comment_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/meta/debug_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/rng/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/rng/fiftyfifty_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/rng/random_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/rng/range_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/case_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/join_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/python_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/replace_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/substring_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/urldecode_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/strings/urlencode_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/time/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/time/strf_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/time/timedelta_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/variables/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/variables/assign_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/variables/loose_variable_getter_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/blocks/variables/strict_variable_getter_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/exceptions/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/exceptions/exceptions.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interfaces/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interfaces/adapterabc.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interfaces/blockabc.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interfaces/interpreterabc.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interfaces/nodeabc.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interpreter/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interpreter/context.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interpreter/node.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/interpreter/response.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/py.typed +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/util/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/util/conditionals.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/src/ya_tagscript/util/escaping.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/.coveragerc +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/adapters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/adapters/test_int_adapter_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/adapters/test_member_adapter_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/test_nested_blocks_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/docs/code_examples/test_quickstart_example.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/discord_adapters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/discord_adapters/test_attribute_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/discord_adapters/test_channel_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/discord_adapters/test_guild_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/discord_adapters/test_member_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/test_function_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/test_int_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/test_object_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/adapters/test_string_adapter.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_command_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_delete_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_override_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_react_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_redirect_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/actions/test_silence_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/conditional/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/conditional/test_all_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/conditional/test_any_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/conditional/test_if_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/discord/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/discord/test_cooldown_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/discord/test_embed_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/flow/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/flow/test_break_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/flow/test_shortcutredirect_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/flow/test_stop_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/limiters/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/limiters/test_blacklist_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/limiters/test_require_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/lists/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/lists/test_cycle_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/lists/test_list_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/math/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/math/test_math_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/math/test_ordinal_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/meta/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/meta/test_comment_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/meta/test_debug_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/rng/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/rng/test_fiftyfifty_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/rng/test_random_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/rng/test_range_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_case_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_join_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_python_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_replace_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_substring_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_urldecode_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/strings/test_urlencode_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/time/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/time/test_strf_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/time/test_timedelta_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/variables/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/variables/test_assign_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/variables/test_loose_variable_getter_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/blocks/variables/test_strict_variable_getter_block.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/interpreter/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/interpreter/test_node.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/util/__init__.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/util/test_escaping.py +0 -0
- {ya_tagscript-2.0.0 → ya_tagscript-2.0.1}/tests/ya_tagscript/util/test_splitter.py +0 -0
|
@@ -3,7 +3,7 @@ name: Lint
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
6
|
+
- main
|
|
7
7
|
|
|
8
8
|
pull_request:
|
|
9
9
|
|
|
@@ -14,14 +14,14 @@ jobs:
|
|
|
14
14
|
|
|
15
15
|
steps:
|
|
16
16
|
- name: Checkout
|
|
17
|
-
uses: actions/checkout@
|
|
17
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
18
18
|
|
|
19
|
-
- uses: actions/setup-python@
|
|
19
|
+
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
20
20
|
with:
|
|
21
21
|
python-version-file: ".python-version"
|
|
22
22
|
|
|
23
23
|
- name: Lint with black
|
|
24
|
-
uses: psf/black@
|
|
24
|
+
uses: psf/black@258e7dbf348bc23cb70b8cdf693481c04634ebcc # 26.10.1
|
|
25
25
|
with:
|
|
26
26
|
options: '--check --diff --verbose'
|
|
27
27
|
src: '.'
|
|
@@ -5,7 +5,7 @@ on:
|
|
|
5
5
|
types:
|
|
6
6
|
- completed
|
|
7
7
|
branches:
|
|
8
|
-
- '!
|
|
8
|
+
- '!main'
|
|
9
9
|
|
|
10
10
|
jobs:
|
|
11
11
|
post-coverage-comment:
|
|
@@ -19,7 +19,7 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
steps:
|
|
21
21
|
- name: Post comment
|
|
22
|
-
uses: py-cov-action/python-coverage-comment-action@
|
|
22
|
+
uses: py-cov-action/python-coverage-comment-action@e5fb2218463c3377f3504b0c5b5646ed53da7a2f # v4.5
|
|
23
23
|
with:
|
|
24
24
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
25
|
GITHUB_PR_RUN_ID: ${{ github.event.workflow_run.id }}
|
|
@@ -3,7 +3,7 @@ name: Build & Publish to PyPI
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
6
|
+
- main
|
|
7
7
|
tags:
|
|
8
8
|
- v*
|
|
9
9
|
|
|
@@ -15,12 +15,12 @@ jobs:
|
|
|
15
15
|
|
|
16
16
|
steps:
|
|
17
17
|
- name: Checkout
|
|
18
|
-
uses: actions/checkout@
|
|
18
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
19
19
|
with:
|
|
20
20
|
persist-credentials: false
|
|
21
21
|
|
|
22
22
|
- name: Set up Python
|
|
23
|
-
uses: actions/setup-python@
|
|
23
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
24
24
|
with:
|
|
25
25
|
cache: pip
|
|
26
26
|
python-version-file: ".python-version"
|
|
@@ -36,7 +36,7 @@ jobs:
|
|
|
36
36
|
run: python3 -m build
|
|
37
37
|
|
|
38
38
|
- name: Store the distribution packages
|
|
39
|
-
uses: actions/upload-artifact@
|
|
39
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
40
40
|
with:
|
|
41
41
|
name: python-package-distributions
|
|
42
42
|
path: dist/
|
|
@@ -55,13 +55,13 @@ jobs:
|
|
|
55
55
|
|
|
56
56
|
steps:
|
|
57
57
|
- name: Download all the dists
|
|
58
|
-
uses: actions/download-artifact@
|
|
58
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
59
59
|
with:
|
|
60
60
|
name: python-package-distributions
|
|
61
61
|
path: dist/
|
|
62
62
|
|
|
63
63
|
- name: Publish distribution 📦 to PyPI
|
|
64
|
-
uses: pypa/gh-action-pypi-publish@
|
|
64
|
+
uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
|
|
65
65
|
|
|
66
66
|
github-release:
|
|
67
67
|
name: Create GitHub Release
|
|
@@ -75,7 +75,7 @@ jobs:
|
|
|
75
75
|
|
|
76
76
|
steps:
|
|
77
77
|
- name: Download all the dists
|
|
78
|
-
uses: actions/download-artifact@
|
|
78
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
79
79
|
with:
|
|
80
80
|
name: python-package-distributions
|
|
81
81
|
path: dist/
|
|
@@ -3,14 +3,14 @@ name: Test
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches:
|
|
6
|
-
-
|
|
6
|
+
- main
|
|
7
7
|
|
|
8
8
|
pull_request:
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
jobs:
|
|
12
12
|
test:
|
|
13
|
-
|
|
13
|
+
name: Run tests on ${{ matrix.python-version }}
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
strategy:
|
|
16
16
|
fail-fast: false
|
|
@@ -19,10 +19,10 @@ jobs:
|
|
|
19
19
|
|
|
20
20
|
steps:
|
|
21
21
|
- name: Checkout
|
|
22
|
-
uses: actions/checkout@
|
|
22
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
23
23
|
|
|
24
24
|
- name: Setup Python ${{ matrix.python-version }}
|
|
25
|
-
uses: actions/setup-python@
|
|
25
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
26
26
|
with:
|
|
27
27
|
allow-prereleases: true
|
|
28
28
|
cache: pip
|
|
@@ -36,38 +36,67 @@ jobs:
|
|
|
36
36
|
env:
|
|
37
37
|
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
|
|
38
38
|
|
|
39
|
-
- run: mkdir coverage
|
|
40
|
-
|
|
41
39
|
- name: Run test suite
|
|
42
40
|
run: tox run --skip-pkg-install
|
|
43
41
|
env:
|
|
44
42
|
TOX_GH_MAJOR_MINOR: ${{ matrix.python-version }}
|
|
45
|
-
|
|
43
|
+
|
|
44
|
+
checks:
|
|
45
|
+
name: Check (${{ matrix.check }})
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
strategy:
|
|
48
|
+
fail-fast: false
|
|
49
|
+
matrix:
|
|
50
|
+
check:
|
|
51
|
+
- mypy_check
|
|
52
|
+
- pyright_check
|
|
53
|
+
- lowest_bounds
|
|
54
|
+
- coverage
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Checkout
|
|
58
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
59
|
+
|
|
60
|
+
- name: Setup Python
|
|
61
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
62
|
+
with:
|
|
63
|
+
python-version: "3.14"
|
|
64
|
+
|
|
65
|
+
- name: Install tox
|
|
66
|
+
run: pip install tox
|
|
67
|
+
|
|
68
|
+
- name: Prepare coverage directory
|
|
69
|
+
if: matrix.check == 'coverage'
|
|
70
|
+
run: mkdir -p coverage
|
|
71
|
+
|
|
72
|
+
- name: Run check
|
|
73
|
+
run: tox run -e "${{ matrix.check }}"
|
|
46
74
|
|
|
47
75
|
- name: Store coverage file
|
|
48
|
-
|
|
49
|
-
|
|
76
|
+
if: matrix.check == 'coverage'
|
|
77
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
50
78
|
with:
|
|
51
|
-
name: coverage
|
|
79
|
+
name: coverage-3.14
|
|
52
80
|
path: coverage
|
|
53
81
|
include-hidden-files: true
|
|
54
82
|
|
|
55
83
|
coverage:
|
|
56
|
-
|
|
84
|
+
name: Create Coverage report
|
|
85
|
+
needs: [ test, checks ]
|
|
57
86
|
runs-on: ubuntu-latest
|
|
58
87
|
|
|
59
88
|
steps:
|
|
60
89
|
- name: Checkout
|
|
61
|
-
uses: actions/checkout@
|
|
90
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
62
91
|
|
|
63
92
|
- name: Setup Python
|
|
64
|
-
uses: actions/setup-python@
|
|
93
|
+
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
|
|
65
94
|
with:
|
|
66
95
|
cache: pip
|
|
67
96
|
python-version-file: .python-version
|
|
68
97
|
|
|
69
98
|
- name: Get coverage files
|
|
70
|
-
uses: actions/download-artifact@
|
|
99
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
71
100
|
with:
|
|
72
101
|
merge-multiple: true
|
|
73
102
|
pattern: coverage-*
|
|
@@ -83,19 +112,20 @@ jobs:
|
|
|
83
112
|
run: coverage html --data-file coverage/.coverage
|
|
84
113
|
|
|
85
114
|
- name: Store coverage data
|
|
86
|
-
uses: actions/upload-artifact@
|
|
115
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
87
116
|
with:
|
|
88
117
|
path: coverage
|
|
89
118
|
name: coverage-data
|
|
90
119
|
include-hidden-files: true
|
|
91
120
|
|
|
92
121
|
- name: Store coverage HTML report
|
|
93
|
-
uses: actions/upload-artifact@
|
|
122
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
94
123
|
with:
|
|
95
124
|
path: htmlcov
|
|
96
125
|
name: coverage-html
|
|
97
126
|
|
|
98
127
|
coverage-pr-comment:
|
|
128
|
+
name: Create Coverage PR comment
|
|
99
129
|
needs: coverage
|
|
100
130
|
runs-on: ubuntu-latest
|
|
101
131
|
if: github.event_name == 'pull_request'
|
|
@@ -105,21 +135,21 @@ jobs:
|
|
|
105
135
|
|
|
106
136
|
steps:
|
|
107
137
|
- name: Checkout
|
|
108
|
-
uses: actions/checkout@
|
|
138
|
+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
109
139
|
|
|
110
140
|
- name: Download coverage data
|
|
111
|
-
uses: actions/download-artifact@
|
|
141
|
+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
|
|
112
142
|
with:
|
|
113
143
|
name: coverage-3.14
|
|
114
144
|
|
|
115
145
|
- name: Generate coverage comment
|
|
116
146
|
id: coverage-comment
|
|
117
|
-
uses: py-cov-action/python-coverage-comment-action@
|
|
147
|
+
uses: py-cov-action/python-coverage-comment-action@e5fb2218463c3377f3504b0c5b5646ed53da7a2f # v4.5
|
|
118
148
|
with:
|
|
119
149
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
120
150
|
|
|
121
151
|
- name: Store coverage comment
|
|
122
|
-
uses: actions/upload-artifact@
|
|
152
|
+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
|
|
123
153
|
if: steps.coverage-comment.outputs.COMMENT_FILE_WRITTEN == 'true'
|
|
124
154
|
with:
|
|
125
155
|
name: python-coverage-comment-action
|
|
@@ -2,13 +2,19 @@ default_language_version:
|
|
|
2
2
|
python: python3.11
|
|
3
3
|
fail_fast: false
|
|
4
4
|
repos:
|
|
5
|
+
- repo: https://github.com/asottile/pyupgrade
|
|
6
|
+
rev: v3.22.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: pyupgrade
|
|
9
|
+
args: [ --py311-plus ]
|
|
10
|
+
|
|
5
11
|
- repo: https://github.com/codespell-project/codespell
|
|
6
|
-
rev: v2.4.
|
|
12
|
+
rev: v2.4.3
|
|
7
13
|
hooks:
|
|
8
14
|
- id: codespell
|
|
9
15
|
|
|
10
16
|
- repo: https://github.com/pycqa/flake8
|
|
11
|
-
rev: 7.
|
|
17
|
+
rev: 7.5.0
|
|
12
18
|
hooks:
|
|
13
19
|
- id: flake8
|
|
14
20
|
additional_dependencies:
|
|
@@ -37,11 +43,11 @@ repos:
|
|
|
37
43
|
- id: add-trailing-comma
|
|
38
44
|
|
|
39
45
|
- repo: https://github.com/psf/black-pre-commit-mirror
|
|
40
|
-
rev: 26.
|
|
46
|
+
rev: 26.10.1
|
|
41
47
|
hooks:
|
|
42
48
|
- id: black
|
|
43
49
|
|
|
44
50
|
- repo: https://github.com/pycqa/isort
|
|
45
|
-
rev:
|
|
51
|
+
rev: 9.0.2
|
|
46
52
|
hooks:
|
|
47
53
|
- id: isort
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
*Currently none*
|
|
4
4
|
|
|
5
|
+
# v2.0.1 (2026-11-03)
|
|
6
|
+
|
|
7
|
+
- Parser performance improvements
|
|
8
|
+
- Some **internals** have been removed/replaced:
|
|
9
|
+
- `TagScriptParser` -> `parse_tagscript`
|
|
10
|
+
- `BlockParseState` -> partially inlined with state transitions via
|
|
11
|
+
`transition_state`
|
|
12
|
+
- `TagScriptInterpreter._parser` removed without replacement
|
|
13
|
+
- Further private helper functions in several locations (which were all marked
|
|
14
|
+
with `_` already)
|
|
15
|
+
- Because these are internals, this is **not considered a breaking change**.
|
|
16
|
+
|
|
5
17
|
# v2.0.0 (2026-07-24)
|
|
6
18
|
|
|
7
19
|
- BREAKING: Remove `_accepted_names` in favour of `_VALID_NAMES`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: ya_tagscript
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: Yet Another TagScript fork. An easy drop in user-provided Templating system.
|
|
5
5
|
Project-URL: Changelog, https://ya-tagscript.readthedocs.io/en/latest/changelog.html
|
|
6
6
|
Project-URL: Documentation, https://ya-tagscript.readthedocs.io
|
|
@@ -17,6 +17,7 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
21
|
Requires-Python: >=3.11
|
|
21
22
|
Requires-Dist: discord-py>=2.5.0
|
|
22
23
|
Requires-Dist: pyparsing>=3.2.0
|
|
@@ -30,7 +31,7 @@ Description-Content-Type: text/markdown
|
|
|
30
31
|

|
|
31
32
|
[](https://github.com/psf/black)
|
|
32
33
|
|
|
33
|
-
Current stable version: v2.0.
|
|
34
|
+
Current stable version: v2.0.1
|
|
34
35
|
|
|
35
36
|
## Information
|
|
36
37
|
|
|
@@ -92,7 +93,7 @@ or
|
|
|
92
93
|
<!--VERSIONED TAG SECTION START-->
|
|
93
94
|
|
|
94
95
|
```
|
|
95
|
-
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v2.0.
|
|
96
|
+
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v2.0.1
|
|
96
97
|
```
|
|
97
98
|
|
|
98
99
|
<!--VERSIONED TAG SECTION END-->
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|

|
|
6
6
|
[](https://github.com/psf/black)
|
|
7
7
|
|
|
8
|
-
Current stable version: v2.0.
|
|
8
|
+
Current stable version: v2.0.1
|
|
9
9
|
|
|
10
10
|
## Information
|
|
11
11
|
|
|
@@ -67,7 +67,7 @@ or
|
|
|
67
67
|
<!--VERSIONED TAG SECTION START-->
|
|
68
68
|
|
|
69
69
|
```
|
|
70
|
-
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v2.0.
|
|
70
|
+
pip install git+https://github.com/MajorTanya/ya_tagscript.git@v2.0.1
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
<!--VERSIONED TAG SECTION END-->
|
|
@@ -161,8 +161,10 @@ class GlossaryRefChecker:
|
|
|
161
161
|
if not term_data.ref_col_seen:
|
|
162
162
|
problem_terms[term] = term_data
|
|
163
163
|
_logger.error(
|
|
164
|
-
|
|
165
|
-
|
|
164
|
+
(
|
|
165
|
+
"[GlossaryRefCheck] Could not find a 'Referenced by' "
|
|
166
|
+
"section with an 'x-ref-col' class for term %r"
|
|
167
|
+
),
|
|
166
168
|
term,
|
|
167
169
|
)
|
|
168
170
|
elif (
|
|
@@ -171,8 +173,10 @@ class GlossaryRefChecker:
|
|
|
171
173
|
):
|
|
172
174
|
problem_terms[term] = term_data
|
|
173
175
|
_logger.error(
|
|
174
|
-
|
|
175
|
-
|
|
176
|
+
(
|
|
177
|
+
"[GlossaryRefCheck] 'Referenced by' section mismatch for "
|
|
178
|
+
"term %r: %r"
|
|
179
|
+
),
|
|
176
180
|
term,
|
|
177
181
|
term_data,
|
|
178
182
|
)
|
|
@@ -128,7 +128,7 @@ def commit_release_with_tag(project_version: str, *, dry_run: bool, verbose: boo
|
|
|
128
128
|
|
|
129
129
|
|
|
130
130
|
def update_changelog(project_version: str, *, dry_run: bool, verbose: bool):
|
|
131
|
-
with open("./CHANGELOG.md",
|
|
131
|
+
with open("./CHANGELOG.md", encoding="utf8") as cf:
|
|
132
132
|
old_changelog_text = cf.read()
|
|
133
133
|
already_released_version = re.search(
|
|
134
134
|
rf"^# v{project_version}$",
|
|
@@ -190,7 +190,7 @@ def update_changelog(project_version: str, *, dry_run: bool, verbose: bool):
|
|
|
190
190
|
|
|
191
191
|
|
|
192
192
|
def update_pyproject(project_version: str, *, dry_run: bool, verbose: bool):
|
|
193
|
-
with open("./pyproject.toml",
|
|
193
|
+
with open("./pyproject.toml", encoding="utf8") as pypf:
|
|
194
194
|
old_pyproject_content = pypf.read()
|
|
195
195
|
|
|
196
196
|
match = re.search(
|
|
@@ -228,7 +228,7 @@ def update_pyproject(project_version: str, *, dry_run: bool, verbose: bool):
|
|
|
228
228
|
|
|
229
229
|
|
|
230
230
|
def update_readme(project_version: str, *, dry_run: bool, verbose: bool):
|
|
231
|
-
with open("./README.md",
|
|
231
|
+
with open("./README.md", encoding="utf8") as rf:
|
|
232
232
|
old_readme_text = rf.read()
|
|
233
233
|
|
|
234
234
|
new_readme_text = re.sub(
|
|
@@ -273,7 +273,7 @@ def update_readme(project_version: str, *, dry_run: bool, verbose: bool):
|
|
|
273
273
|
|
|
274
274
|
|
|
275
275
|
def update_sphinx_conf(project_version: str, *, dry_run: bool, verbose: bool):
|
|
276
|
-
with open("./docs/conf.py",
|
|
276
|
+
with open("./docs/conf.py", encoding="utf8") as scf:
|
|
277
277
|
old_sphinx_conf = scf.read()
|
|
278
278
|
|
|
279
279
|
updated_version_section = textwrap.dedent(
|
|
@@ -320,7 +320,7 @@ def main():
|
|
|
320
320
|
|
|
321
321
|
_log.debug(f"Invoked with {args=}")
|
|
322
322
|
|
|
323
|
-
with open("./pyproject.toml",
|
|
323
|
+
with open("./pyproject.toml", encoding="utf8") as pf:
|
|
324
324
|
pyproject_config = tomllib.loads(pf.read())
|
|
325
325
|
current_version = str(pyproject_config["project"]["version"])
|
|
326
326
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ya_tagscript"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.1"
|
|
8
8
|
description = "Yet Another TagScript fork. An easy drop in user-provided Templating system."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "CC-BY-4.0"
|
|
@@ -19,6 +19,7 @@ classifiers = [
|
|
|
19
19
|
"Programming Language :: Python :: 3.12",
|
|
20
20
|
"Programming Language :: Python :: 3.13",
|
|
21
21
|
"Programming Language :: Python :: 3.14",
|
|
22
|
+
"Programming Language :: Python :: 3.15",
|
|
22
23
|
"Operating System :: OS Independent",
|
|
23
24
|
]
|
|
24
25
|
requires-python = ">=3.11"
|
|
@@ -42,7 +43,7 @@ dev = [
|
|
|
42
43
|
"docutils-stubs>=0.0.22",
|
|
43
44
|
"enum-tools[sphinx]>=0.13.0",
|
|
44
45
|
"hatchling>=1.28.0",
|
|
45
|
-
"isort>=
|
|
46
|
+
"isort>=9.0.2",
|
|
46
47
|
"jinja2>=3.1.6",
|
|
47
48
|
"mypy>=1.19.1",
|
|
48
49
|
"myst-parser>=4.0.1",
|
|
@@ -56,9 +57,18 @@ dev = [
|
|
|
56
57
|
"types-python-dateutil>=2.9.0.20260305",
|
|
57
58
|
]
|
|
58
59
|
|
|
60
|
+
# ========== BLACK ==========
|
|
59
61
|
[tool.black]
|
|
60
62
|
target-version = ["py311", "py312", "py313", "py314"]
|
|
61
63
|
|
|
64
|
+
# ========== ISORT ==========
|
|
65
|
+
[tool.isort]
|
|
66
|
+
profile = "black"
|
|
67
|
+
py_version = 311
|
|
68
|
+
reverse_relative = true
|
|
69
|
+
sort_reexports = true
|
|
70
|
+
|
|
71
|
+
# ========== COVERAGE ==========
|
|
62
72
|
[tool.coverage.report]
|
|
63
73
|
fail_under = 100
|
|
64
74
|
show_missing = true
|
|
@@ -73,14 +83,11 @@ branch = true
|
|
|
73
83
|
source = ['src/', 'tests/']
|
|
74
84
|
relative_files = true
|
|
75
85
|
|
|
76
|
-
|
|
77
|
-
profile = "black"
|
|
78
|
-
py_version = 311
|
|
79
|
-
reverse_relative = true
|
|
80
|
-
|
|
86
|
+
# ========== MYPY ==========
|
|
81
87
|
[tool.mypy]
|
|
82
88
|
strict = true
|
|
83
89
|
|
|
90
|
+
# ========== PYRIGHT ==========
|
|
84
91
|
[tool.pyright]
|
|
85
92
|
typeCheckingMode = 'strict'
|
|
86
93
|
# enable some non-default rules
|
|
@@ -92,6 +99,7 @@ reportUnknownLambdaType = "none"
|
|
|
92
99
|
reportUnknownMemberType = "none"
|
|
93
100
|
reportUnknownVariableType = "none"
|
|
94
101
|
|
|
102
|
+
# ========== PYTEST ==========
|
|
95
103
|
[tool.pytest]
|
|
96
104
|
filterwarnings = [
|
|
97
105
|
"error",
|
|
@@ -99,6 +107,7 @@ filterwarnings = [
|
|
|
99
107
|
'ignore:Deprecated since v1.7. Use _VALID_NAMES instead:DeprecationWarning'
|
|
100
108
|
]
|
|
101
109
|
|
|
110
|
+
# ========== TOX ==========
|
|
102
111
|
[tool.tox]
|
|
103
112
|
requires = ["tox>=4"]
|
|
104
113
|
env_list = [
|
|
@@ -162,7 +171,7 @@ commands = [
|
|
|
162
171
|
|
|
163
172
|
[tool.tox.gh.python]
|
|
164
173
|
"3.15" = ["3.15"]
|
|
165
|
-
"3.14" = ["3.14"
|
|
174
|
+
"3.14" = ["3.14"]
|
|
166
175
|
"3.13" = ["3.13"]
|
|
167
176
|
"3.12" = ["3.12"]
|
|
168
177
|
"3.11" = ["3.11"]
|
|
@@ -19,7 +19,7 @@ from ya_tagscript.interfaces import (
|
|
|
19
19
|
from .context import Context
|
|
20
20
|
from .node import Node
|
|
21
21
|
from .response import Response
|
|
22
|
-
from .ts_parser import
|
|
22
|
+
from .ts_parser import parse_tagscript
|
|
23
23
|
|
|
24
24
|
_logger = logging.getLogger(__name__)
|
|
25
25
|
|
|
@@ -28,7 +28,6 @@ class TagScriptInterpreter(InterpreterABC):
|
|
|
28
28
|
|
|
29
29
|
__slots__ = (
|
|
30
30
|
"blocks",
|
|
31
|
-
"_parser",
|
|
32
31
|
"work_limit",
|
|
33
32
|
"total_work",
|
|
34
33
|
"_named_blocks",
|
|
@@ -39,7 +38,6 @@ class TagScriptInterpreter(InterpreterABC):
|
|
|
39
38
|
self,
|
|
40
39
|
blocks: Sequence[BlockABC],
|
|
41
40
|
) -> None:
|
|
42
|
-
self._parser = TagScriptParser()
|
|
43
41
|
self.blocks: Sequence[BlockABC] = blocks
|
|
44
42
|
self.work_limit: int | None = None
|
|
45
43
|
self.total_work: int = 0
|
|
@@ -104,7 +102,7 @@ class TagScriptInterpreter(InterpreterABC):
|
|
|
104
102
|
# if we don't have even one of each brace, this is uninterpretable
|
|
105
103
|
# in other words, this is plaintext to us
|
|
106
104
|
return subject
|
|
107
|
-
ast =
|
|
105
|
+
ast = parse_tagscript(subject)
|
|
108
106
|
output: str = ""
|
|
109
107
|
node_processing_fn = self._process_node
|
|
110
108
|
for node in ast:
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
from enum import Enum, auto
|
|
2
|
+
from typing import Literal, overload
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class ParseState(Enum):
|
|
6
|
+
"""
|
|
7
|
+
Represents the current state of parsing within a block.
|
|
8
|
+
States transition in a specific order based on block structure.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
EXPECTING_DECLARATION = auto() # Initial state when a block starts
|
|
12
|
+
IN_DECLARATION = auto() # Collecting declaration text
|
|
13
|
+
IN_PARAMETER = auto() # Between parameter parentheses
|
|
14
|
+
# After completed parameter parentheses, maybe end, maybe payload next
|
|
15
|
+
POST_PARAMETER = auto()
|
|
16
|
+
IN_PAYLOAD = auto() # After the colon
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@overload
|
|
20
|
+
def transition_state(
|
|
21
|
+
current_state: Literal[ParseState.EXPECTING_DECLARATION],
|
|
22
|
+
next_state: Literal[ParseState.IN_DECLARATION],
|
|
23
|
+
) -> Literal[ParseState.IN_DECLARATION]: ...
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@overload
|
|
27
|
+
def transition_state(
|
|
28
|
+
current_state: Literal[ParseState.IN_DECLARATION],
|
|
29
|
+
next_state: Literal[ParseState.IN_PARAMETER],
|
|
30
|
+
) -> Literal[ParseState.IN_PARAMETER]: ...
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@overload
|
|
34
|
+
def transition_state(
|
|
35
|
+
current_state: Literal[ParseState.IN_PARAMETER],
|
|
36
|
+
next_state: Literal[ParseState.POST_PARAMETER],
|
|
37
|
+
) -> Literal[ParseState.POST_PARAMETER]: ...
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@overload
|
|
41
|
+
def transition_state(
|
|
42
|
+
current_state: Literal[ParseState.IN_DECLARATION, ParseState.POST_PARAMETER],
|
|
43
|
+
next_state: Literal[ParseState.IN_PAYLOAD],
|
|
44
|
+
) -> Literal[ParseState.IN_PAYLOAD]: ...
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def transition_state(
|
|
48
|
+
current_state: ParseState,
|
|
49
|
+
next_state: ParseState,
|
|
50
|
+
) -> Literal[
|
|
51
|
+
ParseState.IN_DECLARATION,
|
|
52
|
+
ParseState.IN_PARAMETER,
|
|
53
|
+
ParseState.POST_PARAMETER,
|
|
54
|
+
ParseState.IN_PAYLOAD,
|
|
55
|
+
]:
|
|
56
|
+
"""
|
|
57
|
+
Attempts to transition the block's state to the next state.
|
|
58
|
+
Raises ValueError if the transition is invalid.
|
|
59
|
+
|
|
60
|
+
Valid transitions are:
|
|
61
|
+
|
|
62
|
+
- EXPECTING_DECLARATION -> IN_DECLARATION (on text)
|
|
63
|
+
- IN_DECLARATION -> IN_PARAMETER (on opening parenthesis)
|
|
64
|
+
- IN_DECLARATION -> IN_PAYLOAD (on colon)
|
|
65
|
+
- IN_PARAMETER -> POST_PARAMETER (on closing parenthesis)
|
|
66
|
+
- POST_PARAMETER -> IN_PAYLOAD (on colon)
|
|
67
|
+
|
|
68
|
+
Note:
|
|
69
|
+
|
|
70
|
+
- IN_PAYLOAD has no valid target state because the only way out is to
|
|
71
|
+
finalize the block.
|
|
72
|
+
- EXPECTING_DECLARATION can transition to the base None state if the tokens
|
|
73
|
+
are "{}"
|
|
74
|
+
"""
|
|
75
|
+
if (
|
|
76
|
+
current_state is ParseState.EXPECTING_DECLARATION
|
|
77
|
+
and next_state is ParseState.IN_DECLARATION
|
|
78
|
+
):
|
|
79
|
+
return next_state
|
|
80
|
+
|
|
81
|
+
elif current_state is ParseState.IN_DECLARATION and (
|
|
82
|
+
next_state is ParseState.IN_PARAMETER or next_state is ParseState.IN_PAYLOAD
|
|
83
|
+
):
|
|
84
|
+
return next_state
|
|
85
|
+
|
|
86
|
+
elif (
|
|
87
|
+
current_state is ParseState.IN_PARAMETER
|
|
88
|
+
and next_state is ParseState.POST_PARAMETER
|
|
89
|
+
):
|
|
90
|
+
return next_state
|
|
91
|
+
|
|
92
|
+
elif (
|
|
93
|
+
current_state is ParseState.POST_PARAMETER
|
|
94
|
+
and next_state is ParseState.IN_PAYLOAD
|
|
95
|
+
):
|
|
96
|
+
return next_state
|
|
97
|
+
|
|
98
|
+
else:
|
|
99
|
+
raise ValueError(f"Invalid state transition: {current_state} -> {next_state}")
|