Skip to content

Commit

Permalink
Flake8/pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Sep 6, 2016
1 parent a5faa85 commit d903661
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 4 additions & 6 deletions docs/source/_ext/edit_on_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,11 @@


def get_github_url(app, view, path):
github_fmt = 'https://github.com/{}/{}/{}/{}{}'
return (
'https://github.com/{project}/{view}/{branch}/{src_path}{path}'.format(
project=app.config.edit_on_github_project,
view=view,
branch=app.config.edit_on_github_branch,
src_path=app.config.edit_on_github_src_path,
path=path))
github_fmt.format(app.config.edit_on_github_project, view,
app.config.edit_on_github_branch,
app.config.edit_on_github_src_path, path))


def html_page_context(app, pagename, templatename, context, doctree):
Expand Down
18 changes: 10 additions & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,21 @@
# 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.
#
import sys, os
from os.path import relpath, dirname
import sys
import os
from os.path import relpath
import inspect

sys.path.insert(0, os.path.abspath('_ext'))
sys.path.insert(0, os.path.abspath('../homeassistant'))

from homeassistant.const import (__version__, __short_version__, PROJECT_NAME,
PROJECT_LONG_DESCRIPTION, PROJECT_URL,
PROJECT_LONG_DESCRIPTION,
PROJECT_COPYRIGHT, PROJECT_AUTHOR,
PROJECT_GITHUB_USERNAME,
PROJECT_GITHUB_REPOSITORY, PYPI_URL,
PROJECT_GITHUB_REPOSITORY,
GITHUB_PATH, GITHUB_URL)


sys.path.insert(0, os.path.abspath('_ext'))
sys.path.insert(0, os.path.abspath('../homeassistant'))

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

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -84,6 +85,7 @@
edit_on_github_branch = code_branch
edit_on_github_src_path = 'docs/source/'


def linkcode_resolve(domain, info):
"""
Determine the URL corresponding to Python object
Expand Down

0 comments on commit d903661

Please sign in to comment.