nebu 0.1.10__py3-none-any.whl → 0.1.11__py3-none-any.whl
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.
- nebu/processors/decorate.py +27 -0
- nebu/processors/models.py +1 -1
- {nebu-0.1.10.dist-info → nebu-0.1.11.dist-info}/METADATA +1 -1
- {nebu-0.1.10.dist-info → nebu-0.1.11.dist-info}/RECORD +7 -7
- {nebu-0.1.10.dist-info → nebu-0.1.11.dist-info}/WHEEL +0 -0
- {nebu-0.1.10.dist-info → nebu-0.1.11.dist-info}/licenses/LICENSE +0 -0
- {nebu-0.1.10.dist-info → nebu-0.1.11.dist-info}/top_level.txt +0 -0
nebu/processors/decorate.py
CHANGED
@@ -170,6 +170,33 @@ def processor(
|
|
170
170
|
function_source = inspect.getsource(func)
|
171
171
|
# Clean up the indentation
|
172
172
|
function_source = textwrap.dedent(function_source)
|
173
|
+
|
174
|
+
# Remove the @processor decorator (single or multi-line) if present
|
175
|
+
lines = function_source.split("\\n")
|
176
|
+
filtered_lines = []
|
177
|
+
skipping_decorator = False
|
178
|
+
decorator_name = "processor" # Assuming the decorator is always @processor
|
179
|
+
for line in lines:
|
180
|
+
stripped_line = line.strip()
|
181
|
+
if stripped_line.startswith(f"@{decorator_name}"):
|
182
|
+
skipping_decorator = True
|
183
|
+
continue # Skip the decorator starting line itself
|
184
|
+
if skipping_decorator:
|
185
|
+
if stripped_line.startswith("def "):
|
186
|
+
skipping_decorator = False
|
187
|
+
# Add the 'def' line, as it's the start of the function
|
188
|
+
filtered_lines.append(line)
|
189
|
+
else:
|
190
|
+
# Still inside the decorator block, skip this line
|
191
|
+
continue
|
192
|
+
else:
|
193
|
+
# Not skipping, and not the start of the decorator, so keep the line
|
194
|
+
filtered_lines.append(line)
|
195
|
+
|
196
|
+
processed_function_source = "\\n".join(filtered_lines)
|
197
|
+
# Update function_source with the processed version
|
198
|
+
function_source = processed_function_source
|
199
|
+
|
173
200
|
except (IOError, TypeError):
|
174
201
|
raise ValueError(
|
175
202
|
f"Could not retrieve source code for function {func.__name__}"
|
nebu/processors/models.py
CHANGED
@@ -7,14 +7,14 @@ nebu/containers/decorator.py,sha256=qiM7hbHne9MhSp1gDgX5z5bimsXr_YPjTIZoe09dwr4,
|
|
7
7
|
nebu/containers/models.py,sha256=0j6NGy4yto-enRDh_4JH_ZTbHrLdSpuMOqNQPnIrwC4,6815
|
8
8
|
nebu/containers/server.py,sha256=yFa2Y9PzBn59E1HftKiv0iapPonli2rbGAiU6r-wwe0,2513
|
9
9
|
nebu/processors/consumer.py,sha256=rFqd6gg2OYgXi3gf11GFpuaOOzuK1TYaPO-t_leSR8Y,15097
|
10
|
-
nebu/processors/decorate.py,sha256=
|
10
|
+
nebu/processors/decorate.py,sha256=ERCYk3D6L8GAg05NSZJG73kJx-hzNCskZFaN7-oBMZY,14437
|
11
11
|
nebu/processors/default.py,sha256=W4slJenG59rvyTlJ7gRp58eFfXcNOTT2Hfi6zzJAobI,365
|
12
|
-
nebu/processors/models.py,sha256=
|
12
|
+
nebu/processors/models.py,sha256=GvnI8UJrQSjHo2snP07cPfisCH90cEGTY-PZV5_AtXI,3654
|
13
13
|
nebu/processors/processor.py,sha256=oy2YdI-cy6qQWxrZhpZahJV46oWZlu_Im-jm811R_oo,9667
|
14
14
|
nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
|
15
15
|
nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
16
|
-
nebu-0.1.
|
17
|
-
nebu-0.1.
|
18
|
-
nebu-0.1.
|
19
|
-
nebu-0.1.
|
20
|
-
nebu-0.1.
|
16
|
+
nebu-0.1.11.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
17
|
+
nebu-0.1.11.dist-info/METADATA,sha256=yCMJNMUGXp93yIOHWJ860NsdopJMqR2VsT-X3bM18EU,1588
|
18
|
+
nebu-0.1.11.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
19
|
+
nebu-0.1.11.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
|
20
|
+
nebu-0.1.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|