build: refactor configure.py by VoltrexKeyva · Pull Request #47323 · nodejs/node

@nodejs-github-bot added build

Issues and PRs related to build files or the CI.

needs-ci

PRs that need a full CI run.

labels

Mar 30, 2023

@Trott Trott added the python

PRs and issues that require attention from people who are familiar with Python.

label

Mar 30, 2023

targos

VoltrexKeyva

@targos targos removed their request for review

April 12, 2023 08:19

cclauss

cclauss

cclauss

@VoltrexKeyva

- Explicitly specify the encoding when opening files.
- Use f-strings to format strings.
- Use `isinstance()` for type checks instead of `type()`.
- Use the `with` keyword for resource-allocating operations.
- Avoid using multiple statements in a single line.
- Remove unnecessary `else` clauses after `return`.
- Iterate with the `items()` method of dictionaries when both the key
and value are used.
- Remove unnecessary parentheses.
- Rename unused unpacked variables to `_`, `_1`, etc etc.
- Rename the `list` variable to avoid conflict with the global
`list()` function.
- Remove unused `path` parameter of the `icu_download()` function.
- Use the `pathlib` library for paths instead of `os.path`.

cclauss

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 16, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 16, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 17, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 17, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 18, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 21, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

Apr 21, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

May 1, 2023

VoltrexKeyva added a commit to VoltrexKeyva/node that referenced this pull request

May 2, 2023

nodejs-github-bot pushed a commit that referenced this pull request

May 2, 2023
Use Python's `pathlib` library for paths and related operations
instead of `os.path`.

Refs: #47323 (comment) #47323 (comment)
PR-URL: #47581
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

targos pushed a commit that referenced this pull request

May 3, 2023
Use Python's `pathlib` library for paths and related operations
instead of `os.path`.

Refs: #47323 (comment) #47323 (comment)
PR-URL: #47581
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

targos pushed a commit that referenced this pull request

May 3, 2023
Use Python's `pathlib` library for paths and related operations
instead of `os.path`.

Refs: #47323 (comment) #47323 (comment)
PR-URL: #47581
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

danielleadams pushed a commit that referenced this pull request

Jul 6, 2023
Use Python's `pathlib` library for paths and related operations
instead of `os.path`.

Refs: #47323 (comment) #47323 (comment)
PR-URL: #47581
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Christian Clauss <cclauss@me.com>

MoLow pushed a commit to MoLow/node that referenced this pull request

Jul 6, 2023

@srl295 srl295 added the i18n-api

Issues and PRs related to the i18n implementation.

label

Oct 1, 2024