Skip to content

Commit 1bf5c5b

Browse files
authored
Flake, Black, cleanup (pyzo#669)
* cleanup * remove contributers.txt; it's hard to track and Github tracks that metric pretty well in general. * switch to 2-clause BSD * flake8 * style fixes * black * adjust for flake8 * black tweak * install on ci * replace os.mkdir with os.makedirs
1 parent d986768 commit 1bf5c5b

File tree

136 files changed

+13403
-11767
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

136 files changed

+13403
-11767
lines changed

.hgignore

Lines changed: 0 additions & 9 deletions
This file was deleted.

LICENSE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Pyzo is subject to the (new) BSD license:
2+
3+
Copyright (C) 2008-2020, the Pyzo development team
4+
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions are
7+
met:
8+
9+
1. Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
12+
2. Redistributions in binary form must reproduce the above copyright
13+
notice, this list of conditions and the following disclaimer in the
14+
documentation and/or other materials provided with the distribution.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
17+
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
19+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20+
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
22+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
23+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
24+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

MANIFEST.in

Lines changed: 0 additions & 5 deletions
This file was deleted.

azure-pipelines.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,30 @@ jobs:
4343
set -ex
4444
python -m pip install -U pip
4545
pip install -U PyQt5
46-
pip install -U pytest flake8 pyinstaller
46+
pip install -U pytest black flake8 pyinstaller
4747
- task: Bash@3
48-
displayName: Lint (flake8)
48+
displayName: Lint (black & flake8)
4949
condition: and(succeeded(), eq(variables['LINT'], '1'))
5050
inputs:
5151
targetType: inline
5252
script: |
5353
set -ex
54+
black --check .
5455
flake8 .
56+
- task: Bash@3
57+
displayName: Install sdist
58+
inputs:
59+
targetType: inline
60+
script: |
61+
set -ex
62+
python setup.py sdist install
5563
- task: Bash@3
5664
displayName: Test
5765
inputs:
5866
targetType: inline
5967
script: |
6068
set -ex
61-
pytest --junit-xml=results.xml || true
69+
pytest --junit-xml=results.xml tests || true
6270
6371
# Fail the task if results.xml was not created
6472
if [[ ! -f results.xml ]]

doc/conf.py

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -17,212 +17,206 @@
1717
# If extensions (or modules to document with autodoc) are in another directory,
1818
# add these directories to sys.path here. If the directory is relative to the
1919
# documentation root, use os.path.abspath to make it absolute, like shown here.
20-
#sys.path.insert(0, os.path.abspath('.'))
20+
# sys.path.insert(0, os.path.abspath('.'))
2121

2222
# -- General configuration -----------------------------------------------------
2323

2424
# If your documentation needs a minimal Sphinx version, state it here.
25-
#needs_sphinx = '1.0'
25+
# needs_sphinx = '1.0'
2626

2727
# Add any Sphinx extension module names here, as strings. They can be extensions
2828
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29-
extensions = ['sphinx.ext.autodoc']
29+
extensions = ["sphinx.ext.autodoc"]
3030

3131
# Add any paths that contain templates here, relative to this directory.
32-
templates_path = ['_templates']
32+
templates_path = ["_templates"]
3333

3434
# The suffix of source filenames.
35-
source_suffix = '.rst'
35+
source_suffix = ".rst"
3636

3737
# The encoding of source files.
38-
#source_encoding = 'utf-8-sig'
38+
# source_encoding = 'utf-8-sig'
3939

4040
# The master toctree document.
41-
master_doc = 'index'
41+
master_doc = "index"
4242

4343
# General information about the project.
44-
project = 'Pyzo'
45-
copyright = '2016, Pyzo contributors'
44+
project = "Pyzo"
45+
copyright = "2016, Pyzo contributors"
4646

4747
# The version info for the project you're documenting, acts as replacement for
4848
# |version| and |release|, also used in various other places throughout the
4949
# built documents.
5050
#
5151
# The short X.Y version.
52-
version = '3.4'
52+
version = "3.4"
5353
# The full version, including alpha/beta/rc tags.
54-
release = '3.4'
54+
release = "3.4"
5555

5656
# The language for content autogenerated by Sphinx. Refer to documentation
5757
# for a list of supported languages.
58-
#language = None
58+
# language = None
5959

6060
# There are two options for replacing |today|: either, you set today to some
6161
# non-false value, then it is used:
62-
#today = ''
62+
# today = ''
6363
# Else, today_fmt is used as the format for a strftime call.
64-
#today_fmt = '%B %d, %Y'
64+
# today_fmt = '%B %d, %Y'
6565

6666
# List of patterns, relative to source directory, that match files and
6767
# directories to ignore when looking for source files.
68-
exclude_patterns = ['_build']
68+
exclude_patterns = ["_build"]
6969

7070
# The reST default role (used for this markup: `text`) to use for all documents.
71-
#default_role = None
71+
# default_role = None
7272

7373
# If true, '()' will be appended to :func: etc. cross-reference text.
74-
#add_function_parentheses = True
74+
# add_function_parentheses = True
7575

7676
# If true, the current module name will be prepended to all description
7777
# unit titles (such as .. function::).
78-
#add_module_names = True
78+
# add_module_names = True
7979

8080
# If true, sectionauthor and moduleauthor directives will be shown in the
8181
# output. They are ignored by default.
82-
#show_authors = False
82+
# show_authors = False
8383

8484
# The name of the Pygments (syntax highlighting) style to use.
85-
pygments_style = 'sphinx'
85+
pygments_style = "sphinx"
8686

8787
# A list of ignored prefixes for module index sorting.
88-
#modindex_common_prefix = []
88+
# modindex_common_prefix = []
8989

9090
# If true, keep warnings as "system message" paragraphs in the built documents.
91-
#keep_warnings = False
91+
# keep_warnings = False
9292

9393

9494
# -- Options for HTML output ---------------------------------------------------
9595

9696
# The theme to use for HTML and HTML Help pages. See the documentation for
9797
# a list of builtin themes.
98-
html_theme = 'default'
98+
html_theme = "default"
9999

100100
# Theme options are theme-specific and customize the look and feel of a theme
101101
# further. For a list of options available for each theme, see the
102102
# documentation.
103-
#html_theme_options = {}
103+
# html_theme_options = {}
104104

105105
# Add any paths that contain custom themes here, relative to this directory.
106-
#html_theme_path = []
106+
# html_theme_path = []
107107

108108
# The name for this set of Sphinx documents. If None, it defaults to
109109
# "<project> v<release> documentation".
110-
#html_title = None
110+
# html_title = None
111111

112112
# A shorter title for the navigation bar. Default is the same as html_title.
113-
#html_short_title = None
113+
# html_short_title = None
114114

115115
# The name of an image file (relative to this directory) to place at the top
116116
# of the sidebar.
117-
#html_logo = None
117+
# html_logo = None
118118

119119
# The name of an image file (within the static path) to use as favicon of the
120120
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
121121
# pixels large.
122-
#html_favicon = None
122+
# html_favicon = None
123123

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

129129
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
130130
# using the given strftime format.
131-
#html_last_updated_fmt = '%b %d, %Y'
131+
# html_last_updated_fmt = '%b %d, %Y'
132132

133133
# If true, SmartyPants will be used to convert quotes and dashes to
134134
# typographically correct entities.
135-
#html_use_smartypants = True
135+
# html_use_smartypants = True
136136

137137
# Custom sidebar templates, maps document names to template names.
138-
#html_sidebars = {}
138+
# html_sidebars = {}
139139

140140
# Additional templates that should be rendered to pages, maps page names to
141141
# template names.
142-
#html_additional_pages = {}
142+
# html_additional_pages = {}
143143

144144
# If false, no module index is generated.
145-
#html_domain_indices = True
145+
# html_domain_indices = True
146146

147147
# If false, no index is generated.
148-
#html_use_index = True
148+
# html_use_index = True
149149

150150
# If true, the index is split into individual pages for each letter.
151-
#html_split_index = False
151+
# html_split_index = False
152152

153153
# If true, links to the reST sources are added to the pages.
154-
#html_show_sourcelink = True
154+
# html_show_sourcelink = True
155155

156156
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
157-
#html_show_sphinx = True
157+
# html_show_sphinx = True
158158

159159
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
160-
#html_show_copyright = True
160+
# html_show_copyright = True
161161

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

167167
# This is the file name suffix for HTML files (e.g. ".xhtml").
168-
#html_file_suffix = None
168+
# html_file_suffix = None
169169

170170
# Output file base name for HTML help builder.
171-
htmlhelp_basename = 'Pyzodoc'
171+
htmlhelp_basename = "Pyzodoc"
172172

173173

174174
# -- Options for LaTeX output --------------------------------------------------
175175

176176
latex_elements = {
177-
# The paper size ('letterpaper' or 'a4paper').
178-
#'papersize': 'letterpaper',
179-
180-
# The font size ('10pt', '11pt' or '12pt').
181-
#'pointsize': '10pt',
182-
183-
# Additional stuff for the LaTeX preamble.
184-
#'preamble': '',
177+
# The paper size ('letterpaper' or 'a4paper').
178+
#'papersize': 'letterpaper',
179+
# The font size ('10pt', '11pt' or '12pt').
180+
#'pointsize': '10pt',
181+
# Additional stuff for the LaTeX preamble.
182+
#'preamble': '',
185183
}
186184

187185
# Grouping the document tree into LaTeX files. List of tuples
188186
# (source start file, target name, title, author, documentclass [howto/manual]).
189187
latex_documents = [
190-
('index', 'pyzo.tex', 'Pyzo Documentation',
191-
'Pyzo contributors', 'manual'),
188+
("index", "pyzo.tex", "Pyzo Documentation", "Pyzo contributors", "manual"),
192189
]
193190

194191
# The name of an image file (relative to this directory) to place at the top of
195192
# the title page.
196-
#latex_logo = None
193+
# latex_logo = None
197194

198195
# For "manual" documents, if this is true, then toplevel headings are parts,
199196
# not chapters.
200-
#latex_use_parts = False
197+
# latex_use_parts = False
201198

202199
# If true, show page references after internal links.
203-
#latex_show_pagerefs = False
200+
# latex_show_pagerefs = False
204201

205202
# If true, show URL addresses after external links.
206-
#latex_show_urls = False
203+
# latex_show_urls = False
207204

208205
# Documents to append as an appendix to all manuals.
209-
#latex_appendices = []
206+
# latex_appendices = []
210207

211208
# If false, no module index is generated.
212-
#latex_domain_indices = True
209+
# latex_domain_indices = True
213210

214211

215212
# -- Options for manual page output --------------------------------------------
216213

217214
# One entry per manual page. List of tuples
218215
# (source start file, name, description, authors, manual section).
219-
man_pages = [
220-
('index', 'pyzo', 'Pyzo Documentation',
221-
['Pyzo contributors'], 1)
222-
]
216+
man_pages = [("index", "pyzo", "Pyzo Documentation", ["Pyzo contributors"], 1)]
223217

224218
# If true, show URL addresses after external links.
225-
#man_show_urls = False
219+
# man_show_urls = False
226220

227221

228222
# -- Options for Texinfo output ------------------------------------------------
@@ -231,19 +225,25 @@
231225
# (source start file, target name, title, author,
232226
# dir menu entry, description, category)
233227
texinfo_documents = [
234-
('index', 'Pyzo', 'Pyzo Documentation',
235-
'Pyzo contributors', 'Pyzo', 'One line description of project.',
236-
'Miscellaneous'),
228+
(
229+
"index",
230+
"Pyzo",
231+
"Pyzo Documentation",
232+
"Pyzo contributors",
233+
"Pyzo",
234+
"One line description of project.",
235+
"Miscellaneous",
236+
),
237237
]
238238

239239
# Documents to append as an appendix to all manuals.
240-
#texinfo_appendices = []
240+
# texinfo_appendices = []
241241

242242
# If false, no module index is generated.
243-
#texinfo_domain_indices = True
243+
# texinfo_domain_indices = True
244244

245245
# How to display URL addresses: 'footnote', 'no', or 'inline'.
246-
#texinfo_show_urls = 'footnote'
246+
# texinfo_show_urls = 'footnote'
247247

248248
# If true, do not generate a @detailmenu in the "Top" node's menu.
249-
#texinfo_no_detailmenu = False
249+
# texinfo_no_detailmenu = False
File renamed without changes.

0 commit comments

Comments
 (0)