yoga-python 0.1.1__tar.gz → 0.1.2__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 (81) hide show
  1. {yoga_python-0.1.1 → yoga_python-0.1.2}/.github/workflows/quality.yml +5 -2
  2. {yoga_python-0.1.1 → yoga_python-0.1.2}/.github/workflows/release.yml +13 -2
  3. {yoga_python-0.1.1 → yoga_python-0.1.2}/.gitignore +4 -0
  4. {yoga_python-0.1.1 → yoga_python-0.1.2}/CMakeLists.txt +3 -4
  5. yoga_python-0.1.2/LICENSE +21 -0
  6. {yoga_python-0.1.1 → yoga_python-0.1.2}/PKG-INFO +21 -7
  7. {yoga_python-0.1.1 → yoga_python-0.1.2}/README.md +4 -4
  8. {yoga_python-0.1.1 → yoga_python-0.1.2}/pyproject.toml +24 -4
  9. {yoga_python-0.1.1 → yoga_python-0.1.2}/src/yoga/__init__.py +1 -1
  10. {yoga_python-0.1.1 → yoga_python-0.1.2}/src/yoga/__init__.pyi +3 -3
  11. yoga_python-0.1.2/src/yoga/py.typed +0 -0
  12. yoga_python-0.1.2/src/yoga/yoga.cpp +1021 -0
  13. yoga_python-0.1.2/tests/test_clone_nofree.py +51 -0
  14. yoga_python-0.1.2/tests/test_free_order.py +134 -0
  15. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_measure.py +1 -0
  16. yoga_python-0.1.2/tests/test_no_free.py +48 -0
  17. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_persistence.py +3 -0
  18. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_persistent_node_cloning.py +3 -0
  19. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_value.py +1 -2
  20. {yoga_python-0.1.1 → yoga_python-0.1.2}/uv.lock +12 -2
  21. yoga_python-0.1.1/src/yoga/enums.py +0 -132
  22. yoga_python-0.1.1/src/yoga/value.py +0 -54
  23. yoga_python-0.1.1/src/yoga/yoga.cpp +0 -1085
  24. {yoga_python-0.1.1 → yoga_python-0.1.2}/.github/workflows/create-release.yml +0 -0
  25. {yoga_python-0.1.1 → yoga_python-0.1.2}/.python-version +0 -0
  26. {yoga_python-0.1.1 → yoga_python-0.1.2}/pyrightconfig.json +0 -0
  27. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/conftest.py +0 -0
  28. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_absolute_position.py +0 -0
  29. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_align_content.py +0 -0
  30. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_align_items.py +0 -0
  31. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_align_self.py +0 -0
  32. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_android_news_feed.py +0 -0
  33. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_aspect_ratio.py +0 -0
  34. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_auto.py +0 -0
  35. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_baseline.py +0 -0
  36. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_baseline_func.py +0 -0
  37. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_border.py +0 -0
  38. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_box_sizing.py +0 -0
  39. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_clone_node.py +0 -0
  40. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_computed_margin.py +0 -0
  41. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_computed_padding.py +0 -0
  42. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_config.py +0 -0
  43. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_default_values.py +0 -0
  44. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_dimension.py +0 -0
  45. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_dirtied.py +0 -0
  46. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_dirty_marking.py +0 -0
  47. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_display.py +0 -0
  48. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_display_contents.py +0 -0
  49. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_edge.py +0 -0
  50. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_events.py +0 -0
  51. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_flex.py +0 -0
  52. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_flex_direction.py +0 -0
  53. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_flex_gap.py +0 -0
  54. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_flex_wrap.py +0 -0
  55. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_float_optional.py +0 -0
  56. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_gap.py +0 -0
  57. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_had_overflow.py +0 -0
  58. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_intrinsic_size.py +0 -0
  59. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_justify_content.py +0 -0
  60. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_layoutable_children.py +0 -0
  61. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_margin.py +0 -0
  62. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_measure_cache.py +0 -0
  63. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_measure_mode.py +0 -0
  64. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_min_max_dimension.py +0 -0
  65. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_node_callback.py +0 -0
  66. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_node_child.py +0 -0
  67. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_ordinals.py +0 -0
  68. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_padding.py +0 -0
  69. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_percentage.py +0 -0
  70. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_relayout.py +0 -0
  71. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_rounding.py +0 -0
  72. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_rounding_function.py +0 -0
  73. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_rounding_measure.py +0 -0
  74. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_scale_change.py +0 -0
  75. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_size_overflow.py +0 -0
  76. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_small_value_buffer.py +0 -0
  77. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_static_position.py +0 -0
  78. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_style.py +0 -0
  79. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_style_value_pool.py +0 -0
  80. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_tree_mutation.py +0 -0
  81. {yoga_python-0.1.1 → yoga_python-0.1.2}/tests/test_zero_out_layout.py +0 -0
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- python-version: ["3.12", "3.13"]
14
+ python-version: ["3.12", "3.13", "3.14"]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v4
@@ -60,10 +60,12 @@ jobs:
60
60
  if: github.event_name == 'push' && github.ref == 'refs/heads/main'
61
61
  steps:
62
62
  - uses: actions/checkout@v4
63
+ - name: Install uv
64
+ uses: astral-sh/setup-uv@v4
63
65
  - name: Build sdist
64
66
  run: pip install -q build validate-pyproject && validate-pyproject pyproject.toml && python -m build --sdist
65
67
  - name: Build one Linux wheel (cibuildwheel smoke)
66
- uses: pypa/cibuildwheel@v2.20.0
68
+ uses: pypa/cibuildwheel@v2.22.0
67
69
  env:
68
70
  CIBW_BUILD: "cp312-*"
69
71
  CIBW_SKIP: "*-win* *-macos* *-manylinux_i686 *-musllinux_*"
@@ -71,6 +73,7 @@ jobs:
71
73
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
72
74
  # CMake FetchContent needs git (dnf for manylinux_2_28)
73
75
  CIBW_BEFORE_ALL_LINUX: "dnf install -y git"
76
+ CIBW_BUILD_FRONTEND: "build[uv]"
74
77
  CIBW_BUILD_VERBOSITY: "3"
75
78
  CIBW_ENVIRONMENT_PASS_LINUX: "GIT_TERMINAL_PROMPT"
76
79
  GIT_TERMINAL_PROMPT: "0"
@@ -34,15 +34,26 @@ jobs:
34
34
  with:
35
35
  fetch-depth: 0
36
36
 
37
+ - name: Install uv
38
+ uses: astral-sh/setup-uv@v4
39
+
37
40
  - name: Build wheels
38
- uses: pypa/cibuildwheel@v2.20.0
41
+ uses: pypa/cibuildwheel@v2.22.0
39
42
  env:
40
- CIBW_BUILD: "cp312-* cp313-*"
43
+ CIBW_BUILD: "cp312-* cp313-* cp314-*"
41
44
  CIBW_SKIP: "*-win32 *-manylinux_i686 *-musllinux_*"
42
45
  # Use manylinux_2_28 so pip can use ninja's wheel (no compatible wheel on manylinux2014)
43
46
  CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
44
47
  # CMake FetchContent clones Yoga from GitHub (dnf for manylinux_2_28)
45
48
  CIBW_BEFORE_ALL_LINUX: "dnf install -y git"
49
+ # Test built wheels before shipping
50
+ CIBW_TEST_REQUIRES: "pytest"
51
+ CIBW_TEST_COMMAND: "pytest {project}/tests -v --tb=short -x"
52
+ # Prevent git from hanging on auth prompts during FetchContent
53
+ CIBW_ENVIRONMENT_PASS_LINUX: "GIT_TERMINAL_PROMPT"
54
+ GIT_TERMINAL_PROMPT: "0"
55
+ CIBW_BUILD_FRONTEND: "build[uv]"
56
+ CIBW_BUILD_VERBOSITY: "1"
46
57
 
47
58
  - uses: actions/upload-artifact@v4
48
59
  with:
@@ -28,3 +28,7 @@ src/yoga/__pycache__/
28
28
  # Reference C++ code (used for porting, not part of this repo)
29
29
  reference/
30
30
 
31
+ # Benchmarking (dev-only)
32
+ benchmark.py
33
+ *_results.json
34
+
@@ -8,14 +8,14 @@ endif()
8
8
 
9
9
  set(CMAKE_CXX_STANDARD 20)
10
10
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
11
- set(PYBIND11_FINDPYTHON ON)
11
+ find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
12
+ find_package(nanobind REQUIRED)
12
13
 
13
14
  set(yoga_BUILD_TESTS OFF CACHE BOOL "Build Yoga tests" FORCE)
14
15
 
15
16
  # Use local reference yoga if present, otherwise fetch from GitHub
16
17
  if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/reference/yoga/CMakeLists.txt)
17
18
  message(STATUS "Using local reference yoga")
18
- find_package(pybind11 REQUIRED)
19
19
  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/reference/yoga ${CMAKE_BINARY_DIR}/yoga-build EXCLUDE_FROM_ALL)
20
20
  else()
21
21
  message(STATUS "Fetching yoga from GitHub...")
@@ -38,8 +38,7 @@ else()
38
38
  add_subdirectory(${yoga_SOURCE_DIR} ${CMAKE_BINARY_DIR}/yoga-build EXCLUDE_FROM_ALL)
39
39
  endif()
40
40
 
41
- find_package(pybind11 REQUIRED)
42
- pybind11_add_module(yoga src/yoga/yoga.cpp)
41
+ nanobind_add_module(yoga src/yoga/yoga.cpp)
43
42
  target_include_directories(yoga PRIVATE ${yoga_SOURCE_DIR})
44
43
  target_link_libraries(yoga PRIVATE yogacore)
45
44
 
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 firefly
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,19 +1,33 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: yoga-python
3
- Version: 0.1.1
4
- Summary: Python binding for Facebook Yoga layout engine
3
+ Version: 0.1.2
4
+ Summary: Python bindings for Facebook Yoga layout engine (CSS Flexbox)
5
+ Keywords: yoga,flexbox,layout,css,react-native
6
+ License-Expression: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Programming Language :: C++
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Classifier: Typing :: Typed
15
+ Project-URL: Homepage, https://github.com/banditburai/yoga-python
16
+ Project-URL: Repository, https://github.com/banditburai/yoga-python
17
+ Project-URL: Issues, https://github.com/banditburai/yoga-python/issues
5
18
  Requires-Python: >=3.12
6
19
  Provides-Extra: dev
7
20
  Requires-Dist: pytest>=8.0; extra == "dev"
8
21
  Requires-Dist: pytest-cov>=4.1; extra == "dev"
9
22
  Requires-Dist: ruff>=0.3; extra == "dev"
23
+ Requires-Dist: pyright>=1.1.408; extra == "dev"
10
24
  Description-Content-Type: text/markdown
11
25
 
12
26
  # yoga-python
13
27
 
14
28
  Python bindings for [Facebook's Yoga](https://github.com/facebook/yoga) layout engine — a cross-platform implementation of [CSS Flexbox](https://www.w3.org/TR/css-flexbox-1/).
15
29
 
16
- Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfect positions. This package wraps the full C++ engine via [pybind11](https://github.com/pybind/pybind11), giving you the same layout behavior you get in React Native, Litho, and other Yoga-backed frameworks — directly from Python.
30
+ Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfect positions. This package wraps the full C++ engine via [nanobind](https://github.com/wjakob/nanobind), giving you the same layout behavior you get in React Native, Litho, and other Yoga-backed frameworks — directly from Python.
17
31
 
18
32
  ## Installation
19
33
 
@@ -21,10 +35,10 @@ Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfe
21
35
  pip install yoga-python
22
36
  ```
23
37
 
24
- Building from source requires a C++20 compiler, CMake 3.15+, and pybind11:
38
+ Building from source requires a C++20 compiler, CMake 3.15+, and nanobind:
25
39
 
26
40
  ```bash
27
- pip install scikit-build-core pybind11
41
+ pip install scikit-build-core nanobind
28
42
  pip install .
29
43
  ```
30
44
 
@@ -170,7 +184,7 @@ YGValueUndefined # undefined
170
184
 
171
185
  ## Enums
172
186
 
173
- All Yoga enums are available as Python enum types (pybind11 enums, int-convertible):
187
+ All Yoga enums are available as Python enum types (nanobind enums, int-convertible):
174
188
 
175
189
  `Direction`, `FlexDirection`, `Justify`, `Align`, `PositionType`, `Wrap`, `Overflow`, `Display`, `Edge`, `Unit`, `MeasureMode`, `Dimension`, `BoxSizing`, `Gutter`, `Errata`, `NodeType`, `LogLevel`, `ExperimentalFeature`
176
190
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Python bindings for [Facebook's Yoga](https://github.com/facebook/yoga) layout engine — a cross-platform implementation of [CSS Flexbox](https://www.w3.org/TR/css-flexbox-1/).
4
4
 
5
- Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfect positions. This package wraps the full C++ engine via [pybind11](https://github.com/pybind/pybind11), giving you the same layout behavior you get in React Native, Litho, and other Yoga-backed frameworks — directly from Python.
5
+ Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfect positions. This package wraps the full C++ engine via [nanobind](https://github.com/wjakob/nanobind), giving you the same layout behavior you get in React Native, Litho, and other Yoga-backed frameworks — directly from Python.
6
6
 
7
7
  ## Installation
8
8
 
@@ -10,10 +10,10 @@ Yoga computes a layout tree of nodes with flexbox styles and outputs pixel-perfe
10
10
  pip install yoga-python
11
11
  ```
12
12
 
13
- Building from source requires a C++20 compiler, CMake 3.15+, and pybind11:
13
+ Building from source requires a C++20 compiler, CMake 3.15+, and nanobind:
14
14
 
15
15
  ```bash
16
- pip install scikit-build-core pybind11
16
+ pip install scikit-build-core nanobind
17
17
  pip install .
18
18
  ```
19
19
 
@@ -159,7 +159,7 @@ YGValueUndefined # undefined
159
159
 
160
160
  ## Enums
161
161
 
162
- All Yoga enums are available as Python enum types (pybind11 enums, int-convertible):
162
+ All Yoga enums are available as Python enum types (nanobind enums, int-convertible):
163
163
 
164
164
  `Direction`, `FlexDirection`, `Justify`, `Align`, `PositionType`, `Wrap`, `Overflow`, `Display`, `Edge`, `Unit`, `MeasureMode`, `Dimension`, `BoxSizing`, `Gutter`, `Errata`, `NodeType`, `LogLevel`, `ExperimentalFeature`
165
165
 
@@ -1,20 +1,38 @@
1
1
  [project]
2
2
  name = "yoga-python"
3
- version = "0.1.1"
4
- description = "Python binding for Facebook Yoga layout engine"
3
+ version = "0.1.2"
4
+ description = "Python bindings for Facebook Yoga layout engine (CSS Flexbox)"
5
5
  readme = "README.md"
6
+ license = "MIT"
6
7
  requires-python = ">=3.12"
7
8
  dependencies = []
9
+ keywords = ["yoga", "flexbox", "layout", "css", "react-native"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3",
14
+ "Programming Language :: Python :: 3.12",
15
+ "Programming Language :: Python :: 3.13",
16
+ "Programming Language :: C++",
17
+ "Topic :: Software Development :: Libraries",
18
+ "Typing :: Typed",
19
+ ]
20
+
21
+ [project.urls]
22
+ Homepage = "https://github.com/banditburai/yoga-python"
23
+ Repository = "https://github.com/banditburai/yoga-python"
24
+ Issues = "https://github.com/banditburai/yoga-python/issues"
8
25
 
9
26
  [project.optional-dependencies]
10
27
  dev = [
11
28
  "pytest>=8.0",
12
29
  "pytest-cov>=4.1",
13
30
  "ruff>=0.3",
31
+ "pyright>=1.1.408",
14
32
  ]
15
33
 
16
34
  [build-system]
17
- requires = ["scikit-build-core>=0.5", "pybind11>=2.12"]
35
+ requires = ["scikit-build-core>=0.5", "nanobind>=2.0"]
18
36
  build-backend = "scikit_build_core.build"
19
37
 
20
38
  [tool.scikit-build]
@@ -76,7 +94,6 @@ ignore = [
76
94
  "tests/archive/*.py" = ["F401", "I001", "PLR0915", "E712", "N803", "PLW1641", "F811", "PLR0913"]
77
95
  "src/yoga/__init__.py" = ["F401", "I001", "SIM105"]
78
96
  "src/yoga/__init__.pyi" = ["N815"]
79
- "src/yoga/value.py" = ["I001", "PLW1641"]
80
97
  "tests/conftest.py" = ["F401", "I001"]
81
98
 
82
99
  [tool.ruff.format]
@@ -86,4 +103,7 @@ indent-style = "space"
86
103
  [dependency-groups]
87
104
  dev = [
88
105
  "pyright>=1.1.408",
106
+ "pytest>=8.0",
107
+ "pytest-cov>=4.1",
108
+ "ruff>=0.3",
89
109
  ]
@@ -2,7 +2,7 @@
2
2
  Yoga Python bindings - Facebook Yoga layout engine
3
3
 
4
4
  This package provides Python bindings for the Facebook Yoga layout engine.
5
- Uses compiled C++ pybind11 extension.
5
+ Uses compiled C++ nanobind extension.
6
6
  """
7
7
 
8
8
  from yoga.yoga import * # noqa: F401, F403 # type: ignore[import-not-found]
@@ -1,7 +1,7 @@
1
1
  from collections.abc import Callable
2
2
  from typing import Any
3
3
 
4
- # Enums (pybind11 enum types)
4
+ # Enums (nanobind enum types)
5
5
  class Direction:
6
6
  Inherit: Direction
7
7
  LTR: Direction
@@ -291,8 +291,8 @@ NodeBaselineEnd: EventType
291
291
  # YGValue
292
292
  class YGValue:
293
293
  value: float
294
- unit: int
295
- def __init__(self, value: float, unit: int) -> None: ...
294
+ unit: Unit | int
295
+ def __init__(self, value: float, unit: Unit | int) -> None: ...
296
296
  def __eq__(self, other: object) -> bool: ...
297
297
  def __neg__(self) -> YGValue: ...
298
298
  def __repr__(self) -> str: ...
File without changes