Skip to content

Commit 8b677a7

Browse files
committed
Run pre-commit hooks
1 parent 111670b commit 8b677a7

12 files changed

+440
-310
lines changed

CHANGELOG.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,3 @@ Other
3636
v1.0.0 (2016-03-04)
3737
-------------------
3838
- Initial Release. [Chris Adams]
39-
40-

docs/conf.py

Lines changed: 81 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,34 @@
2222
parent = os.path.dirname(cwd)
2323
sys.path.append(parent)
2424

25-
import tabular_export
25+
import tabular_export # noqa: E402
2626

2727
# Avoid import errors from our use of Django utilities:
28-
settings.configure(CACHES={'default': {'BACKEND': 'django.core.cache.backends.dummy.DummyCache'}})
28+
settings.configure(
29+
CACHES={"default": {"BACKEND": "django.core.cache.backends.dummy.DummyCache"}}
30+
)
2931

3032

3133
# -- General configuration -----------------------------------------------------
3234

3335
# Add any Sphinx extension module names here, as strings. They can be extensions
3436
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
35-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
37+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.viewcode"]
3638

3739
# Add any paths that contain templates here, relative to this directory.
38-
templates_path = ['_templates']
40+
templates_path = ["_templates"]
3941

4042
# The suffix of source filenames.
41-
source_suffix = '.rst'
43+
source_suffix = ".rst"
4244

4345
# The encoding of source files.
44-
#source_encoding = 'utf-8-sig'
46+
# source_encoding = 'utf-8-sig'
4547

4648
# The master toctree document.
47-
master_doc = 'index'
49+
master_doc = "index"
4850

4951
# General information about the project.
50-
project = u'django-tabular-export'
52+
project = "django-tabular-export"
5153

5254
# The version info for the project you're documenting, acts as replacement for
5355
# |version| and |release|, also used in various other places throughout the
@@ -60,174 +62,182 @@
6062

6163
# The language for content autogenerated by Sphinx. Refer to documentation
6264
# for a list of supported languages.
63-
#language = None
65+
# language = None
6466

6567
# There are two options for replacing |today|: either, you set today to some
6668
# non-false value, then it is used:
67-
#today = ''
69+
# today = ''
6870
# Else, today_fmt is used as the format for a strftime call.
69-
#today_fmt = '%B %d, %Y'
71+
# today_fmt = '%B %d, %Y'
7072

7173
# List of patterns, relative to source directory, that match files and
7274
# directories to ignore when looking for source files.
73-
exclude_patterns = ['_build']
75+
exclude_patterns = ["_build"]
7476

7577
# The reST default role (used for this markup: `text`) to use for all documents.
76-
#default_role = None
78+
# default_role = None
7779

7880
# If true, '()' will be appended to :func: etc. cross-reference text.
79-
#add_function_parentheses = True
81+
# add_function_parentheses = True
8082

8183
# If true, the current module name will be prepended to all description
8284
# unit titles (such as .. function::).
83-
#add_module_names = True
85+
# add_module_names = True
8486

8587
# If true, sectionauthor and moduleauthor directives will be shown in the
8688
# output. They are ignored by default.
87-
#show_authors = False
89+
# show_authors = False
8890

8991
# The name of the Pygments (syntax highlighting) style to use.
90-
pygments_style = 'sphinx'
92+
pygments_style = "sphinx"
9193

9294
# A list of ignored prefixes for module index sorting.
93-
#modindex_common_prefix = []
95+
# modindex_common_prefix = []
9496

9597
# If true, keep warnings as "system message" paragraphs in the built documents.
96-
#keep_warnings = False
98+
# keep_warnings = False
9799

98100

99101
# -- Options for HTML output ---------------------------------------------------
100102

101103
# The theme to use for HTML and HTML Help pages. See the documentation for
102104
# a list of builtin themes.
103-
html_theme = 'default'
105+
html_theme = "default"
104106

105107
# Theme options are theme-specific and customize the look and feel of a theme
106108
# further. For a list of options available for each theme, see the
107109
# documentation.
108-
#html_theme_options = {}
110+
# html_theme_options = {}
109111

110112
# Add any paths that contain custom themes here, relative to this directory.
111-
#html_theme_path = []
113+
# html_theme_path = []
112114

113115
# The name for this set of Sphinx documents. If None, it defaults to
114116
# "<project> v<release> documentation".
115-
#html_title = None
117+
# html_title = None
116118

117119
# A shorter title for the navigation bar. Default is the same as html_title.
118-
#html_short_title = None
120+
# html_short_title = None
119121

120122
# The name of an image file (relative to this directory) to place at the top
121123
# of the sidebar.
122-
#html_logo = None
124+
# html_logo = None
123125

124126
# The name of an image file (within the static path) to use as favicon of the
125127
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
126128
# pixels large.
127-
#html_favicon = None
129+
# html_favicon = None
128130

129131
# Add any paths that contain custom static files (such as style sheets) here,
130132
# relative to this directory. They are copied after the builtin static files,
131133
# so a file named "default.css" will overwrite the builtin "default.css".
132-
html_static_path = ['_static']
134+
html_static_path = ["_static"]
133135

134136
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
135137
# using the given strftime format.
136-
#html_last_updated_fmt = '%b %d, %Y'
138+
# html_last_updated_fmt = '%b %d, %Y'
137139

138140
# If true, SmartyPants will be used to convert quotes and dashes to
139141
# typographically correct entities.
140-
#html_use_smartypants = True
142+
# html_use_smartypants = True
141143

142144
# Custom sidebar templates, maps document names to template names.
143-
#html_sidebars = {}
145+
# html_sidebars = {}
144146

145147
# Additional templates that should be rendered to pages, maps page names to
146148
# template names.
147-
#html_additional_pages = {}
149+
# html_additional_pages = {}
148150

149151
# If false, no module index is generated.
150-
#html_domain_indices = True
152+
# html_domain_indices = True
151153

152154
# If false, no index is generated.
153-
#html_use_index = True
155+
# html_use_index = True
154156

155157
# If true, the index is split into individual pages for each letter.
156-
#html_split_index = False
158+
# html_split_index = False
157159

158160
# If true, links to the reST sources are added to the pages.
159-
#html_show_sourcelink = True
161+
# html_show_sourcelink = True
160162

161163
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
162-
#html_show_sphinx = True
164+
# html_show_sphinx = True
163165

164166
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
165167
html_show_copyright = False
166168

167169
# If true, an OpenSearch description file will be output, and all pages will
168170
# contain a <link> tag referring to it. The value of this option must be the
169171
# base URL from which the finished HTML is served.
170-
#html_use_opensearch = ''
172+
# html_use_opensearch = ''
171173

172174
# This is the file name suffix for HTML files (e.g. ".xhtml").
173-
#html_file_suffix = None
175+
# html_file_suffix = None
174176

175177
# Output file base name for HTML help builder.
176-
htmlhelp_basename = 'django-tabular-exportdoc'
178+
htmlhelp_basename = "django-tabular-exportdoc"
177179

178180

179181
# -- Options for LaTeX output --------------------------------------------------
180182

181183
latex_elements = {
182-
# The paper size ('letterpaper' or 'a4paper').
183-
#'papersize': 'letterpaper',
184-
185-
# The font size ('10pt', '11pt' or '12pt').
186-
#'pointsize': '10pt',
187-
188-
# Additional stuff for the LaTeX preamble.
189-
#'preamble': '',
184+
# The paper size ('letterpaper' or 'a4paper').
185+
#'papersize': 'letterpaper',
186+
# The font size ('10pt', '11pt' or '12pt').
187+
#'pointsize': '10pt',
188+
# Additional stuff for the LaTeX preamble.
189+
#'preamble': '',
190190
}
191191

192192
# Grouping the document tree into LaTeX files. List of tuples
193193
# (source start file, target name, title, author, documentclass [howto/manual]).
194194
latex_documents = [
195-
('index', 'django-tabular-export.tex', u'django-tabular-export Documentation',
196-
u'Chris Adams', 'manual'),
195+
(
196+
"index",
197+
"django-tabular-export.tex",
198+
"django-tabular-export Documentation",
199+
"Chris Adams",
200+
"manual",
201+
),
197202
]
198203

199204
# The name of an image file (relative to this directory) to place at the top of
200205
# the title page.
201-
#latex_logo = None
206+
# latex_logo = None
202207

203208
# For "manual" documents, if this is true, then toplevel headings are parts,
204209
# not chapters.
205-
#latex_use_parts = False
210+
# latex_use_parts = False
206211

207212
# If true, show page references after internal links.
208-
#latex_show_pagerefs = False
213+
# latex_show_pagerefs = False
209214

210215
# If true, show URL addresses after external links.
211-
#latex_show_urls = False
216+
# latex_show_urls = False
212217

213218
# Documents to append as an appendix to all manuals.
214-
#latex_appendices = []
219+
# latex_appendices = []
215220

216221
# If false, no module index is generated.
217-
#latex_domain_indices = True
222+
# latex_domain_indices = True
218223

219224

220225
# -- Options for manual page output --------------------------------------------
221226

222227
# One entry per manual page. List of tuples
223228
# (source start file, name, description, authors, manual section).
224229
man_pages = [
225-
('index', 'django-tabular-export', u'django-tabular-export Documentation',
226-
[u'Chris Adams'], 1)
230+
(
231+
"index",
232+
"django-tabular-export",
233+
"django-tabular-export Documentation",
234+
["Chris Adams"],
235+
1,
236+
)
227237
]
228238

229239
# If true, show URL addresses after external links.
230-
#man_show_urls = False
240+
# man_show_urls = False
231241

232242

233243
# -- Options for Texinfo output ------------------------------------------------
@@ -236,19 +246,25 @@
236246
# (source start file, target name, title, author,
237247
# dir menu entry, description, category)
238248
texinfo_documents = [
239-
('index', 'django-tabular-export', u'django-tabular-export Documentation',
240-
u'Chris Adams', 'django-tabular-export', 'One line description of project.',
241-
'Miscellaneous'),
249+
(
250+
"index",
251+
"django-tabular-export",
252+
"django-tabular-export Documentation",
253+
"Chris Adams",
254+
"django-tabular-export",
255+
"One line description of project.",
256+
"Miscellaneous",
257+
),
242258
]
243259

244260
# Documents to append as an appendix to all manuals.
245-
#texinfo_appendices = []
261+
# texinfo_appendices = []
246262

247263
# If false, no module index is generated.
248-
#texinfo_domain_indices = True
264+
# texinfo_domain_indices = True
249265

250266
# How to display URL addresses: 'footnote', 'no', or 'inline'.
251-
#texinfo_show_urls = 'footnote'
267+
# texinfo_show_urls = 'footnote'
252268

253269
# If true, do not generate a @detailmenu in the "Top" node's menu.
254-
#texinfo_no_detailmenu = False
270+
# texinfo_no_detailmenu = False

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
django>=4.0,<6.0
2-
xlsxwriter
2+
xlsxwriter

setup.py

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,46 @@
22
# encoding: utf-8
33
from __future__ import absolute_import, division, print_function
44

5-
import os
6-
import re
7-
import sys
85

96
from setuptools import setup
107

11-
readme = open('README.rst').read()
8+
readme = open("README.rst").read()
129

1310
setup(
14-
name='django-tabular-export',
15-
version='1.2.0',
11+
name="django-tabular-export",
12+
version="1.2.0",
1613
description="""Simple spreadsheet exports from Django""",
1714
long_description=readme,
18-
author='Chris Adams',
19-
author_email='[email protected]',
20-
url='https://github.com/LibraryOfCongress/django-tabular-export',
15+
author="Chris Adams",
16+
author_email="[email protected]",
17+
url="https://github.com/LibraryOfCongress/django-tabular-export",
2118
packages=[
22-
'tabular_export',
19+
"tabular_export",
2320
],
2421
include_package_data=True,
2522
install_requires=[
26-
'Django',
27-
'xlsxwriter',
23+
"Django",
24+
"xlsxwriter",
2825
],
29-
test_suite='tests.run_tests.run_tests',
30-
license='CC0',
26+
test_suite="tests.run_tests.run_tests",
27+
license="CC0",
3128
zip_safe=False,
3229
classifiers=[
33-
'Development Status :: 5 - Production/Stable',
34-
'Framework :: Django',
35-
'Framework :: Django :: 4.0',
36-
'Framework :: Django :: 4.1',
37-
'Framework :: Django :: 4.2',
38-
'Framework :: Django :: 5.0',
39-
'Framework :: Django :: 5.1',
40-
'Intended Audience :: Developers',
41-
'License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication',
42-
'Natural Language :: English',
43-
'Programming Language :: Python :: 3',
44-
'Programming Language :: Python :: 3.9',
45-
'Programming Language :: Python :: 3.10',
46-
'Programming Language :: Python :: 3.11',
47-
'Programming Language :: Python :: 3.12',
48-
'Programming Language :: Python :: 3.13',
30+
"Development Status :: 5 - Production/Stable",
31+
"Framework :: Django",
32+
"Framework :: Django :: 4.0",
33+
"Framework :: Django :: 4.1",
34+
"Framework :: Django :: 4.2",
35+
"Framework :: Django :: 5.0",
36+
"Framework :: Django :: 5.1",
37+
"Intended Audience :: Developers",
38+
"License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication",
39+
"Natural Language :: English",
40+
"Programming Language :: Python :: 3",
41+
"Programming Language :: Python :: 3.9",
42+
"Programming Language :: Python :: 3.10",
43+
"Programming Language :: Python :: 3.11",
44+
"Programming Language :: Python :: 3.12",
45+
"Programming Language :: Python :: 3.13",
4946
],
5047
)

tabular_export/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '1.0.2'
1+
__version__ = "1.0.2"

0 commit comments

Comments
 (0)