Skip to content

Commit

Permalink
Merge pull request #162 from certbot/pre-commit-all
Browse files Browse the repository at this point in the history
Run pre-commit checks on everything
  • Loading branch information
alexzorin committed Apr 12, 2023
2 parents f371764 + ea347bb commit b30c525
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 56 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
# Introduced the black code formatter
48729269a5a790473cb760c03577faa1b2c3245b
# Ran black on docs directory
243097d2f6050f1232f90934326fce76443b84cf
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
files: |
(?x)^(
src|
tests
)/
repos:
- repo: https://github.com/psf/black
rev: 23.1.0
Expand Down
83 changes: 41 additions & 42 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,41 +31,41 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.viewcode',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
]

autodoc_member_order = 'bysource'
autodoc_default_flags = ['show-inheritance', 'private-members']
autodoc_member_order = "bysource"
autodoc_default_flags = ["show-inheritance", "private-members"]

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

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

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# General information about the project.
project = u'josepy'
copyright = u"2015-2017, Let's Encrypt Project"
author = u"Let's Encrypt Project"
project = "josepy"
copyright = "2015-2017, Let's Encrypt Project"
author = "Let's Encrypt Project"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'1.14'
version = "1.14"
# The full version, including alpha/beta/rc tags.
release = u'1.14.0.dev0'
release = "1.14.0.dev0"

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -77,25 +77,25 @@
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True

# The reST default role (used for this markup: `text`) to use for all
# documents.
default_role = 'py:obj'
default_role = "py:obj"


# -- Options for HTML output ----------------------------------------------

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

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand All @@ -106,28 +106,28 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html', # needs 'show_related': True theme option to display
'searchbox.html',
'donate.html',
"**": [
"about.html",
"navigation.html",
"relations.html", # needs 'show_related': True theme option to display
"searchbox.html",
"donate.html",
]
}


# -- Options for HTMLHelp output ------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'josepydoc'
htmlhelp_basename = "josepydoc"


# -- Options for LaTeX output ---------------------------------------------
Expand All @@ -136,15 +136,12 @@
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
Expand All @@ -154,8 +151,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'josepy.tex', u'josepy Documentation',
u"Let's Encrypt Project", 'manual'),
(master_doc, "josepy.tex", "josepy Documentation", "Let's Encrypt Project", "manual"),
]


Expand All @@ -164,9 +160,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'josepy', u'josepy Documentation',
[author], 1),
('man/jws', 'jws', u'jws script documentation', [project], 1),
(master_doc, "josepy", "josepy Documentation", [author], 1),
("man/jws", "jws", "jws script documentation", [project], 1),
]


Expand All @@ -176,16 +171,20 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'josepy', u'josepy Documentation',
author, 'josepy', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
"josepy",
"josepy Documentation",
author,
"josepy",
"One line description of project.",
"Miscellaneous",
),
]




# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'https://docs.python.org/': None,
'https://cryptography.io/en/latest/': None,
"https://docs.python.org/": None,
"https://cryptography.io/en/latest/": None,
}
18 changes: 9 additions & 9 deletions examples/pem_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ def pem_to_jwk(pkey_pem, format="string"):
print("> roundtrip >")
print(as_jwk)
else:
indented_cmd = (
" python pem_conversion.py "
"/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/"
"directory/##ACCOUNT##/private_key.json"
)
print("Error.")
print("Invoke this script with a single argument: the path to a certbot key.")
print(
" python pem_conversion.py /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/##ACCOUNT##/private_key.json"
)
print(
"Optional: add the string 'roundtrip' after the key to perform a roundtrip"
)
print(
" python pem_conversion.py /etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/##ACCOUNT##/private_key.json roundtrip"
)
print(indented_cmd)
print("Optional: add the string 'roundtrip' after the key to perform a roundtrip")
# arguments to print are printed with a space between them by default
print(indented_cmd, "roundtrip")

0 comments on commit b30c525

Please sign in to comment.