infra: remove prints from notebook build (#21688)

This commit is contained in:
Erick Friis
2024-05-14 16:27:56 -07:00
committed by William Fu-Hinthorn
parent 3fa1219d2c
commit d5a9e91bdf

View File

@@ -84,12 +84,8 @@ class CustomRegexRemovePreprocessor(Preprocessor):
pattern = re.compile(r"(?s)(?:\s*\Z)|(?:.*#\s*\|\s*output:\s*false.*)")
rtn = not pattern.match(cell.source)
if not rtn:
print("--remove--")
print(cell.source)
return False
else:
print("--keep--")
print(cell.source)
return True
def preprocess(self, nb, resources):