From 7788e7bb52b888a52dd3e8841781d5c2c4a94e5c Mon Sep 17 00:00:00 2001
From: Andre Anjos <andre.anjos@idiap.ch>
Date: Mon, 22 May 2017 15:38:02 +0200
Subject: [PATCH] Fix doc building on Python 2.7

---
 bob/ip/facelandmarks/utils.py | 32 ++++++++++++++++----------------
 doc/nitpick-exceptions.txt    |  2 ++
 2 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/bob/ip/facelandmarks/utils.py b/bob/ip/facelandmarks/utils.py
index d9d3cd4..9c7ccb9 100644
--- a/bob/ip/facelandmarks/utils.py
+++ b/bob/ip/facelandmarks/utils.py
@@ -186,10 +186,10 @@ def _detect_multiple_landmarks_on_gray_image(data, top=0, min_quality=0.):
 
   Returns:
 
-    list: A list of named tuples of type :py:class:`.utils.Result`, each containing
-      the result of face detection and landmarks extracted from the input
-      image.
-      The list MAY BE EMPTY if no face is detected in the input image (data).
+    :py:class:`list`: A list of named tuples of type :py:class:`.utils.Result`,
+      each containing the result of face detection and landmarks extracted from
+      the input image.  The list MAY BE EMPTY if no face is detected in the
+      input image (data).
 
   '''
 
@@ -278,9 +278,9 @@ def _detect_multiple_landmarks_on_color_image(data, top=0, min_quality=0.):
 
   Returns:
 
-    list: A list of named tuples of type :py:class:`.utils.Result`, each containing
-      the result of face detection and landmarks extracted from the input
-      image.
+    :py:class:`list`: A list of named tuples of type :py:class:`.utils.Result`,
+      each containing the result of face detection and landmarks extracted from
+      the input image.
 
   '''
 
@@ -313,9 +313,9 @@ def detect_landmarks(data, top=0, min_quality=0.):
 
   Returns:
 
-    list: A list of named tuples of type :py:class:`.utils.Result`, each containing
-      the result of face detection and landmarks extracted from the input
-      image.
+    :py:class:`list`: A list of named tuples of type :py:class:`.utils.Result`,
+      each containing the result of face detection and landmarks extracted from
+      the input image.
 
   '''
 
@@ -335,9 +335,9 @@ def draw_landmarks(data, results):
       dimensions, corresponding to a either a gray-scale or color image loaded
       with Bob.
 
-    results (list): A list of named tuples of type :py:class:`.utils.Result`, each
-      containing the result of face detection and landmarks extracted from the
-      input image.
+    results (:py:class:`list`): A list of named tuples of type
+      :py:class:`.utils.Result`, each containing the result of face detection
+      and landmarks extracted from the input image.
 
   '''
 
@@ -395,9 +395,9 @@ def save_landmarks(results, fname):
 
   Parameters:
 
-    results (list): A list of named tuples of type :py:class:`.utils.Result`, each
-      containing the result of face detection and landmarks extracted from the
-      input image.
+    results (:py:class:`list`): A list of named tuples of type
+      :py:class:`.utils.Result`, each containing the result of face detection
+      and landmarks extracted from the input image.
 
     fname (str): A path with the output filename
 
diff --git a/doc/nitpick-exceptions.txt b/doc/nitpick-exceptions.txt
index 6a5cf99..21e54e6 100644
--- a/doc/nitpick-exceptions.txt
+++ b/doc/nitpick-exceptions.txt
@@ -1 +1,3 @@
+# Solve some Python 2.7 misses on its documentation
+py:class list
 py:class collections.namedtuple
-- 
GitLab