PyCharm 社区版中的 WxPython 没有完全自动完成
Not full auto completion for WxPython in PyCharm Community Edition
在这个例子中:
frame = wx.Frame(parent=None, title='Hello, World!')
wx.Frame
的自动完成功能有效,但在括号中无效。所以当我写 par
它没有自动完成 parent=
.
我尝试了 google 但没有找到答案。
我正在使用 PyCharm Community 2019.3。带有 Python 3.7.4 的 Miniconda3。 wxpython 4.0.4
Could you please navigate to Frame definition by Right Click on it -
Go To - Declaration or Usages. What parameters does its constructor
have?
def __init__(self, *args, **kw):
"""
Frame()
Frame(parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)
A frame is a window whose size and position can (usually) be changed
by the user.
"""
它显示了一个 \Miniconda3\Lib\site-packages\wx\core.pyi
文件,里面有 Frame
class。
由于 C++ wxFrame
构造函数被重载,因此我们需要使用 *args, **kw
来匹配任一重载。但是,这两个重载是在文档字符串的开头给出的,因此您仍然可以通过这种方式获取信息,更多详细信息位于 https://docs.wxpython.org/.
的文档中。
有一些计划改进生成到 .pyi
文件中的代码,包括使用类型提示注释和 typing.overload
装饰器,但可能需要一段时间才能完成。
在这个例子中:
frame = wx.Frame(parent=None, title='Hello, World!')
wx.Frame
的自动完成功能有效,但在括号中无效。所以当我写 par
它没有自动完成 parent=
.
我尝试了 google 但没有找到答案。
我正在使用 PyCharm Community 2019.3。带有 Python 3.7.4 的 Miniconda3。 wxpython 4.0.4
Could you please navigate to Frame definition by Right Click on it - Go To - Declaration or Usages. What parameters does its constructor have?
def __init__(self, *args, **kw):
"""
Frame()
Frame(parent, id=ID_ANY, title=EmptyString, pos=DefaultPosition, size=DefaultSize, style=DEFAULT_FRAME_STYLE, name=FrameNameStr)
A frame is a window whose size and position can (usually) be changed
by the user.
"""
它显示了一个 \Miniconda3\Lib\site-packages\wx\core.pyi
文件,里面有 Frame
class。
由于 C++ wxFrame
构造函数被重载,因此我们需要使用 *args, **kw
来匹配任一重载。但是,这两个重载是在文档字符串的开头给出的,因此您仍然可以通过这种方式获取信息,更多详细信息位于 https://docs.wxpython.org/.
有一些计划改进生成到 .pyi
文件中的代码,包括使用类型提示注释和 typing.overload
装饰器,但可能需要一段时间才能完成。