Files
kleinanzeigen-bot/tests
Jens 8e70d0411d refactor: decompose WebScrapingMixin (static helpers, diagnostics, exception annotations) (#1174)
## ℹ️ Description

Decompose `WebScrapingMixin` — incremental internal refactors to reduce
class size and improve separation of concerns.

## 📋 Changes Summary

### Static method extraction
- Extract 5 `@staticmethod` members from `WebScrapingMixin` to
module-level private functions in `web_scraping_mixin.py`
- Update internal call sites and test call sites (no compatibility
aliases)

### Browser diagnostics extraction
- Create `src/kleinanzeigen_bot/utils/browser_diagnostics.py` with
module-level diagnostic functions
- `WebScrapingMixin.diagnose_browser_issues()` → thin delegator
(resolves `self` attrs, calls extracted logic)
- Replace `self`-coupled logic with explicit parameter dependencies
- Migrate translations to new module section in `translations.de.yaml`

### Exception annotations
- Add `# noqa: BLE001` + justification comments to 4 bare `except
Exception:` blocks (no behavior changes)

### ⚙️ Type of Change
- [x] 🔧 Refactor (internal code improvements, no behavior changes)

##  Checklist
- [x] I have reviewed my changes to ensure they meet the project
standards.
- [x] I have tested my changes and ensured that all tests pass (`pdm run
test`) — 1287 passed, 4 skipped
- [x] I have formatted the code (`pdm run format`)
- [x] I have verified that linting passes (`pdm run lint`) — ruff, mypy,
pyright clean
- [x] I have updated documentation where necessary.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added enhanced browser troubleshooting with remote-debugging
connectivity checks, running-process inspection, and Chrome/Edge
compatibility validation including recommended configuration updates.
* **Refactor**
* Reorganized browser/session diagnostics and remote-debugging argument
handling into dedicated utilities; introduced a shared browser runtime
configuration container.
* **Chores**
* Suppressed linter warnings for intentionally broad exception handling.
* **Tests**
* Updated unit and integration tests to match the new diagnostics flow
and remote-debugging probing behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-06-24 10:36:42 +02:00
..