Skip to content

Commit a48f470

Browse files
committed
Blacked the repo
1 parent e6567b8 commit a48f470

22 files changed

+2488
-1835
lines changed

doc/source/conf.py

+77-73
Original file line numberDiff line numberDiff line change
@@ -17,242 +17,240 @@
1717

1818
from mock import Mock as MagicMock
1919

20+
2021
class Mock(MagicMock):
2122
__all__ = []
2223

2324
@classmethod
2425
def __getattr__(cls, name):
25-
return Mock()
26-
27-
MOCK_MODULES = ['argparse', 'numpy', 'pandas']
26+
return Mock()
27+
28+
29+
MOCK_MODULES = ["argparse", "numpy", "pandas"]
2830
sys.modules.update((mod_name, Mock()) for mod_name in MOCK_MODULES)
2931

3032
# workaround for building docs without numpy
3133
import numpy
34+
3235
numpy.frombuffer = lambda x, dtype: [None]
3336
numpy.ndarray = Mock
3437
# end-of-workaround
3538

3639
# If extensions (or modules to document with autodoc) are in another directory,
3740
# add these directories to sys.path here. If the directory is relative to the
3841
# documentation root, use os.path.abspath to make it absolute, like shown here.
39-
sys.path.insert(0, os.path.abspath('../..'))
42+
sys.path.insert(0, os.path.abspath("../.."))
4043

4144
# -- General configuration ------------------------------------------------
4245

4346
# If your documentation needs a minimal Sphinx version, state it here.
44-
#needs_sphinx = '1.0'
47+
# needs_sphinx = '1.0'
4548

4649
# Add any Sphinx extension module names here, as strings. They can be
4750
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4851
# ones.
4952
extensions = [
50-
'sphinx.ext.autodoc',
53+
"sphinx.ext.autodoc",
5154
]
5255

5356
# Add any paths that contain templates here, relative to this directory.
54-
templates_path = ['_templates']
57+
templates_path = ["_templates"]
5558

5659
# The suffix of source filenames.
57-
source_suffix = '.rst'
60+
source_suffix = ".rst"
5861

5962
# The encoding of source files.
60-
#source_encoding = 'utf-8-sig'
63+
# source_encoding = 'utf-8-sig'
6164

6265
# The master toctree document.
63-
master_doc = 'index'
66+
master_doc = "index"
6467

6568
# General information about the project.
66-
project = u'qPython'
67-
copyright = u'2014-2016, DEVnet'
69+
project = u"qPython"
70+
copyright = u"2014-2016, DEVnet"
6871

6972
# The version info for the project you're documenting, acts as replacement for
7073
# |version| and |release|, also used in various other places throughout the
7174
# built documents.
7275
#
7376
from qpython import __version__
77+
7478
# The short X.Y version.
7579
version = __version__
7680
# The full version, including alpha/beta/rc tags.
7781
release = __version__
7882

7983
# The language for content autogenerated by Sphinx. Refer to documentation
8084
# for a list of supported languages.
81-
#language = None
85+
# language = None
8286

8387
# There are two options for replacing |today|: either, you set today to some
8488
# non-false value, then it is used:
85-
#today = ''
89+
# today = ''
8690
# Else, today_fmt is used as the format for a strftime call.
87-
#today_fmt = '%B %d, %Y'
91+
# today_fmt = '%B %d, %Y'
8892

8993
# List of patterns, relative to source directory, that match files and
9094
# directories to ignore when looking for source files.
9195
exclude_patterns = []
9296

9397
# The reST default role (used for this markup: `text`) to use for all
9498
# documents.
95-
#default_role = None
99+
# default_role = None
96100

97101
# If true, '()' will be appended to :func: etc. cross-reference text.
98-
#add_function_parentheses = True
102+
# add_function_parentheses = True
99103

100104
# If true, the current module name will be prepended to all description
101105
# unit titles (such as .. function::).
102-
#add_module_names = True
106+
# add_module_names = True
103107

104108
# If true, sectionauthor and moduleauthor directives will be shown in the
105109
# output. They are ignored by default.
106-
#show_authors = False
110+
# show_authors = False
107111

108112
# The name of the Pygments (syntax highlighting) style to use.
109-
pygments_style = 'sphinx'
113+
pygments_style = "sphinx"
110114

111115
# A list of ignored prefixes for module index sorting.
112-
#modindex_common_prefix = []
116+
# modindex_common_prefix = []
113117

114118
# If true, keep warnings as "system message" paragraphs in the built documents.
115-
#keep_warnings = False
119+
# keep_warnings = False
116120

117121

118122
# -- Options for HTML output ----------------------------------------------
119123

120124
# The theme to use for HTML and HTML Help pages. See the documentation for
121125
# a list of builtin themes.
122-
html_theme = 'default'
126+
html_theme = "default"
123127

124128
# Theme options are theme-specific and customize the look and feel of a theme
125129
# further. For a list of options available for each theme, see the
126130
# documentation.
127-
#html_theme_options = {}
131+
# html_theme_options = {}
128132

129133
# Add any paths that contain custom themes here, relative to this directory.
130-
#html_theme_path = []
134+
# html_theme_path = []
131135

132136
# The name for this set of Sphinx documents. If None, it defaults to
133137
# "<project> v<release> documentation".
134-
#html_title = None
138+
# html_title = None
135139

136140
# A shorter title for the navigation bar. Default is the same as html_title.
137-
#html_short_title = None
141+
# html_short_title = None
138142

139143
# The name of an image file (relative to this directory) to place at the top
140144
# of the sidebar.
141-
#html_logo = None
145+
# html_logo = None
142146

143147
# The name of an image file (within the static path) to use as favicon of the
144148
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
145149
# pixels large.
146-
#html_favicon = None
150+
# html_favicon = None
147151

148152
# Add any paths that contain custom static files (such as style sheets) here,
149153
# relative to this directory. They are copied after the builtin static files,
150154
# so a file named "default.css" will overwrite the builtin "default.css".
151-
#html_static_path = ['_static']
155+
# html_static_path = ['_static']
152156

153157
# Add any extra paths that contain custom files (such as robots.txt or
154158
# .htaccess) here, relative to this directory. These files are copied
155159
# directly to the root of the documentation.
156-
#html_extra_path = []
160+
# html_extra_path = []
157161

158162
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
159163
# using the given strftime format.
160-
#html_last_updated_fmt = '%b %d, %Y'
164+
# html_last_updated_fmt = '%b %d, %Y'
161165

162166
# If true, SmartyPants will be used to convert quotes and dashes to
163167
# typographically correct entities.
164-
#html_use_smartypants = True
168+
# html_use_smartypants = True
165169

166170
# Custom sidebar templates, maps document names to template names.
167-
#html_sidebars = {}
171+
# html_sidebars = {}
168172

169173
# Additional templates that should be rendered to pages, maps page names to
170174
# template names.
171-
#html_additional_pages = {}
175+
# html_additional_pages = {}
172176

173177
# If false, no module index is generated.
174-
#html_domain_indices = True
178+
# html_domain_indices = True
175179

176180
# If false, no index is generated.
177-
#html_use_index = True
181+
# html_use_index = True
178182

179183
# If true, the index is split into individual pages for each letter.
180-
#html_split_index = False
184+
# html_split_index = False
181185

182186
# If true, links to the reST sources are added to the pages.
183-
#html_show_sourcelink = True
187+
# html_show_sourcelink = True
184188

185189
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
186-
#html_show_sphinx = True
190+
# html_show_sphinx = True
187191

188192
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
189-
#html_show_copyright = True
193+
# html_show_copyright = True
190194

191195
# If true, an OpenSearch description file will be output, and all pages will
192196
# contain a <link> tag referring to it. The value of this option must be the
193197
# base URL from which the finished HTML is served.
194-
#html_use_opensearch = ''
198+
# html_use_opensearch = ''
195199

196200
# This is the file name suffix for HTML files (e.g. ".xhtml").
197-
#html_file_suffix = None
201+
# html_file_suffix = None
198202

199203
# Output file base name for HTML help builder.
200-
htmlhelp_basename = 'qPythondoc'
204+
htmlhelp_basename = "qPythondoc"
201205

202206

203207
# -- Options for LaTeX output ---------------------------------------------
204208

205209
latex_elements = {
206-
# The paper size ('letterpaper' or 'a4paper').
207-
#'papersize': 'letterpaper',
208-
209-
# The font size ('10pt', '11pt' or '12pt').
210-
#'pointsize': '10pt',
211-
212-
# Additional stuff for the LaTeX preamble.
213-
#'preamble': '',
210+
# The paper size ('letterpaper' or 'a4paper').
211+
#'papersize': 'letterpaper',
212+
# The font size ('10pt', '11pt' or '12pt').
213+
#'pointsize': '10pt',
214+
# Additional stuff for the LaTeX preamble.
215+
#'preamble': '',
214216
}
215217

216218
# Grouping the document tree into LaTeX files. List of tuples
217219
# (source start file, target name, title,
218220
# author, documentclass [howto, manual, or own class]).
219221
latex_documents = [
220-
('index', 'qPython.tex', u'qPython Documentation',
221-
u'DEVnet', 'manual'),
222+
("index", "qPython.tex", u"qPython Documentation", u"DEVnet", "manual"),
222223
]
223224

224225
# The name of an image file (relative to this directory) to place at the top of
225226
# the title page.
226-
#latex_logo = None
227+
# latex_logo = None
227228

228229
# For "manual" documents, if this is true, then toplevel headings are parts,
229230
# not chapters.
230-
#latex_use_parts = False
231+
# latex_use_parts = False
231232

232233
# If true, show page references after internal links.
233-
#latex_show_pagerefs = False
234+
# latex_show_pagerefs = False
234235

235236
# If true, show URL addresses after external links.
236-
#latex_show_urls = False
237+
# latex_show_urls = False
237238

238239
# Documents to append as an appendix to all manuals.
239-
#latex_appendices = []
240+
# latex_appendices = []
240241

241242
# If false, no module index is generated.
242-
#latex_domain_indices = True
243+
# latex_domain_indices = True
243244

244245

245246
# -- Options for manual page output ---------------------------------------
246247

247248
# One entry per manual page. List of tuples
248249
# (source start file, name, description, authors, manual section).
249-
man_pages = [
250-
('index', 'qpython', u'qPython Documentation',
251-
[u'DEVnet'], 1)
252-
]
250+
man_pages = [("index", "qpython", u"qPython Documentation", [u"DEVnet"], 1)]
253251

254252
# If true, show URL addresses after external links.
255-
#man_show_urls = False
253+
# man_show_urls = False
256254

257255

258256
# -- Options for Texinfo output -------------------------------------------
@@ -261,20 +259,26 @@ def __getattr__(cls, name):
261259
# (source start file, target name, title, author,
262260
# dir menu entry, description, category)
263261
texinfo_documents = [
264-
('index', 'qPython', u'qPython Documentation',
265-
u'DEVnet', 'qPython', 'Interprocess communication between Python and kdb+',
266-
'Miscellaneous'),
262+
(
263+
"index",
264+
"qPython",
265+
u"qPython Documentation",
266+
u"DEVnet",
267+
"qPython",
268+
"Interprocess communication between Python and kdb+",
269+
"Miscellaneous",
270+
),
267271
]
268272

269273
# Documents to append as an appendix to all manuals.
270-
#texinfo_appendices = []
274+
# texinfo_appendices = []
271275

272276
# If false, no module index is generated.
273-
#texinfo_domain_indices = True
277+
# texinfo_domain_indices = True
274278

275279
# How to display URL addresses: 'footnote', 'no', or 'inline'.
276-
#texinfo_show_urls = 'footnote'
280+
# texinfo_show_urls = 'footnote'
277281

278282
# If true, do not generate a @detailmenu in the "Top" node's menu.
279-
#texinfo_no_detailmenu = False
280-
autodoc_member_order = 'bysource'
283+
# texinfo_no_detailmenu = False
284+
autodoc_member_order = "bysource"

qpython/__init__.py

+11-16
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
# limitations under the License.
1515
#
1616

17-
__all__ = ['qconnection', 'qtype', 'qtemporal', 'qcollection']
17+
__all__ = ["qconnection", "qtype", "qtemporal", "qcollection"]
1818

1919

20-
__version__ = '2.0.0'
21-
20+
__version__ = "2.0.0"
2221

2322

2423
try:
@@ -30,20 +29,21 @@
3029

3130

3231
class MetaData(object):
33-
'''Utility class for enriching data structures with meta data, e.g. qtype hint.'''
32+
"""Utility class for enriching data structures with meta data, e.g. qtype hint."""
33+
3434
def __init__(self, **kw):
3535
self.__dict__.update(kw)
3636

3737
def __repr__(self):
3838
if not self.__dict__.items():
39-
return 'metadata()'
39+
return "metadata()"
4040

41-
s = ['metadata(']
41+
s = ["metadata("]
4242
for k, v in self.__dict__.items():
43-
s.append('%s=%s' % (k, repr(v)))
44-
s.append(', ')
45-
s[-1] = ')'
46-
return ''.join(s)
43+
s.append("%s=%s" % (k, repr(v)))
44+
s.append(", ")
45+
s[-1] = ")"
46+
return "".join(s)
4747

4848
def __getattr__(self, attr):
4949
return None
@@ -61,9 +61,4 @@ def union_dict(self, **kw):
6161
return dict(list(self.as_dict().items()) + list(kw.items()))
6262

6363

64-
65-
CONVERSION_OPTIONS = MetaData(raw = False,
66-
numpy_temporals = False,
67-
pandas = False,
68-
single_char_strings = False
69-
)
64+
CONVERSION_OPTIONS = MetaData(raw=False, numpy_temporals=False, pandas=False, single_char_strings=False)

0 commit comments

Comments
 (0)