Skip to content

refactor: rename 'codes' to 'lines' in Block class and related services#3

Merged
routerman merged 2 commits intomainfrom
feature/line
Aug 31, 2025
Merged

refactor: rename 'codes' to 'lines' in Block class and related services#3
routerman merged 2 commits intomainfrom
feature/line

Conversation

@routerman
Copy link
Owner

No description provided.

@routerman routerman requested a review from Copilot August 31, 2025 02:24
@routerman routerman self-assigned this Aug 31, 2025
Copy link

Copilot AI left a comment

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 by renaming the 'codes' attribute to 'lines' in the Block class and updating all related services to use the new naming. Additionally, it moves BlockType from an enum to a type definition and introduces a Lines type alias.

  • Renamed the 'codes' attribute to 'lines' throughout the codebase for better semantic clarity
  • Moved BlockType from src/enums/block_type to src/types/block_type
  • Added a new Lines type alias as List[str] for improved type safety

Reviewed Changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/entities/block.py Updated Block class to use 'lines' instead of 'codes' and import from types
src/entities/file.py Updated file writing logic to use block.lines
src/services/load_file_service.py Updated service to use 'lines' attribute and import BlockType from types
src/services/generate_import_statement_service.py Updated to use 'lines' attribute and added Lines type import
src/services/move_blocks_to_new_files_service.py Updated BlockType import path
src/services/attach_import_statements_service.py Added return type annotation
src/code_splitter.py Updated BlockType import path
src/types/lines.py New file defining Lines type alias
tests/services/test_load_file_service.py Updated all test assertions to use 'lines' instead of 'codes'

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@routerman routerman merged commit 008e8b6 into main Aug 31, 2025
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