Skip to content

build: refactor configure.py#47323

Closed
VoltrexKeyva wants to merge 1 commit intonodejs:mainfrom
VoltrexKeyva:refact-conf
Closed

build: refactor configure.py#47323
VoltrexKeyva wants to merge 1 commit intonodejs:mainfrom
VoltrexKeyva:refact-conf

Conversation

@VoltrexKeyva
Copy link
Member

@VoltrexKeyva VoltrexKeyva commented Mar 30, 2023

  • 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.

Loading
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. i18n-api Issues and PRs related to the i18n implementation. needs-ci PRs that need a full CI run. 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.

7 participants