mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add cache for mypy (#27745)
* Add cache for mypy * Update ruamel_yaml.py
This commit is contained in:
parent
a1b8f4d9c3
commit
8a0f26e155
@ -172,13 +172,14 @@ stages:
|
|||||||
vmImage: 'ubuntu-latest'
|
vmImage: 'ubuntu-latest'
|
||||||
container: $[ variables['PythonMain'] ]
|
container: $[ variables['PythonMain'] ]
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- template: templates/azp-step-cache.yaml@azure
|
||||||
python -m venv venv
|
parameters:
|
||||||
|
keyfile: 'requirements_test.txt | homeassistant/package_constraints.txt'
|
||||||
|
build: |
|
||||||
|
python -m venv venv
|
||||||
|
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
pip install -e .
|
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
||||||
pip install -r requirements_test.txt -c homeassistant/package_constraints.txt
|
|
||||||
displayName: 'Setup Env'
|
|
||||||
- script: |
|
- script: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
mypy homeassistant
|
mypy homeassistant
|
||||||
|
@ -90,7 +90,7 @@ def load_yaml(fname: str, round_trip: bool = False) -> JSON_TYPE:
|
|||||||
if round_trip:
|
if round_trip:
|
||||||
yaml = YAML(typ="rt")
|
yaml = YAML(typ="rt")
|
||||||
# type ignore: https://bitbucket.org/ruamel/yaml/pull-requests/42
|
# type ignore: https://bitbucket.org/ruamel/yaml/pull-requests/42
|
||||||
yaml.preserve_quotes = True # type: ignore
|
yaml.preserve_quotes = True
|
||||||
else:
|
else:
|
||||||
if ExtSafeConstructor.name is None:
|
if ExtSafeConstructor.name is None:
|
||||||
ExtSafeConstructor.name = fname
|
ExtSafeConstructor.name = fname
|
||||||
|
Loading…
x
Reference in New Issue
Block a user