mktestdocs 0.2.2__py2.py3-none-any.whl → 0.2.3__py2.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.
mktestdocs/__init__.py CHANGED
@@ -7,7 +7,7 @@ from mktestdocs.__main__ import (
7
7
  get_codeblock_members,
8
8
  )
9
9
 
10
- __version__ = "0.2.2"
10
+ __version__ = "0.2.3"
11
11
 
12
12
  __all__ = [
13
13
  "__version__",
mktestdocs/__main__.py CHANGED
@@ -95,14 +95,14 @@ def grab_code_blocks(docstring, lang="python"):
95
95
  block = ""
96
96
  codeblocks = []
97
97
  for idx, line in enumerate(docstring.split("\n")):
98
- if line.startswith("```"):
98
+ if "```" in line:
99
99
  if in_block:
100
100
  codeblocks.append(check_codeblock(block, lang=lang))
101
101
  block = ""
102
102
  in_block = not in_block
103
103
  if in_block:
104
104
  block += line + "\n"
105
- return [c for c in codeblocks if c != ""]
105
+ return [textwrap.dedent(c) for c in codeblocks if c != ""]
106
106
 
107
107
  def format_docstring(docstring):
108
108
  """Formats docstring to be able to successfully go through dedent."""
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mktestdocs
3
- Version: 0.2.2
3
+ Version: 0.2.3
4
4
  License-File: LICENSE
5
5
  Provides-Extra: test
6
- Requires-Dist: pytest >=4.0.2 ; extra == 'test'
6
+ Requires-Dist: pytest>=4.0.2; extra == "test"
7
7
 
@@ -0,0 +1,7 @@
1
+ mktestdocs/__init__.py,sha256=oO-1kO-bZaGv3gUaUUD_tVAOH56cRVYf542yjwt9z3U,371
2
+ mktestdocs/__main__.py,sha256=1wWVXVxsGeSWAZhVb4ezuhZxziT-2KfBdAQxNsb6_QI,4753
3
+ mktestdocs-0.2.3.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
+ mktestdocs-0.2.3.dist-info/METADATA,sha256=wKes8p2f8jXkVyBKIDewXJ6QJG5GBQ32SAKkqSuhpCA,144
5
+ mktestdocs-0.2.3.dist-info/WHEEL,sha256=AHX6tWk3qWuce7vKLrj7lnulVHEdWoltgauo8bgCXgU,109
6
+ mktestdocs-0.2.3.dist-info/top_level.txt,sha256=1XGYsQSl3FsAtilWThIet3WOJQSuzQXXn6sQA7hxlho,11
7
+ mktestdocs-0.2.3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.43.0)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py2-none-any
5
5
  Tag: py3-none-any
@@ -1,7 +0,0 @@
1
- mktestdocs/__init__.py,sha256=wL-m_63-2NFVKQpqKySIm7y2vfwcutnIXpgLJU4xsxw,371
2
- mktestdocs/__main__.py,sha256=J-x8TWbSanfrbry41ApOuoZRFClvXaH0Dq3SLXpZqtw,4745
3
- mktestdocs-0.2.2.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
- mktestdocs-0.2.2.dist-info/METADATA,sha256=YdOdkMSjz5zQzR8VJIc3uEsCNUGHBZ932h38meQ-GW0,146
5
- mktestdocs-0.2.2.dist-info/WHEEL,sha256=DZajD4pwLWue70CAfc7YaxT1wLUciNBvN_TTcvXpltE,110
6
- mktestdocs-0.2.2.dist-info/top_level.txt,sha256=1XGYsQSl3FsAtilWThIet3WOJQSuzQXXn6sQA7hxlho,11
7
- mktestdocs-0.2.2.dist-info/RECORD,,