| 1 | """ |
| 2 | Special cases of completions (typically special positions that caused issues |
| 3 | with value parsing. |
| 4 | """ |
| 5 | |
| 6 | def pass_decorator(func): |
| 7 | return func |
| 8 | |
| 9 | |
| 10 | def x(): |
| 11 | return ( |
| 12 | 1, |
| 13 | #? ["tuple"] |
| 14 | tuple |
| 15 | ) |
| 16 | |
| 17 | # Comment just somewhere |
| 18 | |
| 19 | |
| 20 | class MyClass: |
| 21 | @pass_decorator |
| 22 | def x(foo, |
| 23 | #? 5 [] |
| 24 | tuple, |
| 25 | ): |
| 26 | return 1 |
| 27 | |
| 28 | |
| 29 | if x: |
| 30 | pass |
| 31 | #? ['else'] |
| 32 | else |
| 33 | |
| 34 | # python >= 3.11 |
| 35 | try: |
| 36 | pass |
| 37 | #? ['except', 'Exception', 'ExceptionGroup'] |
| 38 | except |
| 39 | |
| 40 | try: |
| 41 | pass |
| 42 | #? 6 ['except', 'Exception', 'ExceptionGroup'] |
| 43 | except AttributeError: |
| 44 | pass |
| 45 | #? ['finally'] |
| 46 | finally |
| 47 | |
| 48 | for x in y: |
| 49 | pass |
| 50 | #? ['else'] |
| 51 | else |