great-sunset-355
06/25/2021, 11:55 AM"""A Python Pulumi program"""
import pulumi
from pulumi_aws import iam
iam.Role()
Show Hover action only shows (class) Role
- while I expect the whole docstring to show up. But it looks like the cause of this is that how docstrings are written and possibly usage of overload decorator as well
class MyClass:
@overload
def __init__(self, a:int)->None:
"""init INT"""
...
def __init__(self, *args, **kwargs) -> None:
pass # real implementation
If Classes had a class docstring like this it would at least shown that:
class MyClass:
"""A class doc."""
@overload
def __init__(self, a:int)->None:
"""init INT"""
...
def __init__(self, *args, **kwargs) -> None:
pass # real implementation
I wonder if pulumi adheres to any of the styling guides or "just generates docstrings"red-match-15116
06/25/2021, 6:04 PMI wonder if pulumi adheres to any of the styling guides or “just generates docstrings”😆 nice FWIW, we use reStructured Text - but VSCode and PyCharm actually prioritize different formats. PyCharm likes reStructured, VSCode prefers Google-style docstrings 🤷🏽
great-sunset-355
06/27/2021, 6:48 AMenum
python package and he created another package called aenum
- that could solve the probelm in 5142
https://stackoverflow.com/questions/52062831/how-do-i-properly-document-python-enum-elementsa
, picture 2 is from b
red-match-15116
06/27/2021, 7:27 PMgreat-sunset-355
06/28/2021, 5:00 AM