Skip to content

Black: Format w/ string normalization #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 73 additions & 73 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,108 +22,108 @@


extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx',
'sphinx_autodoc_typehints',
'sphinx.ext.todo',
'sphinx.ext.linkcode',
'sphinx.ext.napoleon',
'alagitpull',
'sphinx_issues',
'myst_parser',
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx_autodoc_typehints",
"sphinx.ext.todo",
"sphinx.ext.linkcode",
"sphinx.ext.napoleon",
"alagitpull",
"sphinx_issues",
"myst_parser",
]

myst_enable_extensions = ["colon_fence"]

issues_github_path = about['__github__'].replace('https://github.com/', '')
issues_github_path = about["__github__"].replace("https://github.com/", "")

templates_path = ['_templates']
templates_path = ["_templates"]

source_suffix = {'.rst': 'restructuredtext', '.md': 'markdown'}
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}

master_doc = 'index'
master_doc = "index"

project = about['__title__']
copyright = about['__copyright__']
project = about["__title__"]
copyright = about["__copyright__"]

version = '%s' % ('.'.join(about['__version__'].split('.'))[:2])
release = '%s' % (about['__version__'])
version = "%s" % (".".join(about["__version__"].split("."))[:2])
release = "%s" % (about["__version__"])

exclude_patterns = ['_build']
exclude_patterns = ["_build"]

pygments_style = 'sphinx'
pygments_style = "sphinx"

html_theme_path = [alagitpull.get_path()]
html_favicon = '_static/favicon.ico'
html_theme = 'alagitpull'
html_favicon = "_static/favicon.ico"
html_theme = "alagitpull"
html_theme_options = {
'logo': 'img/libtmux.svg',
'github_user': 'tmux-python',
'github_repo': 'libtmux',
'github_type': 'star',
'github_banner': True,
'projects': alagitpull.projects,
'project_name': about['__title__'],
'project_title': about['__title__'],
'project_description': about['__description__'],
'project_url': about['__docs__'],
'show_meta_manifest_tag': True,
'show_meta_og_tags': True,
'show_meta_app_icon_tags': True,
"logo": "img/libtmux.svg",
"github_user": "tmux-python",
"github_repo": "libtmux",
"github_type": "star",
"github_banner": True,
"projects": alagitpull.projects,
"project_name": about["__title__"],
"project_title": about["__title__"],
"project_description": about["__description__"],
"project_url": about["__docs__"],
"show_meta_manifest_tag": True,
"show_meta_og_tags": True,
"show_meta_app_icon_tags": True,
}
alagitpull_internal_hosts = ['libtmux.git-pull.com', '0.0.0.0']
alagitpull_internal_hosts = ["libtmux.git-pull.com", "0.0.0.0"]
alagitpull_external_hosts_new_window = True

html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'more.html',
'book.html',
'searchbox.html',
"**": [
"about.html",
"navigation.html",
"relations.html",
"more.html",
"book.html",
"searchbox.html",
]
}

html_theme_path = ['_themes']
html_static_path = ['_static']
html_extra_path = ['manifest.json']
html_theme_path = ["_themes"]
html_static_path = ["_static"]
html_extra_path = ["manifest.json"]

htmlhelp_basename = '%sdoc' % about['__title__']
htmlhelp_basename = "%sdoc" % about["__title__"]

latex_documents = [
(
'index',
'{}.tex'.format(about['__package_name__']),
'{} Documentation'.format(about['__title__']),
about['__author__'],
'manual',
"index",
"{}.tex".format(about["__package_name__"]),
"{} Documentation".format(about["__title__"]),
about["__author__"],
"manual",
)
]

man_pages = [
(
'index',
about['__package_name__'],
'{} Documentation'.format(about['__title__']),
about['__author__'],
"index",
about["__package_name__"],
"{} Documentation".format(about["__title__"]),
about["__author__"],
1,
)
]

texinfo_documents = [
(
'index',
'{}'.format(about['__package_name__']),
'{} Documentation'.format(about['__title__']),
about['__author__'],
about['__package_name__'],
about['__description__'],
'Miscellaneous',
"index",
"{}".format(about["__package_name__"]),
"{} Documentation".format(about["__title__"]),
about["__author__"],
about["__package_name__"],
about["__description__"],
"Miscellaneous",
)
]

intersphinx_mapping = {'http://docs.python.org/': None}
intersphinx_mapping = {"http://docs.python.org/": None}


def linkcode_resolve(domain, info): # NOQA: C901
Expand All @@ -135,18 +135,18 @@ def linkcode_resolve(domain, info): # NOQA: C901
From https://github.com/numpy/numpy/blob/v1.15.1/doc/source/conf.py, 7c49cfa
on Jul 31. License BSD-3. https://github.com/numpy/numpy/blob/v1.15.1/LICENSE.txt
"""
if domain != 'py':
if domain != "py":
return None

modname = info['module']
fullname = info['fullname']
modname = info["module"]
fullname = info["fullname"]

submod = sys.modules.get(modname)
if submod is None:
return None

obj = submod
for part in fullname.split('.'):
for part in fullname.split("."):
try:
obj = getattr(obj, part)
except Exception:
Expand Down Expand Up @@ -180,18 +180,18 @@ def linkcode_resolve(domain, info): # NOQA: C901

fn = relpath(fn, start=dirname(libtmux.__file__))

if 'dev' in about['__version__']:
if "dev" in about["__version__"]:
return "%s/blob/master/%s/%s%s" % (
about['__github__'],
about['__package_name__'],
about["__github__"],
about["__package_name__"],
fn,
linespec,
)
else:
return "%s/blob/v%s/%s/%s%s" % (
about['__github__'],
about['__version__'],
about['__package_name__'],
about["__github__"],
about["__version__"],
about["__package_name__"],
fn,
linespec,
)
24 changes: 12 additions & 12 deletions libtmux/__about__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
__title__ = 'libtmux'
__package_name__ = 'libtmux'
__version__ = '0.11.0b0'
__description__ = 'scripting library / orm for tmux'
__email__ = '[email protected]'
__author__ = 'Tony Narlock'
__github__ = 'https://github.com/tmux-python/libtmux'
__docs__ = 'https://libtmux.git-pull.com'
__tracker__ = 'https://github.com/tmux-python/libtmux/issues'
__pypi__ = 'https://pypi.org/project/libtmux/'
__license__ = 'MIT'
__copyright__ = 'Copyright 2016- Tony Narlock'
__title__ = "libtmux"
__package_name__ = "libtmux"
__version__ = "0.11.0b0"
__description__ = "scripting library / orm for tmux"
__email__ = "[email protected]"
__author__ = "Tony Narlock"
__github__ = "https://github.com/tmux-python/libtmux"
__docs__ = "https://libtmux.git-pull.com"
__tracker__ = "https://github.com/tmux-python/libtmux/issues"
__pypi__ = "https://pypi.org/project/libtmux/"
__license__ = "MIT"
__copyright__ = "Copyright 2016- Tony Narlock"
6 changes: 3 additions & 3 deletions libtmux/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
def console_to_str(s):
"""From pypa/pip project, pip.backwardwardcompat. License MIT."""
try:
return s.decode(console_encoding, 'ignore')
return s.decode(console_encoding, "ignore")
except UnicodeDecodeError:
return s.decode('utf_8', 'ignore')
return s.decode("utf_8", "ignore")


def reraise(tp, value, tb=None):
Expand All @@ -24,4 +24,4 @@ def str_from_console(s):
try:
return str(s)
except UnicodeDecodeError:
return str(s, encoding='utf_8')
return str(s, encoding="utf_8")
Loading