Skip to content

Conversation

@LeanderCS
Copy link
Owner

@LeanderCS LeanderCS commented Sep 25, 2025

Summary by Bito

This pull request introduces a decorator-based system for defining fields in input filters, enhancing usability and maintainability. It includes the implementation of the FieldDescriptor class, performance optimizations, and comprehensive test coverage for the new features. The changelog has been updated, and several input filter classes have been refactored to adopt this new approach.

@LeanderCS LeanderCS requested a review from Copilot September 25, 2025 13:57
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 implements decorator field definition functionality for the Flask InputFilter library. It introduces a declarative API that allows fields, global components, and conditions to be defined using decorators, providing a more readable and maintainable alternative to the traditional imperative API.

Key changes:

  • Added FieldDescriptor class and field() function for declarative field definitions
  • Updated codebase to support both decorator and classic API simultaneously
  • Added comprehensive performance optimizations including Cython compiler directives and C++ optimizations

Reviewed Changes

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

Show a summary per file
File Description
flask_inputfilter/declarative/ New module containing field descriptor implementation and factory functions
tests/test_*.py Comprehensive test suites for new declarative functionality and mixed API usage
flask_inputfilter/_input_filter.pyx Core changes to register decorator components and performance optimizations
examples/ Updated examples demonstrating new declarative syntax
docs/source/changelog.rst Documentation of new feature

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

@LeanderCS LeanderCS force-pushed the implement-decorator-field-definition branch from c09b788 to 19bc9c3 Compare September 25, 2025 14:33
@LeanderCS LeanderCS force-pushed the implement-decorator-field-definition branch from 19bc9c3 to 8d03748 Compare September 25, 2025 14:35
@LeanderCS LeanderCS merged commit e431a4c into main Sep 25, 2025
3 checks passed
@LeanderCS LeanderCS deleted the implement-decorator-field-definition branch September 25, 2025 14:35
@sonarqubecloud
Copy link

@bito-code-review
Copy link

Bito Review Skipped - No Changes Detected

Bito didn't review this pull request because we did not detect any changes in the pull request to review.

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