Skip to content

refactor: modernize python samples and integrate ruff linter - #6

Merged
wry-ry merged 1 commit into
Universal-Commerce-Protocol:mainfrom
0x8000-0000:main
Jan 12, 2026
Merged

refactor: modernize python samples and integrate ruff linter#6
wry-ry merged 1 commit into
Universal-Commerce-Protocol:mainfrom
0x8000-0000:main

Conversation

@0x8000-0000

Copy link
Copy Markdown
Contributor
  • Integrate ruff as the primary linter and formatter in pyproject.toml.
  • Replace os.path usage with pathlib.Path for improved path handling.
  • Update type annotations to use modern syntax (e.g., str | None instead of Optional[str]).
  • Use Annotated for FastAPI dependencies to improve readability and tool support.
  • Standardize code formatting across all Python sample files using a 2-space indentation.
  • Add missing docstrings and __init__.py files to improve package structure and documentation.
  • Address various linting warnings and modernize import statements.

- Integrate `ruff` as the primary linter and formatter in `pyproject.toml`.
- Replace `os.path` usage with `pathlib.Path` for improved path handling.
- Update type annotations to use modern syntax (e.g., `str | None` instead of `Optional[str]`).
- Use `Annotated` for FastAPI dependencies to improve readability and tool support.
- Standardize code formatting across all Python sample files using a 2-space indentation.
- Add missing docstrings and `__init__.py` files to improve package structure and documentation.
- Address various linting warnings and modernize import statements.
@0x8000-0000
0x8000-0000 requested a review from a team January 12, 2026 16:39
@0x8000-0000

Copy link
Copy Markdown
Contributor Author

More details regarding fixed comprehensive linting warnings:

  • Wrapped long lines to comply with the 80-character limit.
  • Updated docstrings to use the imperative mood.
  • Added missing docstrings for classes, packages, and init methods.
  • Replaced 'os.path' usage with 'pathlib.Path' for modern path management.
  • Migrated FastAPI dependencies to use 'Annotated' for better type safety and linting.
  • Removed unused imports and simplified boolean logic.

@wry-ry
wry-ry merged commit c657ae8 into Universal-Commerce-Protocol:main Jan 12, 2026
3 checks passed
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