googleapis / sphinx-docfx-yaml

Forked sphinx-docfx-yaml repository for creating DocFX YAML for Python Client Libraries
Apache License 2.0
5 stars 7 forks source link

Optional parameters docstring not retrieved #313

Closed dandhlee closed 2 months ago

dandhlee commented 1 year ago

When the method signature includes pseudo parameter to enforce positional/keyword arguments, those optional parameters are not included in the documentation.

Example:

tune_model(
    training_data: typing.Union[str, pandas.core.frame.DataFrame],
    *,
    train_steps: typing.Optional[int] = None,
    learning_rate: typing.Optional[float] = None,
    learning_rate_multiplier: typing.Optional[float] = None,
    tuning_job_location: typing.Optional[str] = None,
    tuned_model_location: typing.Optional[str] = None,
    model_display_name: typing.Optional[str] = None,
    tuning_evaluation_spec: typing.Optional[
        vertexai.language_models._language_models.TuningEvaluationSpec
    ] = None,
    default_context: typing.Optional[str] = None
) -> vertexai.language_models._language_models._LanguageModelTuningJob

only returns docstring for traning_data.