pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/MagicStack/MagicPython/commit/b645cc70b09c489f1550e00ea99334aeb410ae3c

/> tests: Add a test for illegal decorating syntax · MagicStack/MagicPython@b645cc7 · GitHub
Skip to content

Commit b645cc7

Browse files
committed
tests: Add a test for illegal decorating syntax
1 parent d3f7a83 commit b645cc7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

test/functions/decorators8.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@deco().abc # SyntaxError: invalid syntax
2+
def foo(): pass
3+
4+
5+
6+
@ : entity.name.function.decorator.python, meta.function.decorator.python, source.python
7+
deco : entity.name.function.decorator.python, meta.function.decorator.python, source.python
8+
( : meta.function.decorator.python, punctuation.definition.arguments.begin.python, source.python
9+
) : meta.function.decorator.python, punctuation.definition.arguments.end.python, source.python
10+
.abc : invalid.illegal.decorator.python, meta.function.decorator.python, source.python
11+
: source.python
12+
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
13+
SyntaxError: invalid syntax : comment.line.number-sign.python, source.python
14+
def : meta.function.python, source.python, storage.type.function.python
15+
: meta.function.python, source.python
16+
foo : entity.name.function.python, meta.function.python, source.python
17+
( : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.begin.python, source.python
18+
) : meta.function.parameters.python, meta.function.python, punctuation.definition.parameters.end.python, source.python
19+
: : meta.function.python, punctuation.section.function.begin.python, source.python
20+
: source.python
21+
pass : keyword.control.flow.python, source.python

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy