mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 14:27:07 +00:00
Flake8/pylint
This commit is contained in:
parent
a5faa851e8
commit
d903661577
@ -13,13 +13,11 @@ __licence__ = 'BSD (3 clause)'
|
|||||||
|
|
||||||
|
|
||||||
def get_github_url(app, view, path):
|
def get_github_url(app, view, path):
|
||||||
|
github_fmt = 'https://github.com/{}/{}/{}/{}{}'
|
||||||
return (
|
return (
|
||||||
'https://github.com/{project}/{view}/{branch}/{src_path}{path}'.format(
|
github_fmt.format(app.config.edit_on_github_project, view,
|
||||||
project=app.config.edit_on_github_project,
|
app.config.edit_on_github_branch,
|
||||||
view=view,
|
app.config.edit_on_github_src_path, path))
|
||||||
branch=app.config.edit_on_github_branch,
|
|
||||||
src_path=app.config.edit_on_github_src_path,
|
|
||||||
path=path))
|
|
||||||
|
|
||||||
|
|
||||||
def html_page_context(app, pagename, templatename, context, doctree):
|
def html_page_context(app, pagename, templatename, context, doctree):
|
||||||
|
@ -17,20 +17,21 @@
|
|||||||
# add these directories to sys.path here. If the directory is relative to the
|
# 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.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
#
|
#
|
||||||
import sys, os
|
import sys
|
||||||
from os.path import relpath, dirname
|
import os
|
||||||
|
from os.path import relpath
|
||||||
import inspect
|
import inspect
|
||||||
|
from homeassistant.const import (__version__, __short_version__, PROJECT_NAME,
|
||||||
|
PROJECT_LONG_DESCRIPTION,
|
||||||
|
PROJECT_COPYRIGHT, PROJECT_AUTHOR,
|
||||||
|
PROJECT_GITHUB_USERNAME,
|
||||||
|
PROJECT_GITHUB_REPOSITORY,
|
||||||
|
GITHUB_PATH, GITHUB_URL)
|
||||||
|
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('_ext'))
|
sys.path.insert(0, os.path.abspath('_ext'))
|
||||||
sys.path.insert(0, os.path.abspath('../homeassistant'))
|
sys.path.insert(0, os.path.abspath('../homeassistant'))
|
||||||
|
|
||||||
from homeassistant.const import (__version__, __short_version__, PROJECT_NAME,
|
|
||||||
PROJECT_LONG_DESCRIPTION, PROJECT_URL,
|
|
||||||
PROJECT_COPYRIGHT, PROJECT_AUTHOR,
|
|
||||||
PROJECT_GITHUB_USERNAME,
|
|
||||||
PROJECT_GITHUB_REPOSITORY, PYPI_URL,
|
|
||||||
GITHUB_PATH, GITHUB_URL)
|
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
@ -84,6 +85,7 @@ edit_on_github_project = GITHUB_PATH
|
|||||||
edit_on_github_branch = code_branch
|
edit_on_github_branch = code_branch
|
||||||
edit_on_github_src_path = 'docs/source/'
|
edit_on_github_src_path = 'docs/source/'
|
||||||
|
|
||||||
|
|
||||||
def linkcode_resolve(domain, info):
|
def linkcode_resolve(domain, info):
|
||||||
"""
|
"""
|
||||||
Determine the URL corresponding to Python object
|
Determine the URL corresponding to Python object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user