Skip to content

Commit 37d8803

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

7 files changed

Lines changed: 469 additions & 0 deletions

File tree

README.es.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
5959
print(docstring_text)
6060
```
6161

62+
## Más Ejemplos
63+
64+
### Analizando Docstrings de Estilo NumPy
65+
66+
Analizar una docstring de estilo NumPy:
67+
68+
```python
69+
from PyDocSmith import parse, DocstringStyle
70+
71+
docstring = """
72+
Short description
73+
74+
Long description
75+
76+
Parameters
77+
----------
78+
param1 : int
79+
Description of param1
80+
param2 : str, optional
81+
Description of param2
82+
83+
Returns
84+
-------
85+
int
86+
Description of return value
87+
"""
88+
89+
parsed = parse(docstring, style=DocstringStyle.NUMPYDOC)
90+
print(parsed)
91+
```
92+
93+
### Analizando desde Objetos Python
94+
95+
Analizar docstrings directamente desde funciones o clases de Python:
96+
97+
```python
98+
from PyDocSmith import parse_from_object
99+
100+
def example_function(param1: int, param2: str = "default") -> int:
101+
"""
102+
This is an example function.
103+
104+
Args:
105+
param1 (int): First parameter
106+
param2 (str): Second parameter
107+
108+
Returns:
109+
int: The result
110+
"""
111+
return param1 + len(param2)
112+
113+
parsed = parse_from_object(example_function)
114+
print(parsed)
115+
```
116+
117+
### Componiendo con Diferentes Estilos
118+
119+
Componer una docstring en un estilo diferente al que se analizó:
120+
121+
```python
122+
from PyDocSmith import compose, DocstringStyle
123+
124+
# Assuming you have a parsed_docstring from previous examples
125+
docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126+
print(docstring_text)
127+
```
128+
62129
## Características avanzadas
63130

64131
- **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: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
5959
print(docstring_text)
6060
```
6161

62+
## Plus d'Exemples
63+
64+
### Analyse des Docstrings de Style NumPy
65+
66+
Analyser une docstring de style NumPy:
67+
68+
```python
69+
from PyDocSmith import parse, DocstringStyle
70+
71+
docstring = """
72+
Short description
73+
74+
Long description
75+
76+
Parameters
77+
----------
78+
param1 : int
79+
Description of param1
80+
param2 : str, optional
81+
Description of param2
82+
83+
Returns
84+
-------
85+
int
86+
Description of return value
87+
"""
88+
89+
parsed = parse(docstring, style=DocstringStyle.NUMPYDOC)
90+
print(parsed)
91+
```
92+
93+
### Analyse depuis les Objets Python
94+
95+
Analyser les docstrings directement depuis les fonctions ou classes Python:
96+
97+
```python
98+
from PyDocSmith import parse_from_object
99+
100+
def example_function(param1: int, param2: str = "default") -> int:
101+
"""
102+
This is an example function.
103+
104+
Args:
105+
param1 (int): First parameter
106+
param2 (str): Second parameter
107+
108+
Returns:
109+
int: The result
110+
"""
111+
return param1 + len(param2)
112+
113+
parsed = parse_from_object(example_function)
114+
print(parsed)
115+
```
116+
117+
### Composition avec Différents Styles
118+
119+
Composer une docstring dans un style différent de celui analysé:
120+
121+
```python
122+
from PyDocSmith import compose, DocstringStyle
123+
124+
# Assuming you have a parsed_docstring from previous examples
125+
docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126+
print(docstring_text)
127+
```
128+
62129
## Fonctionnalités avancées
63130

64131
- **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: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
5959
print(docstring_text)
6060
```
6161

62+
## अधिक उदाहरण
63+
64+
### NumPy शैली Docstrings का पार्सिंग
65+
66+
NumPy-शैली docstring को पार्स करें:
67+
68+
```python
69+
from PyDocSmith import parse, DocstringStyle
70+
71+
docstring = """
72+
Short description
73+
74+
Long description
75+
76+
Parameters
77+
----------
78+
param1 : int
79+
Description of param1
80+
param2 : str, optional
81+
Description of param2
82+
83+
Returns
84+
-------
85+
int
86+
Description of return value
87+
"""
88+
89+
parsed = parse(docstring, style=DocstringStyle.NUMPYDOC)
90+
print(parsed)
91+
```
92+
93+
### Python ऑब्जेक्ट्स से पार्सिंग
94+
95+
Python कार्यों या कक्षाओं से सीधे docstrings को पार्स करें:
96+
97+
```python
98+
from PyDocSmith import parse_from_object
99+
100+
def example_function(param1: int, param2: str = "default") -> int:
101+
"""
102+
This is an example function.
103+
104+
Args:
105+
param1 (int): First parameter
106+
param2 (str): Second parameter
107+
108+
Returns:
109+
int: The result
110+
"""
111+
return param1 + len(param2)
112+
113+
parsed = parse_from_object(example_function)
114+
print(parsed)
115+
```
116+
117+
### विभिन्न शैलियों के साथ कम्पोज़िंग
118+
119+
विश्लेषित किए गए शैली से अलग शैली में docstring को कम्पोज़ करें:
120+
121+
```python
122+
from PyDocSmith import compose, DocstringStyle
123+
124+
# Assuming you have a parsed_docstring from previous examples
125+
docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126+
print(docstring_text)
127+
```
128+
62129
## उन्नत विशेषताएं
63130

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

README.ja.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
5959
print(docstring_text)
6060
```
6161

62+
## さらなる例
63+
64+
### NumPy スタイルの Docstring の解析
65+
66+
NumPy スタイルの docstring を解析します:
67+
68+
```python
69+
from PyDocSmith import parse, DocstringStyle
70+
71+
docstring = """
72+
Short description
73+
74+
Long description
75+
76+
Parameters
77+
----------
78+
param1 : int
79+
Description of param1
80+
param2 : str, optional
81+
Description of param2
82+
83+
Returns
84+
-------
85+
int
86+
Description of return value
87+
"""
88+
89+
parsed = parse(docstring, style=DocstringStyle.NUMPYDOC)
90+
print(parsed)
91+
```
92+
93+
### Python オブジェクトからの解析
94+
95+
Python の関数やクラスから直接 docstring を解析します:
96+
97+
```python
98+
from PyDocSmith import parse_from_object
99+
100+
def example_function(param1: int, param2: str = "default") -> int:
101+
"""
102+
This is an example function.
103+
104+
Args:
105+
param1 (int): First parameter
106+
param2 (str): Second parameter
107+
108+
Returns:
109+
int: The result
110+
"""
111+
return param1 + len(param2)
112+
113+
parsed = parse_from_object(example_function)
114+
print(parsed)
115+
```
116+
117+
### 異なるスタイルでの構成
118+
119+
解析されたスタイルとは異なるスタイルで docstring を構成します:
120+
121+
```python
122+
from PyDocSmith import compose, DocstringStyle
123+
124+
# Assuming you have a parsed_docstring from previous examples
125+
docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126+
print(docstring_text)
127+
```
128+
62129
## 高度な機能
63130

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

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,73 @@ docstring_text = compose(parsed_docstring, style=DocstringStyle.REST)
5959
print(docstring_text)
6060
```
6161

62+
## More Examples
63+
64+
### Parsing NumPy Style Docstrings
65+
66+
Parse a NumPy-style docstring:
67+
68+
```python
69+
from PyDocSmith import parse, DocstringStyle
70+
71+
docstring = """
72+
Short description
73+
74+
Long description
75+
76+
Parameters
77+
----------
78+
param1 : int
79+
Description of param1
80+
param2 : str, optional
81+
Description of param2
82+
83+
Returns
84+
-------
85+
int
86+
Description of return value
87+
"""
88+
89+
parsed = parse(docstring, style=DocstringStyle.NUMPYDOC)
90+
print(parsed)
91+
```
92+
93+
### Parsing from Python Objects
94+
95+
Parse docstrings directly from Python functions or classes:
96+
97+
```python
98+
from PyDocSmith import parse_from_object
99+
100+
def example_function(param1: int, param2: str = "default") -> int:
101+
"""
102+
This is an example function.
103+
104+
Args:
105+
param1 (int): First parameter
106+
param2 (str): Second parameter
107+
108+
Returns:
109+
int: The result
110+
"""
111+
return param1 + len(param2)
112+
113+
parsed = parse_from_object(example_function)
114+
print(parsed)
115+
```
116+
117+
### Composing with Different Styles
118+
119+
Compose a docstring in a different style than it was parsed from:
120+
121+
```python
122+
from PyDocSmith import compose, DocstringStyle
123+
124+
# Assuming you have a parsed_docstring from previous examples
125+
docstring_text = compose(parsed_docstring, style=DocstringStyle.GOOGLE)
126+
print(docstring_text)
127+
```
128+
62129
## Advanced Features
63130

64131
- **Parse From Object:** PyDocSmith can parse docstrings directly from Python objects, including classes and modules, incorporating attribute docstrings into the structured representation.

0 commit comments

Comments
 (0)