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/d5be7182337cb8f2dbaca8af5a327ec79fd9efa9

" /> Add few more tests for PEP 484 typehinting comments · MagicStack/MagicPython@d5be718 · GitHub
Skip to content

Commit d5be718

Browse files
committed
Add few more tests for PEP 484 typehinting comments
1 parent 15f8127 commit d5be718

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

test/comments/typing1.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# type: ignore # test
22
# type: ignore
33
# type:ignore
4+
#type:ignore
45
# type: ignore 1
56
# type: 1 ignore
67
# type : ignore
@@ -24,6 +25,9 @@
2425
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
2526
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
2627
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
28+
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
29+
ignore : comment.line.number-sign.python, comment.typehint.ignore.notation.python, meta.typehint.comment.python, source.python
30+
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
2731
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
2832
: comment.line.number-sign.python, meta.typehint.comment.python, source.python
2933
ignore : comment.line.number-sign.python, comment.typehint.variable.notation.python, meta.typehint.comment.python, source.python

test/comments/typing6.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
a=1#type:int
2+
a=1#type:int#int
3+
4+
5+
6+
a : source.python
7+
= : keyword.operator.assignment.python, source.python
8+
1 : constant.numeric.dec.python, source.python
9+
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
10+
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
11+
int : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
12+
a : source.python
13+
= : keyword.operator.assignment.python, source.python
14+
1 : constant.numeric.dec.python, source.python
15+
# : comment.line.number-sign.python, meta.typehint.comment.python, source.python
16+
type: : comment.line.number-sign.python, comment.typehint.directive.notation.python, meta.typehint.comment.python, source.python
17+
int : comment.line.number-sign.python, comment.typehint.type.notation.python, meta.typehint.comment.python, source.python
18+
# : comment.line.number-sign.python, punctuation.definition.comment.python, source.python
19+
int : comment.line.number-sign.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