Skip to content

Commit 658f792

Browse files
committed
fix linter issues
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
1 parent e335746 commit 658f792

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

‎src/constants.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,9 @@
357357
# Upper bounds prevent operators from exceeding DB or application limits.
358358
SAVED_PROMPTS_DEFAULT_MAX_PER_USER: Final[int] = 50
359359
SAVED_PROMPTS_MAX_PER_USER_UPPER_BOUND: Final[int] = 200
360-
SAVED_PROMPTS_DEFAULT_MAX_DISPLAY_NAME_LENGTH: Final[int] = 255 # database column limit
361-
SAVED_PROMPTS_MAX_DISPLAY_NAME_LENGTH_UPPER_BOUND: Final[int] = 255 # database column limit
360+
SAVED_PROMPTS_DEFAULT_MAX_DISPLAY_NAME_LENGTH: Final[int] = 255 # database column limit
361+
SAVED_PROMPTS_MAX_DISPLAY_NAME_LENGTH_UPPER_BOUND: Final[int] = (
362+
255 # database column limit
363+
)
362364
SAVED_PROMPTS_DEFAULT_MAX_CONTENT_LENGTH: Final[int] = 10_000
363365
SAVED_PROMPTS_MAX_CONTENT_LENGTH_UPPER_BOUND: Final[int] = 30_000

‎tests/unit/models/test_saved_prompts_config.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,17 @@ def test_max_prompts_per_user_exceeds_upper_bound(self) -> None:
9999
def test_max_display_name_length_exceeds_upper_bound(self) -> None:
100100
"""Value above DB column limit raises ValidationError."""
101101
with pytest.raises(ValidationError, match="max_display_name_length"):
102-
overloaded_value = constants.SAVED_PROMPTS_MAX_DISPLAY_NAME_LENGTH_UPPER_BOUND + 1
102+
overloaded_value = (
103+
constants.SAVED_PROMPTS_MAX_DISPLAY_NAME_LENGTH_UPPER_BOUND + 1
104+
)
103105
SavedPromptsConfiguration(max_display_name_length=overloaded_value)
104106

105107
def test_max_content_length_exceeds_upper_bound(self) -> None:
106108
"""Value above upper bound raises ValidationError."""
107109
with pytest.raises(ValidationError, match="max_content_length"):
108-
overloaded_value = constants.SAVED_PROMPTS_MAX_CONTENT_LENGTH_UPPER_BOUND + 1
110+
overloaded_value = (
111+
constants.SAVED_PROMPTS_MAX_CONTENT_LENGTH_UPPER_BOUND + 1
112+
)
109113
SavedPromptsConfiguration(max_content_length=overloaded_value)
110114

111115

0 commit comments

Comments
 (0)