Skip to content

Commit e879575

Browse files
committed
ci: code reformatted and linter tests added
Signed-off-by: ffyuanda <[email protected]>
1 parent 6fd3198 commit e879575

File tree

7 files changed

+184
-124
lines changed

7 files changed

+184
-124
lines changed

.github/workflows/build.yml

+14
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,20 @@ jobs:
4040
COVERALLS_FLAG_NAME: ${{ matrix.os }} - ${{ matrix.python-version }}
4141
COVERALLS_PARALLEL: true
4242

43+
lint:
44+
name: Run Linters
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v2
49+
50+
- name: Super-Linter
51+
uses: github/[email protected]
52+
env:
53+
VALIDATE_PYTHON_BLACK: true
54+
DEFAULT_BRANCH: master
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56+
4357
coveralls:
4458
name: Indicate completion to coveralls.io
4559
needs: test

docs/source/conf.py

+82-77
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,47 @@
1919
# If extensions (or modules to document with autodoc) are in another directory,
2020
# add these directories to sys.path here. If the directory is relative to the
2121
# documentation root, use os.path.abspath to make it absolute, like shown here.
22-
sys.path.insert(0, os.path.abspath('../..'))
22+
sys.path.insert(0, os.path.abspath("../.."))
2323

2424
# -- General configuration ------------------------------------------------
2525

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

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

3636
# Add any paths that contain templates here, relative to this directory.
37-
templates_path = ['_templates']
37+
templates_path = ["_templates"]
3838

3939
# The suffix(es) of source filenames.
4040
# You can specify multiple suffix as a list of string:
4141
# source_suffix = ['.rst', '.md']
42-
source_suffix = '.rst'
42+
source_suffix = ".rst"
4343

4444
# The encoding of source files.
45-
#source_encoding = 'utf-8-sig'
45+
# source_encoding = 'utf-8-sig'
4646

4747
# The master toctree document.
48-
master_doc = 'index'
48+
master_doc = "index"
4949

5050
# General information about the project.
51-
project = 'flask-casbin'
52-
copyright = '2016, Jesse Cooper'
53-
author = 'Jesse Cooper'
51+
project = "flask-casbin"
52+
copyright = "2016, Jesse Cooper"
53+
author = "Jesse Cooper"
5454

5555
# The version info for the project you're documenting, acts as replacement for
5656
# |version| and |release|, also used in various other places throughout the
5757
# built documents.
5858
#
5959
# The short X.Y version.
60-
version = '0.1.0'
60+
version = "0.1.0"
6161
# The full version, including alpha/beta/rc tags.
62-
release = '0.1.0'
62+
release = "0.1.0"
6363

6464
# The language for content autogenerated by Sphinx. Refer to documentation
6565
# for a list of supported languages.
@@ -70,9 +70,9 @@
7070

7171
# There are two options for replacing |today|: either, you set today to some
7272
# non-false value, then it is used:
73-
#today = ''
73+
# today = ''
7474
# Else, today_fmt is used as the format for a strftime call.
75-
#today_fmt = '%B %d, %Y'
75+
# today_fmt = '%B %d, %Y'
7676

7777
# List of patterns, relative to source directory, that match files and
7878
# directories to ignore when looking for source files.
@@ -81,27 +81,27 @@
8181

8282
# The reST default role (used for this markup: `text`) to use for all
8383
# documents.
84-
#default_role = None
84+
# default_role = None
8585

8686
# If true, '()' will be appended to :func: etc. cross-reference text.
87-
#add_function_parentheses = True
87+
# add_function_parentheses = True
8888

8989
# If true, the current module name will be prepended to all description
9090
# unit titles (such as .. function::).
91-
#add_module_names = True
91+
# add_module_names = True
9292

9393
# If true, sectionauthor and moduleauthor directives will be shown in the
9494
# output. They are ignored by default.
95-
#show_authors = False
95+
# show_authors = False
9696

9797
# The name of the Pygments (syntax highlighting) style to use.
98-
pygments_style = 'sphinx'
98+
pygments_style = "sphinx"
9999

100100
# A list of ignored prefixes for module index sorting.
101-
#modindex_common_prefix = []
101+
# modindex_common_prefix = []
102102

103103
# If true, keep warnings as "system message" paragraphs in the built documents.
104-
#keep_warnings = False
104+
# keep_warnings = False
105105

106106
# If true, `todo` and `todoList` produce output, else they produce nothing.
107107
todo_include_todos = False
@@ -111,158 +111,157 @@
111111

112112
# The theme to use for HTML and HTML Help pages. See the documentation for
113113
# a list of builtin themes.
114-
html_theme = 'sphinx_rtd_theme'
114+
html_theme = "sphinx_rtd_theme"
115115

116116
# Theme options are theme-specific and customize the look and feel of a theme
117117
# further. For a list of options available for each theme, see the
118118
# documentation.
119-
#html_theme_options = {}
119+
# html_theme_options = {}
120120

121121
# Add any paths that contain custom themes here, relative to this directory.
122-
#html_theme_path = []
122+
# html_theme_path = []
123123

124124
# The name for this set of Sphinx documents.
125125
# "<project> v<release> documentation" by default.
126-
#html_title = 'flask-casbin v0.1.0'
126+
# html_title = 'flask-casbin v0.1.0'
127127

128128
# A shorter title for the navigation bar. Default is the same as html_title.
129-
#html_short_title = None
129+
# html_short_title = None
130130

131131
# The name of an image file (relative to this directory) to place at the top
132132
# of the sidebar.
133-
#html_logo = None
133+
# html_logo = None
134134

135135
# The name of an image file (relative to this directory) to use as a favicon of
136136
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
137137
# pixels large.
138-
#html_favicon = None
138+
# html_favicon = None
139139

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

145145
# Add any extra paths that contain custom files (such as robots.txt or
146146
# .htaccess) here, relative to this directory. These files are copied
147147
# directly to the root of the documentation.
148-
#html_extra_path = []
148+
# html_extra_path = []
149149

150150
# If not None, a 'Last updated on:' timestamp is inserted at every page
151151
# bottom, using the given strftime format.
152152
# The empty string is equivalent to '%b %d, %Y'.
153-
#html_last_updated_fmt = None
153+
# html_last_updated_fmt = None
154154

155155
# If true, SmartyPants will be used to convert quotes and dashes to
156156
# typographically correct entities.
157-
#html_use_smartypants = True
157+
# html_use_smartypants = True
158158

159159
# Custom sidebar templates, maps document names to template names.
160-
#html_sidebars = {}
160+
# html_sidebars = {}
161161

162162
# Additional templates that should be rendered to pages, maps page names to
163163
# template names.
164-
#html_additional_pages = {}
164+
# html_additional_pages = {}
165165

166166
# If false, no module index is generated.
167-
#html_domain_indices = True
167+
# html_domain_indices = True
168168

169169
# If false, no index is generated.
170-
#html_use_index = True
170+
# html_use_index = True
171171

172172
# If true, the index is split into individual pages for each letter.
173-
#html_split_index = False
173+
# html_split_index = False
174174

175175
# If true, links to the reST sources are added to the pages.
176-
#html_show_sourcelink = True
176+
# html_show_sourcelink = True
177177

178178
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
179-
#html_show_sphinx = True
179+
# html_show_sphinx = True
180180

181181
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
182-
#html_show_copyright = True
182+
# html_show_copyright = True
183183

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

189189
# This is the file name suffix for HTML files (e.g. ".xhtml").
190-
#html_file_suffix = None
190+
# html_file_suffix = None
191191

192192
# Language to be used for generating the HTML full-text search index.
193193
# Sphinx supports the following languages:
194194
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'h', 'it', 'ja'
195195
# 'nl', 'no', 'pt', 'ro', 'r', 'sv', 'tr', 'zh'
196-
#html_search_language = 'en'
196+
# html_search_language = 'en'
197197

198198
# A dictionary with options for the search language support, empty by default.
199199
# 'ja' uses this config value.
200200
# 'zh' user can custom change `jieba` dictionary path.
201-
#html_search_options = {'type': 'default'}
201+
# html_search_options = {'type': 'default'}
202202

203203
# The name of a javascript file (relative to the configuration directory) that
204204
# implements a search results scorer. If empty, the default will be used.
205-
#html_search_scorer = 'scorer.js'
205+
# html_search_scorer = 'scorer.js'
206206

207207
# Output file base name for HTML help builder.
208-
htmlhelp_basename = 'flask-casbindoc'
208+
htmlhelp_basename = "flask-casbindoc"
209209

210210
# -- Options for LaTeX output ---------------------------------------------
211211

212212
latex_elements = {
213-
# The paper size ('letterpaper' or 'a4paper').
214-
#'papersize': 'letterpaper',
215-
216-
# The font size ('10pt', '11pt' or '12pt').
217-
#'pointsize': '10pt',
218-
219-
# Additional stuff for the LaTeX preamble.
220-
#'preamble': '',
221-
222-
# Latex figure (float) alignment
223-
#'figure_align': 'htbp',
213+
# The paper size ('letterpaper' or 'a4paper').
214+
#'papersize': 'letterpaper',
215+
# The font size ('10pt', '11pt' or '12pt').
216+
#'pointsize': '10pt',
217+
# Additional stuff for the LaTeX preamble.
218+
#'preamble': '',
219+
# Latex figure (float) alignment
220+
#'figure_align': 'htbp',
224221
}
225222

226223
# Grouping the document tree into LaTeX files. List of tuples
227224
# (source start file, target name, title,
228225
# author, documentclass [howto, manual, or own class]).
229226
latex_documents = [
230-
(master_doc, 'flask-casbin.tex', 'flask-casbin Documentation',
231-
'Jesse Cooper', 'manual'),
227+
(
228+
master_doc,
229+
"flask-casbin.tex",
230+
"flask-casbin Documentation",
231+
"Jesse Cooper",
232+
"manual",
233+
),
232234
]
233235

234236
# The name of an image file (relative to this directory) to place at the top of
235237
# the title page.
236-
#latex_logo = None
238+
# latex_logo = None
237239

238240
# For "manual" documents, if this is true, then toplevel headings are parts,
239241
# not chapters.
240-
#latex_use_parts = False
242+
# latex_use_parts = False
241243

242244
# If true, show page references after internal links.
243-
#latex_show_pagerefs = False
245+
# latex_show_pagerefs = False
244246

245247
# If true, show URL addresses after external links.
246-
#latex_show_urls = False
248+
# latex_show_urls = False
247249

248250
# Documents to append as an appendix to all manuals.
249-
#latex_appendices = []
251+
# latex_appendices = []
250252

251253
# If false, no module index is generated.
252-
#latex_domain_indices = True
254+
# latex_domain_indices = True
253255

254256

255257
# -- Options for manual page output ---------------------------------------
256258

257259
# One entry per manual page. List of tuples
258260
# (source start file, name, description, authors, manual section).
259-
man_pages = [
260-
(master_doc, 'flask-casbin', 'flask-casbin Documentation',
261-
[author], 1)
262-
]
261+
man_pages = [(master_doc, "flask-casbin", "flask-casbin Documentation", [author], 1)]
263262

264263
# If true, show URL addresses after external links.
265-
#man_show_urls = False
264+
# man_show_urls = False
266265

267266

268267
# -- Options for Texinfo output -------------------------------------------
@@ -271,19 +270,25 @@
271270
# (source start file, target name, title, author,
272271
# dir menu entry, description, category)
273272
texinfo_documents = [
274-
(master_doc, 'flask-casbin', 'flask-casbin Documentation',
275-
author, 'flask-casbin', 'One line description of project.',
276-
'Miscellaneous'),
273+
(
274+
master_doc,
275+
"flask-casbin",
276+
"flask-casbin Documentation",
277+
author,
278+
"flask-casbin",
279+
"One line description of project.",
280+
"Miscellaneous",
281+
),
277282
]
278283

279284
# Documents to append as an appendix to all manuals.
280-
#texinfo_appendices = []
285+
# texinfo_appendices = []
281286

282287
# If false, no module index is generated.
283-
#texinfo_domain_indices = True
288+
# texinfo_domain_indices = True
284289

285290
# How to display URL addresses: 'footnote', 'no', or 'inline'.
286-
#texinfo_show_urls = 'footnote'
291+
# texinfo_show_urls = 'footnote'
287292

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

0 commit comments

Comments
 (0)