Skip to content

Commit 9eae43b

Browse files
noisycat3noisycat3
andauthored
Fix docstring removing regex to support empty parentheses (#360)
Co-authored-by: noisycat3 <noisy@cat.cat>
1 parent 54dce97 commit 9eae43b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎unsloth_zoo/compiler.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,8 @@ def create_standalone_class(
806806
source = source + full_class
807807

808808
# Remove @auto_docstring
809-
source = re.sub(r"@auto_docstring[\s]{0,}(\([^\)]{1,}\))?", "", source)
810-
source = re.sub(r"@check_model_inputs[\s]{0,}(\([^\)]{1,}\))?", "", source)
809+
source = re.sub(r"@auto_docstring[\s]{0,}(\([^\)]{0,}\))?", "", source)
810+
source = re.sub(r"@check_model_inputs[\s]{0,}(\([^\)]{0,}\))?", "", source)
811811
# source = source.replace("@auto_docstring", "")
812812

813813
# Fix Gemma 3 ignore_index being not set!

0 commit comments

Comments
 (0)