You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
π€ **Codex-generated PR** β Please review carefully.
## Summary
- resolve WPS5XX issues in source code for control-flow and style
patterns
- update logic in console, errors, handlers, stats, apps, and audit
plugin for wemake compliance
- remove `WPS504,WPS518,WPS519,WPS529` from flake8 per-file ignores in
`pyproject.toml`
## Validation
- `make check-all`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
Closes [MPT-17825](https://softwareone.atlassian.net/browse/MPT-17825)
## Release Notes
- **cli/core/console.py**: Refactored per-character styling to build
Text pieces via indexed iteration and Text.assemble instead of in-place
char.stylize.
- **cli/core/errors.py**: Consolidated HTTP error handling in
`wrap_http_error`; added `_parse_bad_request_message(response)` to
extract BAD_REQUEST JSON errors with graceful fallbacks.
- **cli/core/handlers/errors.py**: Simplified
`ExcelFileHandlerError.__init__` to default message/details cleanly and
copy details into a new list when provided.
- **cli/core/handlers/excel_file_handler.py**: Inverted
`_clean_worksheets` logic to clear the entire cache when no sheet is
specified and remove a specific sheet when provided.
- **cli/core/nested_dicts.py**: Simplified nested path setting control
flow; base-case returns after dict.update and intermediate non-dict
values are treated as missing/overwritten.
- **cli/core/products/app.py**: Minor refactor of `out_path` assignment
to use an explicit None check (behavior unchanged).
- **cli/core/products/models/template.py**: Reordered None-check in
`to_xlsx` default handling (behavior unchanged).
- **cli/core/stats.py**: Made `ErrorMessagesCollector.__str__` robust to
missing empty-key sections by using `section.get("", [])` and
conditional appending.
- **cli/plugins/audit_plugin/app.py**: Inverted conditional used to
display Source/Target Value columns so missing values show red
"<missing>" consistently.
- **pyproject.toml**: Removed per-file flake8 ignores for WPS518,
WPS519, and WPS529 to align with wemake-python-styleguide WPS5XX rules.
- **Tests**: Added/updated tests covering error wrapping, Excel file
handler cache behavior, nested dict overwriting, and
ExcelFileHandlerError detail copying.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
[MPT-17825]:
https://softwareone.atlassian.net/browse/MPT-17825?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
0 commit comments