Skip to content

Commit b821690

Browse files
committed
Use "blackdoc".
1 parent 89792c5 commit b821690

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ repos:
1313
hooks:
1414
- id: black
1515
language_version: python3.8
16+
- repo: https://github.com/keewis/blackdoc
17+
rev: v0.3.7
18+
hooks:
19+
- id: blackdoc
20+
language_version: python3.8
21+
exclude_types: [rst]
1622
- repo: https://github.com/PyCQA/flake8
1723
rev: 5.0.3
1824
hooks:

colour_checker_detection/detection/segmentation.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,12 @@ def crop_and_level_image_with_rectangle(
500500
>>> import os
501501
>>> from colour import read_image
502502
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
503-
>>> path = os.path.join(TESTS_RESOURCES_DIRECTORY,
504-
... 'colour_checker_detection', 'detection',
505-
... 'IMG_1967.png')
503+
>>> path = os.path.join(
504+
... TESTS_RESOURCES_DIRECTORY,
505+
... "colour_checker_detection",
506+
... "detection",
507+
... "IMG_1967.png",
508+
... )
506509
>>> image = adjust_image(read_image(path), 1440)
507510
>>> rectangle = (
508511
... (723.29608154, 465.50939941),
@@ -662,9 +665,12 @@ def colour_checkers_coordinates_segmentation(
662665
>>> import os
663666
>>> from colour import read_image
664667
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
665-
>>> path = os.path.join(TESTS_RESOURCES_DIRECTORY,
666-
... 'colour_checker_detection', 'detection',
667-
... 'IMG_1967.png')
668+
>>> path = os.path.join(
669+
... TESTS_RESOURCES_DIRECTORY,
670+
... "colour_checker_detection",
671+
... "detection",
672+
... "IMG_1967.png",
673+
... )
668674
>>> image = read_image(path)
669675
>>> colour_checkers_coordinates_segmentation(image) # doctest: +ELLIPSIS
670676
(array([[ 369, 688],
@@ -857,9 +863,12 @@ def extract_colour_checkers_segmentation(
857863
>>> import os
858864
>>> from colour import read_image
859865
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
860-
>>> path = os.path.join(TESTS_RESOURCES_DIRECTORY,
861-
... 'colour_checker_detection', 'detection',
862-
... 'IMG_1967.png')
866+
>>> path = os.path.join(
867+
... TESTS_RESOURCES_DIRECTORY,
868+
... "colour_checker_detection",
869+
... "detection",
870+
... "IMG_1967.png",
871+
... )
863872
>>> image = read_image(path)
864873
>>> extract_colour_checkers_segmentation(image)
865874
... # doctest: +SKIP
@@ -1043,9 +1052,12 @@ def detect_colour_checkers_segmentation(
10431052
>>> import os
10441053
>>> from colour import read_image
10451054
>>> from colour_checker_detection import TESTS_RESOURCES_DIRECTORY
1046-
>>> path = os.path.join(TESTS_RESOURCES_DIRECTORY,
1047-
... 'colour_checker_detection', 'detection',
1048-
... 'IMG_1967.png')
1055+
>>> path = os.path.join(
1056+
... TESTS_RESOURCES_DIRECTORY,
1057+
... "colour_checker_detection",
1058+
... "detection",
1059+
... "IMG_1967.png",
1060+
... )
10491061
>>> image = read_image(path)
10501062
>>> detect_colour_checkers_segmentation(image) # doctest: +SKIP
10511063
(array([[ 0.361626... , 0.2241066..., 0.1187837...],

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ matplotlib = { version = ">= 3.2, != 3.5.0, != 3.5.1", optional = true }
5656

5757
biblib-simple = { version = "*", optional = true } # Development dependency.
5858
black = { version = "*", optional = true } # Development dependency.
59+
blackdoc = { version = "*", optional = true } # Development dependency.
5960
coverage = { version = "*", optional = true } # Development dependency.
6061
coveralls = { version = "*", optional = true } # Development dependency.
6162
flake8 = { version = "*", optional = true } # Development dependency.
@@ -79,6 +80,7 @@ twine = { version = "*", optional = true } # Development dependency.
7980
[tool.poetry.dev-dependencies]
8081
biblib-simple = "*"
8182
black = "*"
83+
blackdoc = "*"
8284
coverage = "!= 6.3"
8385
coveralls = "*"
8486
flake8 = "*"
@@ -103,6 +105,7 @@ twine = "*"
103105
development = [
104106
"biblib-simple",
105107
"black",
108+
"blackdoc",
106109
"coverage",
107110
"coveralls",
108111
"flake8",

0 commit comments

Comments
 (0)