Skip to content

♻️ refactor(cli): minor cleanups in builder and CLI#1099

Merged
henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/refactor/small-cleanups
Jun 13, 2026
Merged

♻️ refactor(cli): minor cleanups in builder and CLI#1099
henryiii merged 3 commits into
pypa:mainfrom
henryiii:henryiii/refactor/small-cleanups

Conversation

@henryiii

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

  • Use tomllib.load(f) directly on the binary file handle in _read_pyproject_toml instead of tomllib.loads(f.read().decode())
  • Remove the redundant _styles.set(_NO_COLORS) inside the NO_COLOR branch of _init_colors; the trailing call already handles it
  • Compute os.path.isfile(args.srcdir) once as is_file instead of twice in main
  • Rename local variable buildrun_build in main to avoid shadowing the top-level import build module

Refs #1097

henryiii added 3 commits June 13, 2026 01:51
- Use `tomllib.load` directly on binary file handle instead of `.read().decode()`
- Remove redundant `_styles.set(_NO_COLORS)` inside the `NO_COLOR` branch of `_init_colors`
- Compute `os.path.isfile(args.srcdir)` once (`is_file`) instead of twice in `main`
- Rename local variable `build` to `run_build` in `main` to avoid shadowing the top-level `build` module

Assisted-by: ClaudeCode:claude-sonnet-4.6
Assisted-by: ClaudeCode:claude-sonnet-4.6
Assisted-by: ClaudeCode:claude-opus-4.8
@henryiii henryiii marked this pull request as ready for review June 13, 2026 06:00
@henryiii henryiii merged commit cae435c into pypa:main Jun 13, 2026
59 checks passed
@henryiii henryiii deleted the henryiii/refactor/small-cleanups branch June 13, 2026 12:20
henryiii added a commit to henryiii/build that referenced this pull request Jun 14, 2026
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