atom-community / atom-community/ide-python
typing.TYPE_CHECKING not true during dev
- 主要语言
- JavaScript
- 星标
- 238
- 派生
- 40
- PR 合并指标
- 30 天内没有已合并 PR
描述
Seems like typing.TYPE_CHECKING is not true during dev.
e.g.:
```py
from typing import TYPE_CHECKING:
if TYPE_CHECKING:
from somewhere import MyClass
async def myFunction(x:str, a:int, c:"MyClass"):
c.someva # no auto-complete or suggestion here
```
if line 2 is `if TYPE_CHECKING or True`
code will be suggested and autocompleted.
based on typing.py L1444:
```py
# Constant that's True when type checking, but False here.
TYPE_CHECKING = False
```
OS Ubuntu 18.04.2 LTS
Python 3.7.1
Am i missing something, or wrong configuration?
贡献指南
调研方向
首先,使用 TYPE_CHECKING 示例在 Ubuntu 18.04.2 上通过 Python 3.7.1 重现报告的行为,并将其与 `typing.py` L1444 处的参考进行比较。跟踪 IDE 自动补全或语言服务器的入口点;当由 TYPE_CHECKING 保护的导入在不改变条件的情况下提供预期的建议时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- developer-experience
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100