From b43ef7a749a909bf62268ae673c58025b0d9772f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Traizet?= <cedric.traizet@c-s.fr> Date: Tue, 7 May 2019 11:09:03 +0200 Subject: [PATCH] ENH: code review --- .../Cookbook/Scripts/otbGenerateWrappersRstDoc.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py index 059301a1f4..1bbf08ca2f 100755 --- a/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py +++ b/Documentation/Cookbook/Scripts/otbGenerateWrappersRstDoc.py @@ -358,13 +358,14 @@ def make_links(text, allapps): def render_deprecation_string(app): if app.IsDeprecated(): - return ("This application is deprecated and will be removed in a future release.") + return "This application is deprecated and will be removed in a future release." else: - return("") + return "" def render_application(appname, allapps): "Render app to rst" + # Create the application without logger to avoid the deprecation warning log app = otbApplication.Registry.CreateApplicationWithoutLogger(appname) # TODO: remove this when bug 440 is fixed @@ -388,8 +389,9 @@ def render_application(appname, allapps): return output def GetApplicationTags(appname): - app = otbApplication.Registry.CreateApplicationWithoutLogger(appname) - return app.GetDocTags() + # Create the application without logger to avoid the deprecation warning log + app = otbApplication.Registry.CreateApplicationWithoutLogger(appname) + return app.GetDocTags() def GenerateRstForApplications(rst_dir): "Generate .rst files for all applications" -- GitLab