Skip to content

Commit

Permalink
fix: 🚑 use_guard fails with non-default argument follows default argu…
Browse files Browse the repository at this point in the history
…men (#46)
  • Loading branch information
lucas-labs authored Oct 12, 2024
1 parent 1fbc7b6 commit 8a70b60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pest/decorators/guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ def _apply_guard_to_method(
request_param_name = '__pest_guard_request__'
params = [
*params,
Parameter(request_param_name, Parameter.POSITIONAL_OR_KEYWORD, annotation=Request),
Parameter(
request_param_name,
Parameter.POSITIONAL_OR_KEYWORD,
annotation=Request,
default=Request({'type': 'http'}),
),
]
else:
request_param_name = request_parameter.name
Expand Down

0 comments on commit 8a70b60

Please sign in to comment.