Skip to content

Commit ae23918

Browse files
author
Coding Agent
committed
https://github.com/Penify-dev/PyDocSmith.git
1 parent 37d8803 commit ae23918

7 files changed

Lines changed: 567 additions & 0 deletions

File tree

README.es.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,87 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126126
print(docstring_text)
127127
```
128128

129+
### Analizando Docstrings de Estilo Google
130+
131+
Analizar una docstring de estilo Google:
132+
133+
```python
134+
from PyDocSmith import parse, DocstringStyle
135+
136+
docstring = """
137+
Short description.
138+
139+
Long description.
140+
141+
Args:
142+
param1 (int): Description of param1
143+
param2 (str, optional): Description of param2
144+
145+
Returns:
146+
int: Description of return value
147+
"""
148+
149+
parsed = parse(docstring, style=DocstringStyle.GOOGLE)
150+
print(parsed)
151+
```
152+
153+
### Analizando Docstrings de Estilo Epydoc
154+
155+
Analizar una docstring de estilo Epydoc:
156+
157+
```python
158+
from PyDocSmith import parse, DocstringStyle
159+
160+
docstring = """
161+
Short description.
162+
163+
@param param1: Description of param1
164+
@type param1: int
165+
@param param2: Description of param2
166+
@type param2: str
167+
@return: Description of return value
168+
@rtype: int
169+
"""
170+
171+
parsed = parse(docstring, style=DocstringStyle.EPYDOC)
172+
print(parsed)
173+
```
174+
175+
### Analizando Docstrings de Atributos desde una Clase
176+
177+
Analizar docstrings desde una clase incluyendo docstrings de atributos:
178+
179+
```python
180+
from PyDocSmith import parse_from_object
181+
182+
class ExampleClass:
183+
"""Class docstring."""
184+
185+
attr1: int
186+
"""Attribute 1 description."""
187+
188+
attr2: str = "default"
189+
"""Attribute 2 description."""
190+
191+
def method(self):
192+
pass
193+
194+
parsed = parse_from_object(ExampleClass)
195+
print(parsed)
196+
```
197+
198+
### Componiendo con Indentación Personalizada
199+
200+
Componer una docstring con indentación personalizada:
201+
202+
```python
203+
from PyDocSmith import compose, DocstringStyle
204+
205+
# Assuming you have a parsed_docstring from previous examples
206+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST, indent=4)
207+
print(docstring_text)
208+
```
209+
129210
## Características avanzadas
130211

131212
- **Analizar desde objeto:** PyDocSmith puede analizar docstrings directamente desde objetos Python, incluyendo clases y módulos, incorporando docstrings de atributos en la representación estructurada.

README.fr.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,87 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126126
print(docstring_text)
127127
```
128128

129+
### Analyse des Docstrings de Style Google
130+
131+
Analyser une docstring de style Google:
132+
133+
```python
134+
from PyDocSmith import parse, DocstringStyle
135+
136+
docstring = """
137+
Short description.
138+
139+
Long description.
140+
141+
Args:
142+
param1 (int): Description of param1
143+
param2 (str, optional): Description of param2
144+
145+
Returns:
146+
int: Description of return value
147+
"""
148+
149+
parsed = parse(docstring, style=DocstringStyle.GOOGLE)
150+
print(parsed)
151+
```
152+
153+
### Analyse des Docstrings de Style Epydoc
154+
155+
Analyser une docstring de style Epydoc:
156+
157+
```python
158+
from PyDocSmith import parse, DocstringStyle
159+
160+
docstring = """
161+
Short description.
162+
163+
@param param1: Description of param1
164+
@type param1: int
165+
@param param2: Description of param2
166+
@type param2: str
167+
@return: Description of return value
168+
@rtype: int
169+
"""
170+
171+
parsed = parse(docstring, style=DocstringStyle.EPYDOC)
172+
print(parsed)
173+
```
174+
175+
### Analyse des Docstrings d'Attributs depuis une Classe
176+
177+
Analyser les docstrings depuis une classe incluant les docstrings d'attributs:
178+
179+
```python
180+
from PyDocSmith import parse_from_object
181+
182+
class ExampleClass:
183+
"""Class docstring."""
184+
185+
attr1: int
186+
"""Attribute 1 description."""
187+
188+
attr2: str = "default"
189+
"""Attribute 2 description."""
190+
191+
def method(self):
192+
pass
193+
194+
parsed = parse_from_object(ExampleClass)
195+
print(parsed)
196+
```
197+
198+
### Composition avec Indentation Personnalisée
199+
200+
Composer une docstring avec une indentation personnalisée:
201+
202+
```python
203+
from PyDocSmith import compose, DocstringStyle
204+
205+
# Assuming you have a parsed_docstring from previous examples
206+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST, indent=4)
207+
print(docstring_text)
208+
```
209+
129210
## Fonctionnalités avancées
130211

131212
- **Analyser depuis l'objet :** PyDocSmith peut analyser les docstrings directement depuis les objets Python, y compris les classes et les modules, en incorporant les docstrings d'attributs dans la représentation structurée.

README.hi.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,87 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126126
print(docstring_text)
127127
```
128128

129+
### Google शैली Docstrings का पार्सिंग
130+
131+
एक Google-शैली docstring पार्स करें:
132+
133+
```python
134+
from PyDocSmith import parse, DocstringStyle
135+
136+
docstring = """
137+
Short description.
138+
139+
Long description.
140+
141+
Args:
142+
param1 (int): Description of param1
143+
param2 (str, optional): Description of param2
144+
145+
Returns:
146+
int: Description of return value
147+
"""
148+
149+
parsed = parse(docstring, style=DocstringStyle.GOOGLE)
150+
print(parsed)
151+
```
152+
153+
### Epydoc शैली Docstrings का पार्सिंग
154+
155+
एक Epydoc-शैली docstring पार्स करें:
156+
157+
```python
158+
from PyDocSmith import parse, DocstringStyle
159+
160+
docstring = """
161+
Short description.
162+
163+
@param param1: Description of param1
164+
@type param1: int
165+
@param param2: Description of param2
166+
@type param2: str
167+
@return: Description of return value
168+
@rtype: int
169+
"""
170+
171+
parsed = parse(docstring, style=DocstringStyle.EPYDOC)
172+
print(parsed)
173+
```
174+
175+
### एक क्लास से विशेषता Docstrings का पार्सिंग
176+
177+
विशेषता docstrings सहित एक क्लास से docstrings पार्स करें:
178+
179+
```python
180+
from PyDocSmith import parse_from_object
181+
182+
class ExampleClass:
183+
"""Class docstring."""
184+
185+
attr1: int
186+
"""Attribute 1 description."""
187+
188+
attr2: str = "default"
189+
"""Attribute 2 description."""
190+
191+
def method(self):
192+
pass
193+
194+
parsed = parse_from_object(ExampleClass)
195+
print(parsed)
196+
```
197+
198+
### कस्टम इंडेंटेशन के साथ कम्पोज़िंग
199+
200+
कस्टम इंडेंटेशन के साथ एक docstring कम्पोज़ करें:
201+
202+
```python
203+
from PyDocSmith import compose, DocstringStyle
204+
205+
# Assuming you have a parsed_docstring from previous examples
206+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST, indent=4)
207+
print(docstring_text)
208+
```
209+
129210
## उन्नत विशेषताएं
130211

131212
- **ऑब्जेक्ट से पार्स करें:** PyDocSmith Python ऑब्जेक्ट्स से सीधे डॉकस्ट्रिंग पार्स कर सकता है, जिसमें क्लासेस और मॉड्यूल्स शामिल हैं, एट्रिब्यूट डॉकस्ट्रिंग को संरचित प्रतिनिधित्व में शामिल करते हुए।

README.ja.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,87 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126126
print(docstring_text)
127127
```
128128

129+
### Google スタイル Docstrings の解析
130+
131+
Google スタイルの docstring を解析します:
132+
133+
```python
134+
from PyDocSmith import parse, DocstringStyle
135+
136+
docstring = """
137+
Short description.
138+
139+
Long description.
140+
141+
Args:
142+
param1 (int): Description of param1
143+
param2 (str, optional): Description of param2
144+
145+
Returns:
146+
int: Description of return value
147+
"""
148+
149+
parsed = parse(docstring, style=DocstringStyle.GOOGLE)
150+
print(parsed)
151+
```
152+
153+
### Epydoc スタイル Docstrings の解析
154+
155+
Epydoc スタイルの docstring を解析します:
156+
157+
```python
158+
from PyDocSmith import parse, DocstringStyle
159+
160+
docstring = """
161+
Short description.
162+
163+
@param param1: Description of param1
164+
@type param1: int
165+
@param param2: Description of param2
166+
@type param2: str
167+
@return: Description of return value
168+
@rtype: int
169+
"""
170+
171+
parsed = parse(docstring, style=DocstringStyle.EPYDOC)
172+
print(parsed)
173+
```
174+
175+
### クラスからの属性 Docstrings の解析
176+
177+
属性 docstrings を含むクラスから docstrings を解析します:
178+
179+
```python
180+
from PyDocSmith import parse_from_object
181+
182+
class ExampleClass:
183+
"""Class docstring."""
184+
185+
attr1: int
186+
"""Attribute 1 description."""
187+
188+
attr2: str = "default"
189+
"""Attribute 2 description."""
190+
191+
def method(self):
192+
pass
193+
194+
parsed = parse_from_object(ExampleClass)
195+
print(parsed)
196+
```
197+
198+
### カスタムインデントでの構成
199+
200+
カスタムインデントで docstring を構成します:
201+
202+
```python
203+
from PyDocSmith import compose, DocstringStyle
204+
205+
# Assuming you have a parsed_docstring from previous examples
206+
docstring_text = compose(parsed_docstring, style=DocstringStyle.REST, indent=4)
207+
print(docstring_text)
208+
```
209+
129210
## 高度な機能
130211

131212
- **オブジェクトからの解析:** PyDocSmith は、クラスやモジュールを含む Python オブジェクトから直接ドックストリングを解析でき、属性ドックストリングを構造化表現に組み込みます。

0 commit comments

Comments
 (0)