Skip to content

Commit a33ad56

Browse files
committed
Add comments.
1 parent b03cf9b commit a33ad56

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

crates/processing_pyo3/mewnala/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from .mewnala import *
22

3+
# re-export the native submodules as submodules of this module, if they exist
4+
# this allows users to import from `mewnala.math` and `mewnala.color`
5+
# if they exist, without needing to know about the internal structure of the native module
36
import sys as _sys
47
from . import mewnala as _native
58
for _name in ("math", "color"):

crates/processing_pyo3/src/color.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ fn to_srgba(color: &Color) -> Srgba {
4444

4545
#[pymethods]
4646
impl PyColor {
47+
// Varargs ctor for positional calls like color(255, 0, 0). ColorLike handles single-value extraction.
4748
#[new]
4849
#[pyo3(signature = (*args))]
4950
pub fn py_new(args: &Bound<'_, PyTuple>) -> PyResult<Self> {

0 commit comments

Comments
 (0)