Skip to content

Improper Syntax Validation - Jedi - SyntaxError: cannot delete starred - Python39/lib/logging/__init__.py - Line 1034 #16174

@kathleenwest

Description

@kathleenwest

Jedi is a static analysis tool for Python that is typically used in IDEs/editors plugins (VS Code). This line of code is falsely marked as having a syntax error.
https://github.com/python/cpython/blob/1f2e3088f3c097b5bde69bbd63dfcd0852d31984/Lib/logging/init.py#L1034

Environment data

Version: 1.56.0 (user setup)
Commit: cfa2e218100323074ac1948c885448fdf4de2a7f
Date: 2021-05-04T22:09:06.405Z
Electron: 12.0.4
Chrome: 89.0.4389.114
Node.js: 14.16.0
V8: 8.9.255.24-electron.0
OS: Windows_NT x64 10.0.19042

Python 3.9.4
ms-python.python: v2021.4.765268190
.venv
Python39/lib/logging/init.py
jedi

Expected behaviour

Pass/Validate Syntax at Line
https://github.com/python/cpython/blob/1f2e3088f3c097b5bde69bbd63dfcd0852d31984/Lib/logging/init.py#L1034
del t, v, tb

Actual behaviour

See Picture Here
https://bugs.python.org/file50021/PythonError.jpg

Documented Originally Described Here https://bugs.python.org/issue44064

{
"resource": "/C:/Users/kathl/AppData/Local/Programs/Python/Python39/lib/logging/init.py",
"owner": "generated_diagnostic_collection_name#0",
"severity": 8,
"message": "SyntaxError: cannot delete starred",
"source": "jedi",
"startLineNumber": 1030,
"startColumn": 17,
"endLineNumber": 1030,
"endColumn": 29
}

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Use the Logger (example)
    logging.info('I am going to cause a syntax error in VS Code using jedi')

Logs

Python39/lib/logging/init.py

{
"resource": "/C:/Users/kathl/AppData/Local/Programs/Python/Python39/lib/logging/init.py",
"owner": "generated_diagnostic_collection_name#0",
"severity": 8,
"message": "SyntaxError: cannot delete starred",
"source": "jedi",
"startLineNumber": 1030,
"startColumn": 17,
"endLineNumber": 1030,
"endColumn": 29
}

Metadata

Metadata

Assignees

Labels

area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions