mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-24 15:43:54 +00:00
infra: remove prints from notebook build (v0.1) (#21689)
This commit is contained in:
parent
03bd0f51c9
commit
4ea6f882d4
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user