Skip to content

Commit 4bc123c

Browse files
authored
KDL python formatting and licenses (#425)
* [tf2_kdl] pep8 formatting * [tf2_kdl] fix pep257 * [tf2_kdl] fix copyright * tf2_kdl header guard and copyright * more flake8 fixes Co-authored-by: Bjar Ne <[email protected]>
1 parent 45fd4e6 commit 4bc123c

File tree

7 files changed

+306
-178
lines changed

7 files changed

+306
-178
lines changed

tf2_kdl/docs/source/conf.py

Lines changed: 79 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,59 @@
11
# -*- coding: utf-8 -*-
2+
3+
# Copyright 2020 Open Source Robotics Foundation, Inc.
4+
#
5+
# Redistribution and use in source and binary forms, with or without
6+
# modification, are permitted provided that the following conditions are met:
7+
#
8+
# * Redistributions of source code must retain the above copyright
9+
# notice, this list of conditions and the following disclaimer.
10+
#
11+
# * Redistributions in binary form must reproduce the above copyright
12+
# notice, this list of conditions and the following disclaimer in the
13+
# documentation and/or other materials provided with the distribution.
14+
#
15+
# * Neither the name of the Open Source Robotics Foundation, Inc. nor the names of its
16+
# contributors may be used to endorse or promote products derived from
17+
# this software without specific prior written permission.
18+
#
19+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
23+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29+
# POSSIBILITY OF SUCH DAMAGE.
30+
31+
232
#
333
# tf2 documentation build configuration file, created by
434
# sphinx-quickstart on Mon Jun 1 14:21:53 2009.
535
#
6-
# This file is execfile()d with the current directory set to its containing dir.
36+
# This file is execfile()d with the current directory set to its
37+
# containing dir.
738
#
839
# Note that not all possible configuration values are present in this
940
# autogenerated file.
1041
#
1142
# All configuration values have a default; values that are commented out
1243
# serve to show the default.
1344

14-
import sys, os
15-
1645
# If extensions (or modules to document with autodoc) are in another directory,
1746
# add these directories to sys.path here. If the directory is relative to the
1847
# documentation root, use os.path.abspath to make it absolute, like shown here.
1948
# sys.path.append(os.path.abspath('./src/tf2_kdl'))
2049

21-
# -- General configuration -----------------------------------------------------
50+
# -- General configuration ----------------------------------------------------
2251

23-
# Add any Sphinx extension module names here, as strings. They can be extensions
52+
# Add any Sphinx extension module names here, as strings.
53+
# They can be extensions
2454
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
25-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.imgmath']
55+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
56+
'sphinx.ext.intersphinx', 'sphinx.ext.imgmath']
2657

2758
# Add any paths that contain templates here, relative to this directory.
2859
templates_path = ['_templates']
@@ -31,14 +62,14 @@
3162
source_suffix = '.rst'
3263

3364
# The encoding of source files.
34-
#source_encoding = 'utf-8'
65+
# source_encoding = 'utf-8'
3566

3667
# The master toctree document.
3768
master_doc = 'index'
3869

3970
# General information about the project.
4071
project = u'tf2_kdl'
41-
copyright = u'2016, Open Source Robotics Foundation'
72+
copyright = u'2016, Open Source Robotics Foundation' # noqa(A001)
4273

4374
# The version info for the project you're documenting, acts as replacement for
4475
# |version| and |release|, also used in various other places throughout the
@@ -51,45 +82,46 @@
5182

5283
# The language for content autogenerated by Sphinx. Refer to documentation
5384
# for a list of supported languages.
54-
#language = None
85+
# language = None
5586

5687
# There are two options for replacing |today|: either, you set today to some
5788
# non-false value, then it is used:
58-
#today = ''
89+
# today = ''
5990
# Else, today_fmt is used as the format for a strftime call.
60-
#today_fmt = '%B %d, %Y'
91+
# today_fmt = '%B %d, %Y'
6192

6293
# List of documents that shouldn't be included in the build.
63-
#unused_docs = []
94+
# unused_docs = []
6495

6596
# List of directories, relative to source directory, that shouldn't be searched
6697
# for source files.
6798
exclude_trees = ['_build']
6899

69100
exclude_patterns = ['_CHANGELOG.rst']
70101

71-
# The reST default role (used for this markup: `text`) to use for all documents.
72-
#default_role = None
102+
# The reST default role (used for this markup: `text`) to use
103+
# for all documents.
104+
# default_role = None
73105

74106
# If true, '()' will be appended to :func: etc. cross-reference text.
75-
#add_function_parentheses = True
107+
# add_function_parentheses = True
76108

77109
# If true, the current module name will be prepended to all description
78110
# unit titles (such as .. function::).
79-
#add_module_names = True
111+
# add_module_names = True
80112

81113
# If true, sectionauthor and moduleauthor directives will be shown in the
82114
# output. They are ignored by default.
83-
#show_authors = False
115+
# show_authors = False
84116

85117
# The name of the Pygments (syntax highlighting) style to use.
86118
pygments_style = 'sphinx'
87119

88120
# A list of ignored prefixes for module index sorting.
89-
#modindex_common_prefix = []
121+
# modindex_common_prefix = []
90122

91123

92-
# -- Options for HTML output ---------------------------------------------------
124+
# -- Options for HTML output ------------------------------------------------
93125

94126
# The theme to use for HTML and HTML Help pages. Major themes that come with
95127
# Sphinx are currently 'default' and 'sphinxdoc'.
@@ -98,107 +130,108 @@
98130
# Theme options are theme-specific and customize the look and feel of a theme
99131
# further. For a list of options available for each theme, see the
100132
# documentation.
101-
#html_theme_options = {}
133+
# html_theme_options = {}
102134

103135
# Add any paths that contain custom themes here, relative to this directory.
104-
#html_theme_path = []
136+
# html_theme_path = []
105137

106138
# The name for this set of Sphinx documents. If None, it defaults to
107139
# "<project> v<release> documentation".
108-
#html_title = None
140+
# html_title = None
109141

110142
# A shorter title for the navigation bar. Default is the same as html_title.
111-
#html_short_title = None
143+
# html_short_title = None
112144

113145
# The name of an image file (relative to this directory) to place at the top
114146
# of the sidebar.
115-
#html_logo = None
147+
# html_logo = None
116148

117149
# The name of an image file (within the static path) to use as favicon of the
118150
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
119151
# pixels large.
120-
#html_favicon = None
152+
# html_favicon = None
121153

122154
# Add any paths that contain custom static files (such as style sheets) here,
123155
# relative to this directory. They are copied after the builtin static files,
124156
# so a file named "default.css" will overwrite the builtin "default.css".
125-
#html_static_path = ['_static']
157+
# html_static_path = ['_static']
126158

127159
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
128160
# using the given strftime format.
129-
#html_last_updated_fmt = '%b %d, %Y'
161+
# html_last_updated_fmt = '%b %d, %Y'
130162

131163
# If true, SmartyPants will be used to convert quotes and dashes to
132164
# typographically correct entities.
133-
#html_use_smartypants = True
165+
# html_use_smartypants = True
134166

135167
# Custom sidebar templates, maps document names to template names.
136-
#html_sidebars = {}
168+
# html_sidebars = {}
137169

138170
# Additional templates that should be rendered to pages, maps page names to
139171
# template names.
140-
#html_additional_pages = {}
172+
# html_additional_pages = {}
141173

142174
# If false, no module index is generated.
143-
#html_use_modindex = True
175+
# html_use_modindex = True
144176

145177
# If false, no index is generated.
146-
#html_use_index = True
178+
# html_use_index = True
147179

148180
# If true, the index is split into individual pages for each letter.
149-
#html_split_index = False
181+
# html_split_index = False
150182

151183
# If true, links to the reST sources are added to the pages.
152-
#html_show_sourcelink = True
184+
# html_show_sourcelink = True
153185

154186
# If true, an OpenSearch description file will be output, and all pages will
155187
# contain a <link> tag referring to it. The value of this option must be the
156188
# base URL from which the finished HTML is served.
157-
#html_use_opensearch = ''
189+
# html_use_opensearch = ''
158190

159191
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
160-
#html_file_suffix = ''
192+
# html_file_suffix = ''
161193

162194
# Output file base name for HTML help builder.
163195
htmlhelp_basename = 'tfdoc'
164196

165197

166-
# -- Options for LaTeX output --------------------------------------------------
198+
# -- Options for LaTeX output -------------------------------------------------
167199

168200
# The paper size ('letter' or 'a4').
169-
#latex_paper_size = 'letter'
201+
# latex_paper_size = 'letter'
170202

171203
# The font size ('10pt', '11pt' or '12pt').
172-
#latex_font_size = '10pt'
204+
# latex_font_size = '10pt'
173205

174206
# Grouping the document tree into LaTeX files. List of tuples
175-
# (source start file, target name, title, author, documentclass [howto/manual]).
207+
# (source start file, target name, title, author,
208+
# documentclass [howto/manual]).
176209
latex_documents = [
177210
('index', 'tf.tex', u'stereo\\_utils Documentation',
178211
u'Tully Foote and Eitan Marder-Eppstein', 'manual'),
179212
]
180213

181214
# The name of an image file (relative to this directory) to place at the top of
182215
# the title page.
183-
#latex_logo = None
216+
# latex_logo = None
184217

185218
# For "manual" documents, if this is true, then toplevel headings are parts,
186219
# not chapters.
187-
#latex_use_parts = False
220+
# latex_use_parts = False
188221

189222
# Additional stuff for the LaTeX preamble.
190-
#latex_preamble = ''
223+
# latex_preamble = ''
191224

192225
# Documents to append as an appendix to all manuals.
193-
#latex_appendices = []
226+
# latex_appendices = []
194227

195228
# If false, no module index is generated.
196-
#latex_use_modindex = True
229+
# latex_use_modindex = True
197230

198231

199232
# Example configuration for intersphinx: refer to the Python standard library.
200233
intersphinx_mapping = {
201234
'http://docs.python.org/': None,
202235
'http://docs.opencv.org/3.0-last-rst/': None,
203-
'http://docs.scipy.org/doc/numpy' : None
236+
'http://docs.scipy.org/doc/numpy': None
204237
}

tf2_kdl/include/tf2_kdl/tf2_kdl.h

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
1-
/*
2-
* Copyright (c) 2008, Willow Garage, Inc.
3-
* All rights reserved.
4-
*
5-
* Redistribution and use in source and binary forms, with or without
6-
* modification, are permitted provided that the following conditions are met:
7-
*
8-
* * Redistributions of source code must retain the above copyright
9-
* notice, this list of conditions and the following disclaimer.
10-
* * Redistributions in binary form must reproduce the above copyright
11-
* notice, this list of conditions and the following disclaimer in the
12-
* documentation and/or other materials provided with the distribution.
13-
* * Neither the name of the Willow Garage, Inc. nor the names of its
14-
* contributors may be used to endorse or promote products derived from
15-
* this software without specific prior written permission.
16-
*
17-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20-
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21-
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22-
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23-
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24-
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25-
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26-
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27-
* POSSIBILITY OF SUCH DAMAGE.
28-
*/
1+
// Copyright 2008 Willow Garage, Inc.
2+
//
3+
// Redistribution and use in source and binary forms, with or without
4+
// modification, are permitted provided that the following conditions are met:
5+
//
6+
// * Redistributions of source code must retain the above copyright
7+
// notice, this list of conditions and the following disclaimer.
8+
//
9+
// * Redistributions in binary form must reproduce the above copyright
10+
// notice, this list of conditions and the following disclaimer in the
11+
// documentation and/or other materials provided with the distribution.
12+
//
13+
// * Neither the name of the Willow Garage, Inc. nor the names of its
14+
// contributors may be used to endorse or promote products derived from
15+
// this software without specific prior written permission.
16+
//
17+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
21+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27+
// POSSIBILITY OF SUCH DAMAGE.
28+
2929

3030
/** \author Wim Meeussen */
3131

32-
#ifndef TF2_KDL_H
33-
#define TF2_KDL_H
32+
#ifndef TF2_KDL__TF2_KDL_H_
33+
#define TF2_KDL__TF2_KDL_H_
3434

3535
#warning This header is obsolete, please include tf2_kdl/tf2_kdl.hpp instead
3636

3737
#include <tf2_kdl/tf2_kdl.hpp>
3838

39-
#endif // TF2_KDL_H
39+
#endif // TF2_KDL__TF2_KDL_H_

0 commit comments

Comments
 (0)