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

tools: revise install.py for minor improvements #36626

Merged
merged 1 commit into from
Dec 27, 2020

Conversation

Trott
Copy link
Member

@Trott Trott commented Dec 25, 2020

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the build Issues and PRs related to build files or the CI. label Dec 25, 2020
@Trott Trott added python PRs and issues that require attention from people who are familiar with Python. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 25, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 25, 2020
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

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

Not blocking, but could those changes be enforced by our Python linter?

tools/install.py Outdated
@@ -19,7 +19,8 @@ def abspath(*args):
return os.path.abspath(path)

def load_config():
s = open('config.gypi').read()
with open('config.gypi') as f:
s = f.read()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
s = f.read()
return ast.literal_eval(f.read())

Copy link
Member Author

Choose a reason for hiding this comment

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

Added in a fixup commit. Thanks for the review!

@nodejs-github-bot
Copy link
Collaborator

* Use an with block for reading the config file.
Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

* Use explicit blank return to make it clear that the return value is
  not actually used and that it is being used for flow control only..

PR-URL: nodejs#36626
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
@Trott Trott merged commit 245159f into nodejs:master Dec 27, 2020
@Trott
Copy link
Member Author

Trott commented Dec 27, 2020

Landed in 245159f

@Trott Trott deleted the install-refactor branch December 27, 2020 14:31
danielleadams pushed a commit that referenced this pull request Jan 12, 2021
* Use an with block for reading the config file.
Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

* Use explicit blank return to make it clear that the return value is
  not actually used and that it is being used for flow control only..

PR-URL: #36626
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
@danielleadams danielleadams mentioned this pull request Jan 12, 2021
targos pushed a commit that referenced this pull request May 1, 2021
* Use an with block for reading the config file.
Refs: https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files

* Use explicit blank return to make it clear that the return value is
  not actually used and that it is being used for flow control only..

PR-URL: #36626
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Christian Clauss <cclauss@me.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. python PRs and issues that require attention from people who are familiar with Python.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants