Skip to content

refactor: Unify coding style across Rust and Python#110

Merged
tosh2230 merged 3 commits intomainfrom
refactor/coding-style
Apr 28, 2026
Merged

refactor: Unify coding style across Rust and Python#110
tosh2230 merged 3 commits intomainfrom
refactor/coding-style

Conversation

@tosh2230
Copy link
Copy Markdown
Collaborator

Summary

  • Rust: move function-level use to module top level, replace fully qualified paths with top-level imports, derive condition type strings from DesiredCondition enum instead of hardcoding
  • Python: use keyword arguments for all PyO3 binding and internal function calls, replace hardcoded output format strings with FORMAT_JSON/FORMAT_TEXT constants
  • Add coding style rules to CLAUDE.md

- Move function-level use statements to module top level in non-test code
- Replace fully qualified paths with top-level imports (tracing macros
  and derive/attribute macros excluded)
- Add DesiredCondition::condition_type_name() to eliminate hardcoded
  condition type strings in evaluate.rs
- Add tests for condition_type_name() using macro_rules
- Use keyword arguments for all PyO3 binding and internal function calls
- Replace hardcoded output format strings with FORMAT_JSON/FORMAT_TEXT
  constants in output.py
- Update test assertions to match kwargs calling convention
- Rust: top-level use, no fully qualified paths (tracing macros excepted),
  derive values from enums instead of hardcoding strings
- Python: kwargs for all function calls, named constants for fixed values
@tosh2230 tosh2230 merged commit f397da9 into main Apr 28, 2026
14 checks passed
@tosh2230 tosh2230 deleted the refactor/coding-style branch April 28, 2026 12:27
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.

1 participant