Skip to content

Commit 6a0cb2d

Browse files
committed
Fixed merge method to fit expected behavior
1 parent 7e5cc32 commit 6a0cb2d

File tree

76 files changed

+433
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+433
-35
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Test Library
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.11
19+
20+
- name: Install build tools and test dependencies
21+
run: pip install build pytest
22+
23+
- name: Build the library
24+
run: python -m build
25+
id: build
26+
27+
- name: Install built library
28+
run: pip install dist/*.whl
29+
30+
- name: Verify library usage - Part I
31+
run: |
32+
echo "import flask_inputfilter.InputFilter" > test_script.py
33+
python test_script.py
34+
35+
- name: Verify library usage - Part II
36+
run: pytest test/

docs/changelog.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ Changelog
44
All notable changes to this project will be documented in this file.
55

66

7+
[0.1.2] - 2025-03-29
8+
--------------------
9+
10+
Added
11+
^^^^^
12+
- getConditions
13+
- getGlobalFilters
14+
- getGlobalValidators
15+
- clear
16+
17+
Changed
18+
^^^^^^^
19+
- Fixed ``merge`` method to fit expected behavior.
20+
21+
722
[0.1.1] - 2025-03-29
823
--------------------
924

@@ -34,7 +49,6 @@ Added
3449

3550
Removed
3651
^^^^^^^
37-
3852
- IsMimeTypeValidator
3953

4054

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
project = "flask-inputfilter"
22
copyright = "2025, Leander Cain Slotosch"
33
author = "Leander Cain Slotosch"
4-
release = "0.1.1"
4+
release = "0.1.2"
55

66
extensions = ["sphinx_rtd_theme"]
77

flask_inputfilter/Condition/ArrayLengthEqualCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class ArrayLengthEqualCondition(BaseCondition):
88
Condition that checks if the array is of the specified length.
99
"""
1010

11+
__slots__ = ("first_array_field", "second_array_field")
12+
1113
def __init__(
1214
self, first_array_field: str, second_array_field: str
1315
) -> None:

flask_inputfilter/Condition/ArrayLongerThanCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class ArrayLongerThanCondition(BaseCondition):
88
Condition that checks if the array is longer than the specified length.
99
"""
1010

11+
__slots__ = ("longer_field", "shorter_field")
12+
1113
def __init__(self, longer_field: str, shorter_field: str) -> None:
1214
self.longer_field = longer_field
1315
self.shorter_field = shorter_field

flask_inputfilter/Condition/CustomCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class CustomCondition(BaseCondition):
88
Allows users to define their own condition as a callable.
99
"""
1010

11+
__slots__ = "condition"
12+
1113
def __init__(self, condition: Callable[[Dict[str, Any]], bool]) -> None:
1214
self.condition = condition
1315

flask_inputfilter/Condition/EqualCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class EqualCondition(BaseCondition):
88
Condition that checks if two fields are equal.
99
"""
1010

11+
__slots__ = ("first_field", "second_field")
12+
1113
def __init__(self, first_field: str, second_field: str) -> None:
1214
self.first_field = first_field
1315
self.second_field = second_field

flask_inputfilter/Condition/ExactlyNOfCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class ExactlyNOfCondition(BaseCondition):
99
fields are present in the data.
1010
"""
1111

12+
__slots__ = ("fields", "n")
13+
1214
def __init__(self, fields: List[str], n: int) -> None:
1315
self.fields = fields
1416
self.n = n

flask_inputfilter/Condition/ExactlyNOfMatchesCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class ExactlyNOfMatchesCondition(BaseCondition):
99
match with the value.
1010
"""
1111

12+
__slots__ = ("fields", "n", "value")
13+
1214
def __init__(self, fields: List[str], n: int, value: Any) -> None:
1315
self.fields = fields
1416
self.n = n

flask_inputfilter/Condition/ExactlyOneOfCondition.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ class ExactlyOneOfCondition(BaseCondition):
88
Condition that ensures exactly one of the specified fields is present.
99
"""
1010

11+
__slots__ = "fields"
12+
1113
def __init__(self, fields: List[str]) -> None:
1214
self.fields = fields
1315

0 commit comments

Comments
 (0)