Skip to content

Commit 36b384a

Browse files
committed
docs(expression.py): simplify grammar documentation by defining kwargs separately
1 parent 3d07791 commit 36b384a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_pytest/mark/expression.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
expression: expr? EOF
66
expr: and_expr ('or' and_expr)*
77
and_expr: not_expr ('and' not_expr)*
8-
not_expr: 'not' not_expr | '(' expr ')' | ident ('(' name '=' value ( ', ' name '=' value )* ')')?
8+
not_expr: 'not' not_expr | '(' expr ')' | ident kwargs?
99
1010
ident: (\w|:|\+|-|\.|\[|\]|\\|/)+
11+
kwargs: ('(' name '=' value ( ', ' name '=' value )* ')')
1112
name: a valid ident, but not a reserved keyword
1213
value: (unescaped) string literal | (-)?[0-9]+ | 'False' | 'True' | 'None'
1314

0 commit comments

Comments
 (0)