Skip to content

Commit

Permalink
more documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
huettenhain committed Oct 27, 2024
1 parent 4174f2f commit 9c6d1ee
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions refinery/lib/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@
def generate_frame_header(scope: int):
"""
This function generates a frame header for a frame tree of depth equal to `scope`. The depth
is encoded as a single byte following `refinery.lib.frame.MAGIC`.
is encoded as a single byte following `refinery.lib.frame.MAGIC`. This implies a depth limit
of 255 for frame trees in refinery, and I dearly hope that noone is insane enough to build a
refinery pipeline that would be affected.
"""
if scope > 0xFE:
if scope > 0xFF:
raise ValueError('Maximum frame depth exceeded.')
return B'%s%c' % (MAGIC, scope)

Expand Down Expand Up @@ -273,8 +275,8 @@ def set_next_batch(self, batch: int) -> None:
[[1,yellow,2,red,3,orange]]
This feature is useful for `refinery.Unit`s that produce multiple outputs for each of a
number of intermediate results - in the case of `refinery.rex`, that intermediate result
This feature is useful for `refinery.units.Unit`s that produce multiple outputs for each of
a number of intermediate results - in the case of `refinery.rex`, that intermediate result
is a regular expression match, and `refinery.rex` allows to produce different outputs for
each of those.
"""
Expand Down

0 comments on commit 9c6d1ee

Please sign in to comment.