mirror of
https://github.com/home-assistant/core.git
synced 2025-08-04 13:15:18 +02:00
Add pyupgrade (in pre-commit and CI) (#33688)
* Add pyupgrade (in pre-commit and CI) * Fix leftover results of pyupgrade * Ensure we run for Python 3.7 on pyupgrade
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Home-Assistant documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Aug 28 13:13:10 2016.
|
||||
@@ -26,7 +25,7 @@ from homeassistant.const import __short_version__, __version__
|
||||
PROJECT_NAME = 'Home Assistant'
|
||||
PROJECT_PACKAGE_NAME = 'homeassistant'
|
||||
PROJECT_AUTHOR = 'The Home Assistant Authors'
|
||||
PROJECT_COPYRIGHT = ' 2013-2020, {}'.format(PROJECT_AUTHOR)
|
||||
PROJECT_COPYRIGHT = f' 2013-2020, {PROJECT_AUTHOR}'
|
||||
PROJECT_LONG_DESCRIPTION = ('Home Assistant is an open-source '
|
||||
'home automation platform running on Python 3. '
|
||||
'Track and control all devices at home and '
|
||||
@@ -37,7 +36,7 @@ PROJECT_GITHUB_REPOSITORY = 'home-assistant'
|
||||
|
||||
GITHUB_PATH = '{}/{}'.format(
|
||||
PROJECT_GITHUB_USERNAME, PROJECT_GITHUB_REPOSITORY)
|
||||
GITHUB_URL = 'https://github.com/{}'.format(GITHUB_PATH)
|
||||
GITHUB_URL = f'https://github.com/{GITHUB_PATH}'
|
||||
|
||||
|
||||
sys.path.insert(0, os.path.abspath('_ext'))
|
||||
@@ -132,7 +131,7 @@ def linkcode_resolve(domain, info):
|
||||
|
||||
fn = fn[index:]
|
||||
|
||||
return '{}/blob/{}/{}{}'.format(GITHUB_URL, code_branch, fn, linespec)
|
||||
return f'{GITHUB_URL}/blob/{code_branch}/{fn}{linespec}'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
Reference in New Issue
Block a user