Skip to content

Commit

Permalink
[python] remove useless docstring for models (#6138)
Browse files Browse the repository at this point in the history
fix #6115

in our current design, read-only are not exposed as __init__ kwarg like
it used to be (e.g.
[here](https://github.com/Azure/autorest.python/blob/ac9d2bcd5b7965258a5d4094c78fd234ab31f030/packages/typespec-python/test/azure/generated/headasbooleantrue/headasbooleantrue/models/_models.py#L33-L70)).
So we could remove the sentence `Readonly variables are only populated
by the server, and will be ignored when sending a request` now.
  • Loading branch information
msyyc authored Feb 26, 2025
1 parent c6ae78e commit 63c8b54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .chronus/changes/python-models-docstring-2025-1-25-2-51-40.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking
changeKind: fix
packages:
- "@typespec/http-client-python"
---

[python] remove useless docstring for models
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

{{ serializer.discriminator_docstring(model) | wordwrap(width=95, break_long_words=False, break_on_hyphens=False, wrapstring='\n ') }}
{% endif %}
{% if model.has_readonly_or_constant_property %}

Readonly variables are only populated by the server, and will be ignored when sending a request.
{% endif %}

{% if model.properties != None %}
{% for p in model.properties %}
Expand Down

0 comments on commit 63c8b54

Please sign in to comment.