Skip to content

Commit 20ae15b

Browse files
committed
style update: double-quoted strings
1 parent 66c298c commit 20ae15b

File tree

9 files changed

+346
-346
lines changed

9 files changed

+346
-346
lines changed

docs/_themes/flask_theme_support.py

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -10,77 +10,77 @@ class FlaskyStyle(Style):
1010

1111
styles = {
1212
# No corresponding class for the following:
13-
#Text: "", # class: ''
14-
Whitespace: "underline #f8f8f8", # class: 'w'
15-
Error: "#a40000 border:#ef2929", # class: 'err'
16-
Other: "#000000", # class 'x'
13+
#Text: "", # class: ""
14+
Whitespace: "underline #f8f8f8", # class: "w"
15+
Error: "#a40000 border:#ef2929", # class: "err"
16+
Other: "#000000", # class "x"
1717

18-
Comment: "italic #8f5902", # class: 'c'
19-
Comment.Preproc: "noitalic", # class: 'cp'
18+
Comment: "italic #8f5902", # class: "c"
19+
Comment.Preproc: "noitalic", # class: "cp"
2020

21-
Keyword: "bold #004461", # class: 'k'
22-
Keyword.Constant: "bold #004461", # class: 'kc'
23-
Keyword.Declaration: "bold #004461", # class: 'kd'
24-
Keyword.Namespace: "bold #004461", # class: 'kn'
25-
Keyword.Pseudo: "bold #004461", # class: 'kp'
26-
Keyword.Reserved: "bold #004461", # class: 'kr'
27-
Keyword.Type: "bold #004461", # class: 'kt'
21+
Keyword: "bold #004461", # class: "k"
22+
Keyword.Constant: "bold #004461", # class: "kc"
23+
Keyword.Declaration: "bold #004461", # class: "kd"
24+
Keyword.Namespace: "bold #004461", # class: "kn"
25+
Keyword.Pseudo: "bold #004461", # class: "kp"
26+
Keyword.Reserved: "bold #004461", # class: "kr"
27+
Keyword.Type: "bold #004461", # class: "kt"
2828

29-
Operator: "#582800", # class: 'o'
30-
Operator.Word: "bold #004461", # class: 'ow' - like keywords
29+
Operator: "#582800", # class: "o"
30+
Operator.Word: "bold #004461", # class: "ow" - like keywords
3131

32-
Punctuation: "bold #000000", # class: 'p'
32+
Punctuation: "bold #000000", # class: "p"
3333

3434
# because special names such as Name.Class, Name.Function, etc.
3535
# are not recognized as such later in the parsing, we choose them
3636
# to look the same as ordinary variables.
37-
Name: "#000000", # class: 'n'
38-
Name.Attribute: "#c4a000", # class: 'na' - to be revised
39-
Name.Builtin: "#004461", # class: 'nb'
40-
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
41-
Name.Class: "#000000", # class: 'nc' - to be revised
42-
Name.Constant: "#000000", # class: 'no' - to be revised
43-
Name.Decorator: "#888", # class: 'nd' - to be revised
44-
Name.Entity: "#ce5c00", # class: 'ni'
45-
Name.Exception: "bold #cc0000", # class: 'ne'
46-
Name.Function: "#000000", # class: 'nf'
47-
Name.Property: "#000000", # class: 'py'
48-
Name.Label: "#f57900", # class: 'nl'
49-
Name.Namespace: "#000000", # class: 'nn' - to be revised
50-
Name.Other: "#000000", # class: 'nx'
51-
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
52-
Name.Variable: "#000000", # class: 'nv' - to be revised
53-
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
54-
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
55-
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
37+
Name: "#000000", # class: "n"
38+
Name.Attribute: "#c4a000", # class: "na" - to be revised
39+
Name.Builtin: "#004461", # class: "nb"
40+
Name.Builtin.Pseudo: "#3465a4", # class: "bp"
41+
Name.Class: "#000000", # class: "nc" - to be revised
42+
Name.Constant: "#000000", # class: "no" - to be revised
43+
Name.Decorator: "#888", # class: "nd" - to be revised
44+
Name.Entity: "#ce5c00", # class: "ni"
45+
Name.Exception: "bold #cc0000", # class: "ne"
46+
Name.Function: "#000000", # class: "nf"
47+
Name.Property: "#000000", # class: "py"
48+
Name.Label: "#f57900", # class: "nl"
49+
Name.Namespace: "#000000", # class: "nn" - to be revised
50+
Name.Other: "#000000", # class: "nx"
51+
Name.Tag: "bold #004461", # class: "nt" - like a keyword
52+
Name.Variable: "#000000", # class: "nv" - to be revised
53+
Name.Variable.Class: "#000000", # class: "vc" - to be revised
54+
Name.Variable.Global: "#000000", # class: "vg" - to be revised
55+
Name.Variable.Instance: "#000000", # class: "vi" - to be revised
5656

57-
Number: "#990000", # class: 'm'
57+
Number: "#990000", # class: "m"
5858

59-
Literal: "#000000", # class: 'l'
60-
Literal.Date: "#000000", # class: 'ld'
59+
Literal: "#000000", # class: "l"
60+
Literal.Date: "#000000", # class: "ld"
6161

62-
String: "#4e9a06", # class: 's'
63-
String.Backtick: "#4e9a06", # class: 'sb'
64-
String.Char: "#4e9a06", # class: 'sc'
65-
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
66-
String.Double: "#4e9a06", # class: 's2'
67-
String.Escape: "#4e9a06", # class: 'se'
68-
String.Heredoc: "#4e9a06", # class: 'sh'
69-
String.Interpol: "#4e9a06", # class: 'si'
70-
String.Other: "#4e9a06", # class: 'sx'
71-
String.Regex: "#4e9a06", # class: 'sr'
72-
String.Single: "#4e9a06", # class: 's1'
73-
String.Symbol: "#4e9a06", # class: 'ss'
62+
String: "#4e9a06", # class: "s"
63+
String.Backtick: "#4e9a06", # class: "sb"
64+
String.Char: "#4e9a06", # class: "sc"
65+
String.Doc: "italic #8f5902", # class: "sd" - like a comment
66+
String.Double: "#4e9a06", # class: "s2"
67+
String.Escape: "#4e9a06", # class: "se"
68+
String.Heredoc: "#4e9a06", # class: "sh"
69+
String.Interpol: "#4e9a06", # class: "si"
70+
String.Other: "#4e9a06", # class: "sx"
71+
String.Regex: "#4e9a06", # class: "sr"
72+
String.Single: "#4e9a06", # class: "s1"
73+
String.Symbol: "#4e9a06", # class: "ss"
7474

75-
Generic: "#000000", # class: 'g'
76-
Generic.Deleted: "#a40000", # class: 'gd'
77-
Generic.Emph: "italic #000000", # class: 'ge'
78-
Generic.Error: "#ef2929", # class: 'gr'
79-
Generic.Heading: "bold #000080", # class: 'gh'
80-
Generic.Inserted: "#00A000", # class: 'gi'
81-
Generic.Output: "#888", # class: 'go'
82-
Generic.Prompt: "#745334", # class: 'gp'
83-
Generic.Strong: "bold #000000", # class: 'gs'
84-
Generic.Subheading: "bold #800080", # class: 'gu'
85-
Generic.Traceback: "bold #a40000", # class: 'gt'
75+
Generic: "#000000", # class: "g"
76+
Generic.Deleted: "#a40000", # class: "gd"
77+
Generic.Emph: "italic #000000", # class: "ge"
78+
Generic.Error: "#ef2929", # class: "gr"
79+
Generic.Heading: "bold #000080", # class: "gh"
80+
Generic.Inserted: "#00A000", # class: "gi"
81+
Generic.Output: "#888", # class: "go"
82+
Generic.Prompt: "#745334", # class: "gp"
83+
Generic.Strong: "bold #000000", # class: "gs"
84+
Generic.Subheading: "bold #800080", # class: "gu"
85+
Generic.Traceback: "bold #a40000", # class: "gt"
8686
}

docs/conf.py

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -12,64 +12,64 @@
1212
# serve to show the default.
1313

1414
import sys, os
15-
sys.path.insert(0, os.path.abspath('..'))
15+
sys.path.insert(0, os.path.abspath(".."))
1616

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
28-
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
29-
extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.autodoc']
28+
# coming with Sphinx (named "sphinx.ext.*") or your custom ones.
29+
extensions = ["sphinx.ext.intersphinx", "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 = u'Flask-PyMongo'
45-
copyright = u'2011 - 2017, Dan Crosta'
44+
project = u"Flask-PyMongo"
45+
copyright = u"2011 - 2017, Dan Crosta"
4646

47-
# The version info for the project you're documenting, acts as replacement for
47+
# 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
#
51-
version = '0.5.2'
51+
version = "0.5.2"
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.5.2'
53+
release = "0.5.2"
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
5757
#language = None
5858

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

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

6969
# The reST default role (used for this markup: `text`) to use for all documents.
7070
#default_role = None
7171

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

7575
# If true, the current module name will be prepended to all description
@@ -81,7 +81,7 @@
8181
#show_authors = False
8282

8383
# The name of the Pygments (syntax highlighting) style to use.
84-
pygments_style = 'sphinx'
84+
pygments_style = "sphinx"
8585

8686
# A list of ignored prefixes for module index sorting.
8787
#modindex_common_prefix = []
@@ -91,21 +91,21 @@
9191

9292
# The theme to use for HTML and HTML Help pages. See the documentation for
9393
# a list of builtin themes.
94-
html_theme = 'flask_small'
94+
html_theme = "flask_small"
9595

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

101101
# Add any paths that contain custom themes here, relative to this directory.
102-
sys.path.append(os.path.abspath('_themes'))
103-
html_theme_path = ['_themes']
102+
sys.path.append(os.path.abspath("_themes"))
103+
html_theme_path = ["_themes"]
104104

105105
# custom settings for flask theme
106106
html_theme_options = {
107-
'index_logo': '', #TODO
108-
'github_fork': 'dcrosta/flask-pymongo',
107+
"index_logo": "", #TODO
108+
"github_fork": "dcrosta/flask-pymongo",
109109
}
110110

111111
# The name for this set of Sphinx documents. If None, it defaults to
@@ -127,11 +127,11 @@
127127
# Add any paths that contain custom static files (such as style sheets) here,
128128
# relative to this directory. They are copied after the builtin static files,
129129
# so a file named "default.css" will overwrite the builtin "default.css".
130-
html_static_path = ['_static']
130+
html_static_path = ["_static"]
131131

132-
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
132+
# If not "", a "Last updated on:" timestamp is inserted at every page bottom,
133133
# using the given strftime format.
134-
#html_last_updated_fmt = '%b %d, %Y'
134+
#html_last_updated_fmt = "%b %d, %Y"
135135

136136
# If true, SmartyPants will be used to convert quotes and dashes to
137137
# typographically correct entities.
@@ -165,33 +165,33 @@
165165
# If true, an OpenSearch description file will be output, and all pages will
166166
# contain a <link> tag referring to it. The value of this option must be the
167167
# base URL from which the finished HTML is served.
168-
#html_use_opensearch = ''
168+
#html_use_opensearch = ""
169169

170170
# This is the file name suffix for HTML files (e.g. ".xhtml").
171171
#html_file_suffix = None
172172

173173
# Output file base name for HTML help builder.
174-
htmlhelp_basename = 'Flask-PyMongodoc'
174+
htmlhelp_basename = "Flask-PyMongodoc"
175175

176176

177177
# -- Options for LaTeX output --------------------------------------------------
178178

179179
latex_elements = {
180-
# The paper size ('letterpaper' or 'a4paper').
181-
#'papersize': 'letterpaper',
180+
# The paper size ("letterpaper" or "a4paper").
181+
#"papersize": "letterpaper",
182182

183-
# The font size ('10pt', '11pt' or '12pt').
184-
#'pointsize': '10pt',
183+
# The font size ("10pt", "11pt" or "12pt").
184+
#"pointsize": "10pt",
185185

186186
# Additional stuff for the LaTeX preamble.
187-
#'preamble': '',
187+
#"preamble": "",
188188
}
189189

190190
# Grouping the document tree into LaTeX files. List of tuples
191191
# (source start file, target name, title, author, documentclass [howto/manual]).
192192
latex_documents = [
193-
('index', 'Flask-PyMongo.tex', u'Flask-PyMongo Documentation',
194-
u'Dan Crosta', 'manual'),
193+
("index", "Flask-PyMongo.tex", u"Flask-PyMongo Documentation",
194+
u"Dan Crosta", "manual"),
195195
]
196196

197197
# The name of an image file (relative to this directory) to place at the top of
@@ -220,8 +220,8 @@
220220
# One entry per manual page. List of tuples
221221
# (source start file, name, description, authors, manual section).
222222
man_pages = [
223-
('index', 'flask-pymongo', u'Flask-PyMongo Documentation',
224-
[u'Dan Crosta'], 1)
223+
("index", "flask-pymongo", u"Flask-PyMongo Documentation",
224+
[u"Dan Crosta"], 1)
225225
]
226226

227227
# If true, show URL addresses after external links.
@@ -234,9 +234,9 @@
234234
# (source start file, target name, title, author,
235235
# dir menu entry, description, category)
236236
texinfo_documents = [
237-
('index', 'Flask-PyMongo', u'Flask-PyMongo Documentation',
238-
u'Dan Crosta', 'Flask-PyMongo', 'One line description of project.',
239-
'Miscellaneous'),
237+
("index", "Flask-PyMongo", u"Flask-PyMongo Documentation",
238+
u"Dan Crosta", "Flask-PyMongo", "One line description of project.",
239+
"Miscellaneous"),
240240
]
241241

242242
# Documents to append as an appendix to all manuals.
@@ -245,13 +245,13 @@
245245
# If false, no module index is generated.
246246
#texinfo_domain_indices = True
247247

248-
# How to display URL addresses: 'footnote', 'no', or 'inline'.
249-
#texinfo_show_urls = 'footnote'
248+
# How to display URL addresses: "footnote", "no", or "inline".
249+
#texinfo_show_urls = "footnote"
250250

251251

252252
# Example configuration for intersphinx: refer to the Python standard library.
253253
intersphinx_mapping = {
254-
'python': ('http://docs.python.org/', None),
255-
'flask': ('http://flask.pocoo.org/docs/', None),
256-
'pymongo': ('http://api.mongodb.org/python/current/', None),
254+
"python": ("http://docs.python.org/", None),
255+
"flask": ("http://flask.pocoo.org/docs/", None),
256+
"pymongo": ("http://api.mongodb.org/python/current/", None),
257257
}

docs/index.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ You can use :attr:`~flask_pymongo.PyMongo.db` directly in views:
4040

4141
.. code-block:: python
4242
43-
@app.route('/')
43+
@app.route("/")
4444
def home_page():
45-
online_users = mongo.db.users.find({'online': True})
46-
return render_template('index.html',
45+
online_users = mongo.db.users.find({"online": True})
46+
return render_template("index.html",
4747
online_users=online_users)
4848
4949
@@ -167,14 +167,14 @@ servers:
167167
mongo1 = PyMongo(app)
168168
169169
# connect to another MongoDB database on the same host
170-
app.config['MONGO2_DBNAME'] = 'dbname_two'
171-
mongo2 = PyMongo(app, config_prefix='MONGO2')
170+
app.config["MONGO2_DBNAME"] = "dbname_two"
171+
mongo2 = PyMongo(app, config_prefix="MONGO2")
172172
173173
# connect to another MongoDB server altogether
174-
app.config['MONGO3_HOST'] = 'another.host.example.com'
175-
app.config['MONGO3_PORT'] = 27017
176-
app.config['MONGO3_DBNAME'] = 'dbname_three'
177-
mongo3 = PyMongo(app, config_prefix='MONGO3')
174+
app.config["MONGO3_HOST"] = "another.host.example.com"
175+
app.config["MONGO3_PORT"] = 27017
176+
app.config["MONGO3_DBNAME"] = "dbname_three"
177+
mongo3 = PyMongo(app, config_prefix="MONGO3")
178178
179179
Some auto-configured settings that you should be aware of are:
180180

0 commit comments

Comments
 (0)