infra: remove prints from notebook build (v0.1) (#21689)

This commit is contained in:
Erick Friis 2024-05-14 16:27:44 -07:00 committed by GitHub
parent 03bd0f51c9
commit 4ea6f882d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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