format-docstring 0.1.4__tar.gz → 0.1.5__tar.gz

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.
Files changed (97) hide show
  1. {format_docstring-0.1.4 → format_docstring-0.1.5}/CHANGELOG.md +7 -0
  2. {format_docstring-0.1.4 → format_docstring-0.1.5}/PKG-INFO +1 -1
  3. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/line_wrap_numpy.py +3 -1
  4. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/PKG-INFO +1 -1
  5. {format_docstring-0.1.4 → format_docstring-0.1.5}/pyproject.toml +1 -1
  6. format_docstring-0.1.5/tests/test_data/end_to_end/numpy/examples_section.txt +107 -0
  7. format_docstring-0.1.5/tests/test_data/line_wrap/numpy/examples_section.txt +51 -0
  8. format_docstring-0.1.4/tests/test_data/end_to_end/numpy/examples_section.txt +0 -67
  9. format_docstring-0.1.4/tests/test_data/line_wrap/numpy/examples_section.txt +0 -33
  10. {format_docstring-0.1.4 → format_docstring-0.1.5}/.github/workflows/python-package.yml +0 -0
  11. {format_docstring-0.1.4 → format_docstring-0.1.5}/.github/workflows/python-publish.yml +0 -0
  12. {format_docstring-0.1.4 → format_docstring-0.1.5}/.gitignore +0 -0
  13. {format_docstring-0.1.4 → format_docstring-0.1.5}/.pre-commit-config.yaml +0 -0
  14. {format_docstring-0.1.4 → format_docstring-0.1.5}/.pre-commit-hooks.yaml +0 -0
  15. {format_docstring-0.1.4 → format_docstring-0.1.5}/CLAUDE.md +0 -0
  16. {format_docstring-0.1.4 → format_docstring-0.1.5}/LICENSE +0 -0
  17. {format_docstring-0.1.4 → format_docstring-0.1.5}/README.md +0 -0
  18. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/__init__.py +0 -0
  19. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/base_fixer.py +0 -0
  20. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/config.py +0 -0
  21. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/docstring_rewriter.py +0 -0
  22. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/line_wrap_google.py +0 -0
  23. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/line_wrap_utils.py +0 -0
  24. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/main_jupyter.py +0 -0
  25. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring/main_py.py +0 -0
  26. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/SOURCES.txt +0 -0
  27. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/dependency_links.txt +0 -0
  28. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/entry_points.txt +0 -0
  29. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/requires.txt +0 -0
  30. {format_docstring-0.1.4 → format_docstring-0.1.5}/format_docstring.egg-info/top_level.txt +0 -0
  31. {format_docstring-0.1.4 → format_docstring-0.1.5}/muff.toml +0 -0
  32. {format_docstring-0.1.4 → format_docstring-0.1.5}/requirements.dev +0 -0
  33. {format_docstring-0.1.4 → format_docstring-0.1.5}/setup.cfg +0 -0
  34. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/__init__.py +0 -0
  35. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/helpers.py +0 -0
  36. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_config.py +0 -0
  37. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/README.md +0 -0
  38. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/colon_spacing_fix.txt +0 -0
  39. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/contents_that_are_not_wrapped.txt +0 -0
  40. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/default_value_standardization.txt +0 -0
  41. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/empty_lines_are_respected.txt +0 -0
  42. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/existing_linebreaks_should_not_be_respected.txt +0 -0
  43. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/four_level_nested_classes.txt +0 -0
  44. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/indent_four_levels_16_spaces_width_10.txt +0 -0
  45. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/indent_misaligned_all.txt +0 -0
  46. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/indent_two_levels_8_spaces.txt +0 -0
  47. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/line_length_2.txt +0 -0
  48. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/mismatched_underlines.txt +0 -0
  49. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/mismatched_underlines_one_dash.txt +0 -0
  50. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/mismatched_underlines_two_dashes.txt +0 -0
  51. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/module_level_docstring.txt +0 -0
  52. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/new_lines_before_and_after.txt +0 -0
  53. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/param_signature_without_type.txt +0 -0
  54. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/parameters_returns_raises_wrapping.txt +0 -0
  55. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/returns_signature_and_description.txt +0 -0
  56. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/section_title_fixed.txt +0 -0
  57. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/sections_notes_examples.txt +0 -0
  58. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/signature_line_is_not_wrapped.txt +0 -0
  59. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/single_line_docstring.txt +0 -0
  60. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/texts_are_rewrapped.txt +0 -0
  61. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/end_to_end/numpy/very_long_unbreakable_word.txt +0 -0
  62. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/after.ipynb +0 -0
  63. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/after.py +0 -0
  64. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/after_50.ipynb +0 -0
  65. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/after_50.py +0 -0
  66. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/before.ipynb +0 -0
  67. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/integration_test/numpy/before.py +0 -0
  68. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/README.md +0 -0
  69. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/colon_spacing_fix.txt +0 -0
  70. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/contents_that_are_not_wrapped.txt +0 -0
  71. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/default_value_standardization.txt +0 -0
  72. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/empty_lines_are_respected.txt +0 -0
  73. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/existing_linebreaks_should_not_be_respected.txt +0 -0
  74. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/indent_four_levels_16_spaces_width_10.txt +0 -0
  75. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/indent_two_levels_8_spaces.txt +0 -0
  76. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/line_length_2.txt +0 -0
  77. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/mismatched_underlines.txt +0 -0
  78. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/mismatched_underlines_one_dash.txt +0 -0
  79. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/mismatched_underlines_two_dashes.txt +0 -0
  80. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/module_level_docstring.txt +0 -0
  81. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/param_signature_without_type.txt +0 -0
  82. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/parameters_returns_raises_wrapping.txt +0 -0
  83. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/returns_signature_and_description.txt +0 -0
  84. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/section_title_fixed.txt +0 -0
  85. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/sections_notes_examples.txt +0 -0
  86. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/signature_line_is_not_wrapped.txt +0 -0
  87. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/texts_are_rewrapped.txt +0 -0
  88. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/line_wrap/numpy/very_long_unbreakable_word.txt +0 -0
  89. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_data/playground.py +0 -0
  90. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_docstring_rewriter.py +0 -0
  91. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_line_wrap_google.py +0 -0
  92. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_line_wrap_numpy.py +0 -0
  93. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_line_wrap_utils.py +0 -0
  94. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_main_jupyter.py +0 -0
  95. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_main_py.py +0 -0
  96. {format_docstring-0.1.4 → format_docstring-0.1.5}/tests/test_playground.py +0 -0
  97. {format_docstring-0.1.4 → format_docstring-0.1.5}/tox.ini +0 -0
@@ -6,6 +6,13 @@ The format is based on
6
6
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project
7
7
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [0.1.5] - 2025-10-13
10
+
11
+ - Added
12
+ - Support for `... ` (continuation of REPL lines) in the Examples section
13
+ - Full diff
14
+ - https://github.com/jsh9/format-docstring/compare/0.1.4...0.1.5
15
+
9
16
  ## [0.1.4] - 2025-10-12
10
17
 
11
18
  - Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: format-docstring
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A Python formatter to wrap/adjust docstring lines
5
5
  Author-email: jsh9 <25124332+jsh9@users.noreply.github.com>
6
6
  Maintainer-email: jsh9 <25124332+jsh9@users.noreply.github.com>
@@ -104,7 +104,9 @@ def wrap_docstring_numpy(
104
104
  continue
105
105
 
106
106
  # In Examples, skip wrapping for REPL lines
107
- if in_examples and stripped.startswith('>>> '):
107
+ if in_examples and (
108
+ stripped.startswith('>>> ') or stripped.startswith('... ')
109
+ ):
108
110
  temp_out.append(line)
109
111
  i += 1
110
112
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: format-docstring
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: A Python formatter to wrap/adjust docstring lines
5
5
  Author-email: jsh9 <25124332+jsh9@users.noreply.github.com>
6
6
  Maintainer-email: jsh9 <25124332+jsh9@users.noreply.github.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "format-docstring"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "A Python formatter to wrap/adjust docstring lines"
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -0,0 +1,107 @@
1
+ LINE_LENGTH: 79
2
+
3
+ **********
4
+ def func1():
5
+ """
6
+ Example
7
+ -----
8
+ >>> a = 2
9
+ >>> b = 3
10
+ """
11
+ pass
12
+
13
+ def func2():
14
+ """
15
+ Examples
16
+ ----
17
+ >>> a = 2
18
+ >>> b = 3
19
+ """
20
+ pass
21
+
22
+
23
+
24
+
25
+
26
+
27
+ def func3():
28
+ """
29
+ Examplesss
30
+ ----
31
+ >>> a = 2
32
+ >>> b = 3
33
+ """
34
+ pass
35
+
36
+ class MyClass:
37
+ """
38
+ This is my class
39
+
40
+ Parameters
41
+ ----------
42
+ arg1 : int
43
+ Arg 1
44
+
45
+ Examples
46
+ -------------
47
+ Should not be wrapped, because of `>>> ` and `... `
48
+ >>> result = my_function(
49
+ ... arg1=1,
50
+ ... arg2=2,
51
+ ... arg3=3,
52
+ ... )
53
+ """
54
+ pass
55
+
56
+ **********
57
+
58
+ def func1():
59
+ """
60
+ Examples
61
+ --------
62
+ >>> a = 2
63
+ >>> b = 3
64
+ """
65
+ pass
66
+
67
+ def func2():
68
+ """
69
+ Examples
70
+ --------
71
+ >>> a = 2
72
+ >>> b = 3
73
+ """
74
+ pass
75
+
76
+
77
+
78
+
79
+
80
+
81
+ def func3():
82
+ """
83
+ Examplesss
84
+ ----
85
+ >>> a = 2 >>> b = 3
86
+ """
87
+ pass
88
+
89
+ class MyClass:
90
+ """
91
+ This is my class
92
+
93
+ Parameters
94
+ ----------
95
+ arg1 : int
96
+ Arg 1
97
+
98
+ Examples
99
+ --------
100
+ Should not be wrapped, because of `>>> ` and `... `
101
+ >>> result = my_function(
102
+ ... arg1=1,
103
+ ... arg2=2,
104
+ ... arg3=3,
105
+ ... )
106
+ """
107
+ pass
@@ -0,0 +1,51 @@
1
+ LINE_LENGTH: 79
2
+
3
+ **********
4
+ Example
5
+ -----
6
+ >>> a = 2
7
+ >>> b = 3
8
+
9
+ Examples
10
+ ----
11
+ >>> a = 2
12
+ >>> b = 3
13
+
14
+ Examplesss
15
+ ----
16
+ >>> a = 2
17
+ >>> b = 3
18
+
19
+ Examples
20
+ -------------
21
+ Should not be wrapped, because of `>>> ` and `... `
22
+ >>> result = my_function(
23
+ ... arg1=1,
24
+ ... arg2=2,
25
+ ... arg3=3,
26
+ ... )
27
+
28
+ **********
29
+
30
+ Examples
31
+ --------
32
+ >>> a = 2
33
+ >>> b = 3
34
+
35
+ Examples
36
+ --------
37
+ >>> a = 2
38
+ >>> b = 3
39
+
40
+ Examplesss
41
+ ----
42
+ >>> a = 2 >>> b = 3
43
+
44
+ Examples
45
+ --------
46
+ Should not be wrapped, because of `>>> ` and `... `
47
+ >>> result = my_function(
48
+ ... arg1=1,
49
+ ... arg2=2,
50
+ ... arg3=3,
51
+ ... )
@@ -1,67 +0,0 @@
1
- LINE_LENGTH: 79
2
-
3
- **********
4
- def func1():
5
- """
6
- Example
7
- -----
8
- >>> a = 2
9
- >>> b = 3
10
- """
11
- pass
12
-
13
- def func2():
14
- """
15
- Examples
16
- ----
17
- >>> a = 2
18
- >>> b = 3
19
- """
20
- pass
21
-
22
-
23
-
24
-
25
-
26
-
27
- def func3():
28
- """
29
- Examplesss
30
- ----
31
- >>> a = 2
32
- >>> b = 3
33
- """
34
- pass
35
-
36
- **********
37
-
38
- def func1():
39
- """
40
- Examples
41
- --------
42
- >>> a = 2
43
- >>> b = 3
44
- """
45
- pass
46
-
47
- def func2():
48
- """
49
- Examples
50
- --------
51
- >>> a = 2
52
- >>> b = 3
53
- """
54
- pass
55
-
56
-
57
-
58
-
59
-
60
-
61
- def func3():
62
- """
63
- Examplesss
64
- ----
65
- >>> a = 2 >>> b = 3
66
- """
67
- pass
@@ -1,33 +0,0 @@
1
- LINE_LENGTH: 79
2
-
3
- **********
4
- Example
5
- -----
6
- >>> a = 2
7
- >>> b = 3
8
-
9
- Examples
10
- ----
11
- >>> a = 2
12
- >>> b = 3
13
-
14
- Examplesss
15
- ----
16
- >>> a = 2
17
- >>> b = 3
18
-
19
- **********
20
-
21
- Examples
22
- --------
23
- >>> a = 2
24
- >>> b = 3
25
-
26
- Examples
27
- --------
28
- >>> a = 2
29
- >>> b = 3
30
-
31
- Examplesss
32
- ----
33
- >>> a = 2 >>> b = 3