feat: Improvement version of pipe post #2

Merged
rdenadai merged 2 commits from rdenadai/improve-pipe-post into main 2025-09-09 02:24:05 +00:00
rdenadai commented 2025-09-09 02:13:48 +00:00 (Migrated from github.com)
No description provided.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-09-09 02:14:33 +00:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This PR significantly refactors a Python pipe operator implementation, simplifying the code while adding new functionality. The implementation now focuses on generator-based streaming and provides specialized helper classes for data type conversion.

Key changes:

  • Completely rewrote the pipe class with a cleaner, generator-focused approach
  • Added static methods filter and reduce to the pipe class for common operations
  • Replaced complex helper functions with structured converter classes (List, Dict, Set, String, Tuple)

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
static/pages/essays/28/README.pt-BR.md Updates Portuguese documentation with new pipe implementation and examples
static/pages/essays/28/README.md Updates English documentation with new pipe implementation and examples

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

## Pull Request Overview This PR significantly refactors a Python pipe operator implementation, simplifying the code while adding new functionality. The implementation now focuses on generator-based streaming and provides specialized helper classes for data type conversion. Key changes: - Completely rewrote the `pipe` class with a cleaner, generator-focused approach - Added static methods `filter` and `reduce` to the `pipe` class for common operations - Replaced complex helper functions with structured converter classes (`List`, `Dict`, `Set`, `String`, `Tuple`) ### Reviewed Changes Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments. | File | Description | | ---- | ----------- | | static/pages/essays/28/README.pt-BR.md | Updates Portuguese documentation with new pipe implementation and examples | | static/pages/essays/28/README.md | Updates English documentation with new pipe implementation and examples | --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/rdenadai/rdenadai.com.br/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
@ -302,25 +372,26 @@ def add_one(x: int) -> int:
def multiply_by_two(x: int) -> int:
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-09-09 02:14:32 +00:00

Line 394 contains an incomplete assertion statement that will cause a syntax error. The assertion should be completed with the expected result and proper closing bracket.

assert [person.name for person in result] == ["Bob", "David"]
Line 394 contains an incomplete assertion statement that will cause a syntax error. The assertion should be completed with the expected result and proper closing bracket. ```suggestion assert [person.name for person in result] == ["Bob", "David"] ```
@ -336,45 +407,52 @@ I will not go into technical details of how _Generators_ work; you can consult L
But, with the way we implemented the _pipe_ class, we get for free the partial execution that a streaming pipeline with generators would provide.
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-09-09 02:14:33 +00:00

The assertion statement is incomplete and will always pass. It should compare the result with the expected value using == 838.88 instead of just subtracting.

assert round(total, 2) == 838.88  # Total price after discount for Laptop and Monitor
The assertion statement is incomplete and will always pass. It should compare the result with the expected value using `== 838.88` instead of just subtracting. ```suggestion assert round(total, 2) == 838.88 # Total price after discount for Laptop and Monitor ```
@ -327,45 +408,52 @@ Não vou entrar em detalhes técnicos de como _Generators_ funcionam; você pode
Mas, do modo como implementamos a classe _pipe_, ganhamos gratuitamente a execução parcial que um pipeline de _streaming_ com geradores nos proporcionaria!
copilot-pull-request-reviewer[bot] (Migrated from github.com) commented 2025-09-09 02:14:33 +00:00

The assertion statement is incomplete and will always pass. It should compare the result with the expected value using == 838.88 instead of just subtracting.

assert round(total, 2) == 838.88  # Total price after discount for Laptop and Monitor
The assertion statement is incomplete and will always pass. It should compare the result with the expected value using `== 838.88` instead of just subtracting. ```suggestion assert round(total, 2) == 838.88 # Total price after discount for Laptop and Monitor ```
Sign in to join this conversation.
No description provided.