Skip to content

Commit 50075c2

Browse files
authored
Merge pull request #370 from testing-cabal/ruff-format
Format code with ruff
2 parents 8dc8116 + 8a60e1b commit 50075c2

Some content is hidden

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

71 files changed

+5656
-4139
lines changed

.git-blame-ignore-revs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
68495ca617a9daef563af259ff25ca95b3e7e21d # initial reformat with ruff

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ jobs:
4141
run: |
4242
python -m ruff check .
4343
44+
- name: Format
45+
run: |
46+
python -m ruff format --check .
47+
4448
- name: Tests
4549
run: |
4650
python -W once -m testtools.run testtools.tests.test_suite

doc/conf.py

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -14,188 +14,193 @@
1414
# If extensions (or modules to document with autodoc) are in another directory,
1515
# add these directories to sys.path here. If the directory is relative to the
1616
# documentation root, use os.path.abspath to make it absolute, like shown here.
17-
#sys.path.append(os.path.abspath('.'))
17+
# sys.path.append(os.path.abspath('.'))
1818

1919
# -- General configuration -----------------------------------------------------
2020

2121
# Add any Sphinx extension module names here, as strings. They can be extensions
2222
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2323
extensions = [
24-
'sphinx.ext.autodoc',
25-
'sphinx.ext.intersphinx',
24+
"sphinx.ext.autodoc",
25+
"sphinx.ext.intersphinx",
2626
]
2727

2828
# Add any paths that contain templates here, relative to this directory.
29-
templates_path = ['_templates']
29+
templates_path = ["_templates"]
3030

3131
# The suffix of source filenames.
32-
source_suffix = '.rst'
32+
source_suffix = ".rst"
3333

3434
# The encoding of source files.
35-
#source_encoding = 'utf-8'
35+
# source_encoding = 'utf-8'
3636

3737
# The master toctree document.
38-
master_doc = 'index'
38+
master_doc = "index"
3939

4040
# General information about the project.
41-
project = 'testtools'
42-
copyright = '2010-2016, The testtools authors'
41+
project = "testtools"
42+
copyright = "2010-2016, The testtools authors"
4343

4444
# The version info for the project you're documenting, acts as replacement for
4545
# |version| and |release|, also used in various other places throughout the
4646
# built documents.
4747
#
4848
# The short X.Y version.
49-
version = 'VERSION'
49+
version = "VERSION"
5050
# The full version, including alpha/beta/rc tags.
51-
release = 'VERSION'
51+
release = "VERSION"
5252

5353
# The language for content autogenerated by Sphinx. Refer to documentation
5454
# for a list of supported languages.
55-
#language = None
55+
# language = None
5656

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

6363
# List of documents that shouldn't be included in the build.
64-
#unused_docs = []
64+
# unused_docs = []
6565

6666
# List of directories, relative to source directory, that shouldn't be searched
6767
# for source files.
68-
exclude_trees = ['_build']
68+
exclude_trees = ["_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

9191
# -- Options for HTML output ---------------------------------------------------
9292

9393
# The theme to use for HTML and HTML Help pages. Major themes that come with
9494
# Sphinx are currently 'default' and 'sphinxdoc'.
95-
html_theme = 'default'
95+
html_theme = "default"
9696

9797
# Theme options are theme-specific and customize the look and feel of a theme
9898
# further. For a list of options available for each theme, see the
9999
# documentation.
100-
#html_theme_options = {}
100+
# html_theme_options = {}
101101

102102
# Add any paths that contain custom themes here, relative to this directory.
103-
#html_theme_path = []
103+
# html_theme_path = []
104104

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

109109
# A shorter title for the navigation bar. Default is the same as html_title.
110-
#html_short_title = None
110+
# html_short_title = None
111111

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

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

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

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

130130
# If true, SmartyPants will be used to convert quotes and dashes to
131131
# typographically correct entities.
132-
#html_use_smartypants = True
132+
# html_use_smartypants = True
133133

134134
# Custom sidebar templates, maps document names to template names.
135-
#html_sidebars = {}
135+
# html_sidebars = {}
136136

137137
# Additional templates that should be rendered to pages, maps page names to
138138
# template names.
139-
#html_additional_pages = {}
139+
# html_additional_pages = {}
140140

141141
# If false, no module index is generated.
142-
#html_use_modindex = True
142+
# html_use_modindex = True
143143

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

147147
# If true, the index is split into individual pages for each letter.
148-
#html_split_index = False
148+
# html_split_index = False
149149

150150
# If true, links to the reST sources are added to the pages.
151-
#html_show_sourcelink = True
151+
# html_show_sourcelink = True
152152

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

158158
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
159-
#html_file_suffix = ''
159+
# html_file_suffix = ''
160160

161161
# Output file base name for HTML help builder.
162-
htmlhelp_basename = 'testtoolsdoc'
162+
htmlhelp_basename = "testtoolsdoc"
163163

164164

165165
# -- Options for LaTeX output --------------------------------------------------
166166

167167
# The paper size ('letter' or 'a4').
168-
#latex_paper_size = 'letter'
168+
# latex_paper_size = 'letter'
169169

170170
# The font size ('10pt', '11pt' or '12pt').
171-
#latex_font_size = '10pt'
171+
# latex_font_size = '10pt'
172172

173173
# Grouping the document tree into LaTeX files. List of tuples
174174
# (source start file, target name, title, author, documentclass [howto/manual]).
175175
latex_documents = [
176-
('index', 'testtools.tex', 'testtools Documentation',
177-
'The testtools authors', 'manual'),
176+
(
177+
"index",
178+
"testtools.tex",
179+
"testtools Documentation",
180+
"The testtools authors",
181+
"manual",
182+
),
178183
]
179184

180185
# The name of an image file (relative to this directory) to place at the top of
181186
# the title page.
182-
#latex_logo = None
187+
# latex_logo = None
183188

184189
# For "manual" documents, if this is true, then toplevel headings are parts,
185190
# not chapters.
186-
#latex_use_parts = False
191+
# latex_use_parts = False
187192

188193
# Additional stuff for the LaTeX preamble.
189-
#latex_preamble = ''
194+
# latex_preamble = ''
190195

191196
# Documents to append as an appendix to all manuals.
192-
#latex_appendices = []
197+
# latex_appendices = []
193198

194199
# If false, no module index is generated.
195-
#latex_use_modindex = True
200+
# latex_use_modindex = True
196201

197202
intersphinx_mapping = {
198-
'py2': ('https://docs.python.org/2', None),
199-
'py3': ('https://docs.python.org/3', None),
200-
'twisted': ('https://twistedmatrix.com/documents/current/api/', None),
203+
"py2": ("https://docs.python.org/2", None),
204+
"py3": ("https://docs.python.org/3", None),
205+
"twisted": ("https://twistedmatrix.com/documents/current/api/", None),
201206
}

0 commit comments

Comments
 (0)