Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
e2b32af
fix DeprecationWarning emitted from _cli_main
bmos Mar 6, 2026
5b360f2
descriptive noqa comments
bmos Mar 6, 2026
300f783
sort functions and methods
bmos Mar 6, 2026
ab1cd16
consolidate HERE into get_test_data_path
bmos Mar 6, 2026
7eeec98
fix W504 line break after binary operator
bmos Mar 6, 2026
b68b829
sort imports
bmos Mar 6, 2026
7d5aa7f
remove invalid `# noqa` directives
bmos Mar 6, 2026
5b9a696
remove unused conf.py imports
bmos Mar 6, 2026
4f4b26e
Prefer `TypeError` exception for invalid type
bmos Mar 6, 2026
824ca73
use ast.literal_eval() instead of eval where possible
bmos Mar 6, 2026
e515f44
use secrets over random when possible
bmos Mar 6, 2026
ba72a95
when possible Do not catch blind exceptions
bmos Mar 6, 2026
f0dfebd
don't use boolean positional values in function calls
bmos Mar 6, 2026
952132c
don't use string literals in exceptions
bmos Mar 6, 2026
afa868a
remove unnecessary pragma: no cover
bmos Mar 6, 2026
a506cda
continuation line indentation and line length
bmos Mar 6, 2026
f11475e
don't implicitly concatenate string literals accross lines
bmos Mar 6, 2026
e8bd1bd
logger messages should use lazy concatenation
bmos Mar 6, 2026
3d8da63
remove unnecessary pass statement
bmos Mar 6, 2026
57bf41a
Remove unnecessary `elif` statements
bmos Mar 6, 2026
6e0271e
Remove unnecessary assignment
bmos Mar 6, 2026
3d9d8e2
Add explicit `return` statement
bmos Mar 6, 2026
10dd623
don't supply None as default to kwargs.get
bmos Mar 6, 2026
2278b32
Return condition directly as bool
bmos Mar 6, 2026
17c4ea1
Use `key in dict` instead of `key in dict.keys()`
bmos Mar 6, 2026
7ce54f1
Remove unnecessary `True if ... else False`
bmos Mar 6, 2026
0b61e8f
Don't extract value from dictionary without calling `.items()`
bmos Mar 6, 2026
6a0ed8c
Unused unpacked variables should assign to _
bmos Mar 6, 2026
59bbf20
Unused `noqa` directive
bmos Mar 6, 2026
fe880d5
Replace ternary `if` expression with `or` operator
bmos Mar 6, 2026
99ea248
resolve rst docstring issues
bmos Mar 6, 2026
ce08d2d
don't define all allowed characters in get_random_string
bmos Mar 7, 2026
cfabba4
Replace aliased errors with `OSError`
bmos Mar 7, 2026
bd6de01
Remove `object` inheritance
bmos Mar 7, 2026
fea4464
remove unnecessary coding: utf-8
bmos Mar 7, 2026
c0f278c
shorten long line
bmos Mar 7, 2026
088bbd2
remove extraneous parentheses
bmos Mar 7, 2026
f82315f
use dict comprehension instead of generator
bmos Mar 7, 2026
de5262f
move return statement from try to else
bmos Mar 7, 2026
489d833
Use format specifiers instead of percent format
bmos Mar 7, 2026
ab88e06
when checking for version, check for 3 before 2 as it's more common
bmos Mar 7, 2026
e4bf03c
expand caught errors for Could not read SSH configuration file
bmos Mar 7, 2026
4f74247
Resolve SyntaxWarning: 'return' in a 'finally' block
bmos Mar 7, 2026
2861098
reformat for 79 line length
bmos Mar 7, 2026
9b61117
expand caught errors
bmos Mar 7, 2026
411e97d
remove trailing comma from *kwargs
bmos Mar 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 75 additions & 71 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# sshtunnel documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 22 11:01:56 2016.
Expand All @@ -13,30 +12,30 @@
# All configuration values have a default; values that are commented out
# serve to show the default.

import sys
import os

import sshtunnel

# Patch to disable warning on non-local image
import sphinx.environment
from docutils.utils import get_source_line

import sshtunnel


def _warn_node(self, msg, node):
if not msg.startswith('nonlocal image URI found:'):
self._warnfunc(msg, '%s:%s' % get_source_line(node))
line, col = get_source_line(node)
self._warnfunc(msg, '{0}:{1}'.format(line, col))


sphinx.environment.BuildEnvironment.warn_node = _warn_node

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -56,7 +55,7 @@ def _warn_node(self, msg, node):
source_suffix = '.rst'

# The encoding of source files.
#source_encoding = 'utf-8-sig'
# source_encoding = 'utf-8-sig'

# The master toctree document.
master_doc = 'index'
Expand Down Expand Up @@ -84,37 +83,37 @@ def _warn_node(self, msg, node):

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

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']

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

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

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

# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# show_authors = False

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

# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# modindex_common_prefix = []

# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
Expand All @@ -129,151 +128,150 @@ def _warn_node(self, msg, node):
# 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
# documentation.
#html_theme_options = {}
# html_theme_options = {}

# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# html_theme_path = []

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

# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# html_short_title = None

# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# html_logo = None

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

# 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']

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

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

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# html_sidebars = {}

# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# html_additional_pages = {}

# If false, no module index is generated.
#html_domain_indices = True
# html_domain_indices = True

# If false, no index is generated.
#html_use_index = True
# html_use_index = True

# If true, the index is split into individual pages for each letter.
#html_split_index = False
# html_split_index = False

# If true, links to the reST sources are added to the pages.
html_show_sourcelink = False

# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# html_show_sphinx = True

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

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

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

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

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}
# html_search_options = {'type': 'default'}

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

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

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# 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',
# 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',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'sshtunnel.tex', 'sshtunnel Documentation',
'Pahaz Blinov', 'manual'),
(
master_doc,
'sshtunnel.tex',
'sshtunnel Documentation',
'Pahaz Blinov',
'manual',
),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# latex_use_parts = False

# If true, show page references after internal links.
#latex_show_pagerefs = False
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
#latex_show_urls = False
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
#latex_appendices = []
# latex_appendices = []

# If false, no module index is generated.
#latex_domain_indices = True
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'sshtunnel', 'sshtunnel Documentation',
[author], 1)
]
man_pages = [(master_doc, 'sshtunnel', 'sshtunnel Documentation', [author], 1)]

# If true, show URL addresses after external links.
#man_show_urls = False
# man_show_urls = False


# -- Options for Texinfo output -------------------------------------------
Expand All @@ -282,22 +280,28 @@ def _warn_node(self, msg, node):
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'sshtunnel', 'sshtunnel Documentation',
author, 'sshtunnel', 'One line description of project.',
'Miscellaneous'),
(
master_doc,
'sshtunnel',
'sshtunnel Documentation',
author,
'sshtunnel',
'One line description of project.',
'Miscellaneous',
),
]

# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# texinfo_appendices = []

# If false, no module index is generated.
#texinfo_domain_indices = True
# texinfo_domain_indices = True

# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# texinfo_show_urls = 'footnote'

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

intersphinx_mapping = {
'paramiko': ('http://docs.paramiko.org/en/latest', None),
Expand Down
Loading