Skip to content

Conversation

@JieyuZ2
Copy link
Collaborator

@JieyuZ2 JieyuZ2 commented Jul 14, 2023

Why are these changes needed?

modify from
code[11 : code.find("\n")].strip()
to
code[11 : code.find(".py")].strip() + '.py'

otherwise, invalid python file name would cause issue in committing current docker

Checks

modify from 
`code[11 : code.find("\n")].strip()`
to 
`code[11 : code.find(".py")].strip() + '.py'`

otherwise, invalid python file name would cause issue in committing current docker
elif lang in ["python", "Python"]:
if code.startswith("# filename: "):
filename = code[11 : code.find("\n")].strip()
filename = code[11 : code.find(".py")].strip() + '.py'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if the file ends with ".sh" or others?

@sonichi
Copy link
Contributor

sonichi commented Jul 14, 2023

Please use https://microsoft.github.io/FLAML/docs/Contribute#pre-commit to pass code format check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants