docstring-to-text 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  # encoding: utf-8
2
2
 
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.2"
@@ -3,13 +3,32 @@
3
3
  A simple pip package converting docstrings into clean text (proper paragraphs and indents).
4
4
  """
5
5
 
6
+ # This Source Code Form is subject to the terms of the Mozilla Public
7
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
8
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9
+
6
10
  import typing as _t
7
11
 
8
12
  from inspect import cleandoc, getdoc
9
13
  import re as _re
10
14
 
11
- from .__package_meta import VERSION
12
- from .__package_meta import VERSION as __version__
15
+ from .___package_meta import VERSION
16
+ from .___package_meta import VERSION as __version__
17
+
18
+ # TODO:
19
+ # - lists
20
+ # formatted with indents
21
+ # in all lines except for the first one
22
+ #
23
+ # Also...
24
+ # - preserve indents
25
+ # - of the entire list
26
+ #
27
+ # And...
28
+ # - ensure
29
+ # that
30
+ # - it all works
31
+ # with nested lists
13
32
 
14
33
 
15
34
  _re_indent_match = _re.compile(r"(\t*)( +)(\t*)(.*?)$").match
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docstring-to-text
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: A simple pip package converting docstrings into clean text (proper paragraphs and indents)
5
5
  Project-URL: Source Code, https://github.com/Lex-DRL/Py-docstring-to-text
6
6
  Project-URL: Issues, https://github.com/Lex-DRL/Py-docstring-to-text/issues
@@ -13,15 +13,26 @@ Classifier: Programming Language :: Python :: 3
13
13
  Requires-Python: >=3.7
14
14
  Description-Content-Type: text/markdown
15
15
 
16
+ <div align="center">
17
+
16
18
  # docstring-to-text
17
19
 
20
+ [![PyPI][pypi-shield]][pypi-url]
21
+ [![][github-release-shield]][github-release-url]
22
+
23
+ [pypi-shield]: https://img.shields.io/pypi/v/docstring-to-text?logo=pypi
24
+ [pypi-url]: https://pypi.org/p/docstring-to-text
25
+ [github-release-shield]: https://img.shields.io/github/v/release/Lex-DRL/Py-docstring-to-text?logo=github
26
+ [github-release-url]: https://github.com/Lex-DRL/Py-docstring-to-text/releases/latest
27
+ </div>
28
+
18
29
  A simple pip package converting docstrings into clean text (proper paragraphs and indents).
19
30
 
20
31
  For example, here's a class docstring:
21
32
  ```python
22
33
  class MyClass:
23
34
  """
24
- Here's a class.
35
+ This is a class docstring.
25
36
 
26
37
 
27
38
  It has sphinx-like paragraphs, which can
@@ -34,12 +45,14 @@ class MyClass:
34
45
  to preserve paragraphs themselves.
35
46
 
36
47
  Also, when it comes to lists:
37
- - You probably want to separate items
48
+ - You probably want to separate items
38
49
  with new lines.
39
- - However, you don't want to preserve
50
+ - However, you don't want to preserve
40
51
  lines inside each item.
41
- * And you might need various bullet
42
- characters.
52
+
53
+ And...
54
+ * ... you might need various bullet
55
+ characters.
43
56
  • Including unicode ones.
44
57
 
45
58
  And don't forget that the list still needs
@@ -58,14 +71,15 @@ clean_text = format_object_docstring(MyClass)
58
71
 
59
72
  Then, the resulting string would be:
60
73
  ```text
61
- Here's a class.
74
+ This is a class docstring.
62
75
 
63
76
  It has sphinx-like paragraphs, which can span multiple lines. Any modern IDE would display them as a single line, that wraps the given width.
64
77
  You can't just remove all the new lines in the entire string, because you want to preserve paragraphs themselves.
65
78
  Also, when it comes to lists:
66
79
  - You probably want to separate items with new lines.
67
80
  - However, you don't want to preserve lines inside each item.
68
- * And you might need various bullet characters.
81
+ And...
82
+ * ... you might need various bullet characters.
69
83
  • Including unicode ones.
70
84
  And don't forget that the list still needs to be separated from the following text.
71
85
  ```
@@ -0,0 +1,6 @@
1
+ docstring_to_text/___package_meta.py,sha256=FUBADIvPxuLvXBzbXbL6C1ybLYS24VOYEd_RcSq76tQ,37
2
+ docstring_to_text/__init__.py,sha256=BDcfU7T33sckZzEZFZn2GPezDtb9fkv1A2uo2mPYZas,5000
3
+ docstring_to_text-1.0.2.dist-info/METADATA,sha256=x73dRgwjxhTFwd8D-znLYo7mYL61OdF6UwG9H0ky7VI,2748
4
+ docstring_to_text-1.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ docstring_to_text-1.0.2.dist-info/licenses/LICENSE.md,sha256=quBniO1Sk1aqYUzwRO5adu_nnqOKV_4UVU4JVfnWiS0,15373
6
+ docstring_to_text-1.0.2.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- docstring_to_text/__init__.py,sha256=2MJG9bHcgcFFLi5inNMPrX5jK0d5HVyQbQa7UCV1qK4,4568
2
- docstring_to_text/__package_meta.py,sha256=oj-ODmFPhzd3LWRxF98TKGvRXngna0diWblm3bsLhKQ,37
3
- docstring_to_text-1.0.0.dist-info/METADATA,sha256=Bl4mySaWiEnpNqTKnsP4m80J0x6KFzdrsHqVCG4Ou7Q,2276
4
- docstring_to_text-1.0.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
- docstring_to_text-1.0.0.dist-info/licenses/LICENSE.md,sha256=quBniO1Sk1aqYUzwRO5adu_nnqOKV_4UVU4JVfnWiS0,15373
6
- docstring_to_text-1.0.0.dist-info/RECORD,,