python-fragments 0.16__tar.gz → 0.17__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.
- {python_fragments-0.16 → python_fragments-0.17}/PKG-INFO +1 -1
- {python_fragments-0.16 → python_fragments-0.17}/fragments/grammar.py +1 -1
- {python_fragments-0.16 → python_fragments-0.17}/pyproject.toml +1 -1
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/PKG-INFO +1 -1
- {python_fragments-0.16 → python_fragments-0.17}/tests/test_grammar.py +47 -0
- {python_fragments-0.16 → python_fragments-0.17}/README.md +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/__init__.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/ast_nodes.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/cli.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/html/__init__.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/html/elements.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/loader.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/__init__.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/based_proxy.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/__init__.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/code_actions.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/completion.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/definition.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/diagnostics.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/document_highlight.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/document_symbols.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/folding_range.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/hover.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/inlay_hints.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/lifecycle.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/references.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/rename.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/semantic_tokens.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/signature_help.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/file_state.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/message_queue.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/pyright_notification_handlers/__init__.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/pyright_notification_handlers/capability.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/pyright_notification_handlers/configuration.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/pyright_notification_handlers/diagnostics.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/types.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/source.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/fragments/transpiler.py +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/SOURCES.txt +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/dependency_links.txt +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/entry_points.txt +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/requires.txt +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/top_level.txt +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/setup.cfg +0 -0
- {python_fragments-0.16 → python_fragments-0.17}/tests/test_source_map.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "python-fragments"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.17"
|
|
8
8
|
description = "Modern HTML template rendering in Python"
|
|
9
9
|
authors = [{ name = "The Running Algorithm", email = "services@therunningalgorithm.info" }]
|
|
10
10
|
readme = "README.md"
|
|
@@ -294,6 +294,53 @@ def test_lowercase_not_parsed_as_component():
|
|
|
294
294
|
assert isinstance(fragment.children[0], ASTHTMLElement)
|
|
295
295
|
|
|
296
296
|
|
|
297
|
+
# ---------------------------------------------------------------------------
|
|
298
|
+
# HTML text
|
|
299
|
+
# ---------------------------------------------------------------------------
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def test_html_text_single_line():
|
|
303
|
+
source = Source.from_string("<><p>hello world</p></>")
|
|
304
|
+
source, fragment = grammar.expect_fragment(source)
|
|
305
|
+
assert source.at_end()
|
|
306
|
+
assert _transpiled(fragment) == _transpiled(ASTFragment(-1, -1, [
|
|
307
|
+
ASTHTMLElement(-1, -1, "p", {}, [ASTHTMLText(-1, -1, "hello world")], False)
|
|
308
|
+
]))
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
def test_html_text_multiline():
|
|
312
|
+
source = Source.from_string("<><p>hello\nworld</p></>")
|
|
313
|
+
source, fragment = grammar.expect_fragment(source)
|
|
314
|
+
assert source.at_end()
|
|
315
|
+
assert _transpiled(fragment) == _transpiled(ASTFragment(-1, -1, [
|
|
316
|
+
ASTHTMLElement(-1, -1, "p", {}, [ASTHTMLText(-1, -1, "hello\nworld")], False)
|
|
317
|
+
]))
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def test_html_text_multiline_before_interpolation():
|
|
321
|
+
source = Source.from_string("<><p>hello\n{{ name }}</p></>")
|
|
322
|
+
source, fragment = grammar.expect_fragment(source)
|
|
323
|
+
assert source.at_end()
|
|
324
|
+
assert _transpiled(fragment) == _transpiled(ASTFragment(-1, -1, [
|
|
325
|
+
ASTHTMLElement(-1, -1, "p", {}, [
|
|
326
|
+
ASTHTMLText(-1, -1, "hello\n"),
|
|
327
|
+
ASTInterpolation(-1, -1, "name", 1, 1),
|
|
328
|
+
], False)
|
|
329
|
+
]))
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def test_html_text_multiline_before_child_element():
|
|
333
|
+
source = Source.from_string("<><p>hello\n<span>world</span></p></>")
|
|
334
|
+
source, fragment = grammar.expect_fragment(source)
|
|
335
|
+
assert source.at_end()
|
|
336
|
+
assert _transpiled(fragment) == _transpiled(ASTFragment(-1, -1, [
|
|
337
|
+
ASTHTMLElement(-1, -1, "p", {}, [
|
|
338
|
+
ASTHTMLText(-1, -1, "hello\n"),
|
|
339
|
+
ASTHTMLElement(-1, -1, "span", {}, [ASTHTMLText(-1, -1, "world")], False),
|
|
340
|
+
], False)
|
|
341
|
+
]))
|
|
342
|
+
|
|
343
|
+
|
|
297
344
|
# ---------------------------------------------------------------------------
|
|
298
345
|
# Full integration (updated for new AST structure)
|
|
299
346
|
# ---------------------------------------------------------------------------
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/completion.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/definition.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/diagnostics.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/hover.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/inlay_hints.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/lifecycle.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/references.py
RENAMED
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/fragments/lsp/client_message_handlers/rename.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_fragments-0.16 → python_fragments-0.17}/python_fragments.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|