docstrfmt 2.0.1__tar.gz → 2.0.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: docstrfmt
3
- Version: 2.0.1
3
+ Version: 2.0.2
4
4
  Summary: docstrfmt: A formatter for Sphinx flavored reStructuredText.
5
5
  Keywords: black,docutils,autoformatter,formatter,lint,restructuredtext,rst,sphinx
6
6
  Author-email: Joel Payne <lilspazjoekp@gmail.com>
@@ -9,4 +9,4 @@ from .const import (
9
9
  )
10
10
  from .docstrfmt import Manager
11
11
 
12
- __version__ = "2.0.1"
12
+ __version__ = "2.0.2"
@@ -387,7 +387,7 @@ def _validate_adornments(
387
387
  :raises click.BadParameter: If adornments are not unique.
388
388
 
389
389
  """
390
- actual_value = value or context.params["section_adornments"]
390
+ actual_value = context.params.pop("section_adornments", value)
391
391
 
392
392
  if len(actual_value) != len(set(actual_value)):
393
393
  msg = "Section adornments must be unique"
@@ -395,11 +395,13 @@ def _validate_adornments(
395
395
 
396
396
  if "|" in actual_value:
397
397
  with_overline, without_overline = actual_value.split("|", 1)
398
- return list(zip(with_overline, itertools.repeat(True))) + list(
398
+ adornments = list(zip(with_overline, itertools.repeat(True))) + list(
399
399
  zip(without_overline, itertools.repeat(False))
400
400
  )
401
+ else:
402
+ adornments = list(zip(actual_value, itertools.repeat(False)))
401
403
 
402
- return list(zip(actual_value, itertools.repeat(False)))
404
+ return adornments
403
405
 
404
406
 
405
407
  async def _run_formatter(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes