From 8a0f26e15547652c1ae7ff4050684a18762d375f Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Wed, 16 Oct 2019 17:37:24 +0200 Subject: [PATCH] Add cache for mypy (#27745) * Add cache for mypy * Update ruamel_yaml.py --- azure-pipelines-ci.yml | 13 +++++++------ homeassistant/util/ruamel_yaml.py | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/azure-pipelines-ci.yml b/azure-pipelines-ci.yml index 5e42281bf7e..a566baf6561 100644 --- a/azure-pipelines-ci.yml +++ b/azure-pipelines-ci.yml @@ -172,13 +172,14 @@ stages: vmImage: 'ubuntu-latest' container: $[ variables['PythonMain'] ] steps: - - script: | - python -m venv venv + - template: templates/azp-step-cache.yaml@azure + parameters: + keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt' + build: | + python -m venv venv - . venv/bin/activate - pip install -e . - pip install -r requirements_test.txt -c homeassistant/package_constraints.txt - displayName: 'Setup Env' + . venv/bin/activate + pip install -r requirements_test.txt -c homeassistant/package_constraints.txt - script: | . venv/bin/activate mypy homeassistant diff --git a/homeassistant/util/ruamel_yaml.py b/homeassistant/util/ruamel_yaml.py index b7e8927888c..6793784abae 100644 --- a/homeassistant/util/ruamel_yaml.py +++ b/homeassistant/util/ruamel_yaml.py @@ -90,7 +90,7 @@ def load_yaml(fname: str, round_trip: bool = False) -> JSON_TYPE: if round_trip: yaml = YAML(typ="rt") # type ignore: https://bitbucket.org/ruamel/yaml/pull-requests/42 - yaml.preserve_quotes = True # type: ignore + yaml.preserve_quotes = True else: if ExtSafeConstructor.name is None: ExtSafeConstructor.name = fname