Skip to content

Use cached properties, string methods#31

Merged
alganet merged 1 commit into
mainfrom
modernization-refactor
Dec 15, 2025
Merged

Use cached properties, string methods#31
alganet merged 1 commit into
mainfrom
modernization-refactor

Conversation

@alganet

@alganet alganet commented Dec 15, 2025

Copy link
Copy Markdown
Owner

Description

Brief description of changes.

Type of Change

  • Bug fix
  • Refactoring
  • New feature
  • Breaking change
  • Documentation update

Checklist

  • Descriptive and concise commit message and PR details
  • Docstrings updated
  • Documentation updated

@alganet alganet force-pushed the modernization-refactor branch from f6119fd to e368f60 Compare December 15, 2025 20:39
@alganet alganet changed the title Use cached properties, match, string methods Use cached properties, string methods Dec 15, 2025
@alganet alganet requested a review from Copilot December 15, 2025 20:40
@alganet alganet marked this pull request as ready for review December 15, 2025 20:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the codebase to use Python's built-in @cached_property decorator and modern string methods for improved code clarity and maintainability.

  • Replaced manual caching implementation with @cached_property decorator for the aio accessor
  • Updated string manipulation to use removeprefix/removesuffix instead of string slicing
  • Updated test to reflect the new caching mechanism

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
apywire/runtime.py Replaced manual _aio_accessor caching logic with @cached_property decorator for the aio property
apywire/wiring.py Replaced string slicing with removeprefix/removesuffix methods in _extract_placeholder_name
tests/test_edge_cases.py Updated test comments and assertions to reflect @cached_property usage instead of manual caching

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/test_edge_cases.py
@alganet alganet merged commit 1c9a39d into main Dec 15, 2025
12 checks passed
@alganet alganet deleted the modernization-refactor branch December 15, 2025 20:48
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.

2 participants