Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use main in conversion script #25973

Merged
merged 2 commits into from
Sep 5, 2023
Merged

Use main in conversion script #25973

merged 2 commits into from
Sep 5, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Sep 5, 2023

What does this PR do?

Put the code under if __name__ == "__main__": so it won't affect other stuff (for example, pytest collection).

Doctest is currently failing due to this, see here

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

My bad, I forgot the tests would cover a script I put in that directory!

@ydshieh ydshieh merged commit 391f264 into main Sep 5, 2023
@ydshieh ydshieh deleted the use_main_in_conversion_script branch September 5, 2023 11:04
parambharat pushed a commit to parambharat/transformers that referenced this pull request Sep 26, 2023
* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
blbadger pushed a commit to blbadger/transformers that referenced this pull request Nov 8, 2023
* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
EduardoPach pushed a commit to EduardoPach/transformers that referenced this pull request Nov 18, 2023
* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
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.

2 participants