Merge branch 'pyup-scheduled-update-2019-03-18'

This commit is contained in:
Florian Bruhin 2019-03-19 07:42:37 +01:00
commit 71faa42c5f
7 changed files with 11 additions and 11 deletions

View File

@ -309,7 +309,7 @@ You can use:
import yaml
with (config.configdir / 'config.yml').open() as f:
yaml_data = yaml.load(f)
yaml_data = yaml.safe_load(f)
for k, v in yaml_data.items():
config.set(k, v)
@ -339,7 +339,7 @@ You can use:
import yaml
with (config.configdir / 'colors.yml').open() as f:
yaml_data = yaml.load(f)
yaml_data = yaml.safe_load(f)
def dict_attrs(obj, path=''):
if isinstance(obj, dict):

View File

@ -15,7 +15,7 @@ flake8-mock==0.3
flake8-polyfill==1.0.2
flake8-string-format==0.2.3
flake8-tidy-imports==2.0.0
flake8-tuple==0.2.13
flake8-tuple==0.2.14
mccabe==0.6.1
pep8-naming==0.8.2
pycodestyle==2.5.0

View File

@ -12,7 +12,7 @@ EasyProcess==0.2.5
Flask==1.0.2
glob2==0.6
hunter==2.2.1
hypothesis==4.10.0
hypothesis==4.12.0
itsdangerous==1.1.0
# Jinja2==2.10
Mako==1.0.7
@ -23,7 +23,7 @@ parse-type==0.4.2
pluggy==0.9.0
py==1.8.0
py-cpuinfo==4.0.0
pytest==4.3.0
pytest==4.3.1
pytest-bdd==3.1.0
pytest-benchmark==3.2.2
pytest-cov==2.6.1

View File

@ -7,4 +7,4 @@ Jinja2==2.10
MarkupSafe==1.1.1
Pygments==2.3.1
pyPEG2==2.15.2
PyYAML==3.13
PyYAML==5.1

View File

@ -81,4 +81,4 @@ def register(linter):
FAILED_LOAD = True
return
with yaml_file.open(mode='r', encoding='utf-8') as f:
OPTIONS = list(yaml.load(f))
OPTIONS = list(yaml.safe_load(f))

View File

@ -167,7 +167,7 @@ class TestParseYamlType:
def _yaml(self, s):
"""Get the type from parsed YAML data."""
return yaml.load(textwrap.dedent(s))['type']
return yaml.safe_load(textwrap.dedent(s))['type']
def test_simple(self):
"""Test type which is only a name."""
@ -254,7 +254,7 @@ class TestParseYamlBackend:
def _yaml(self, s):
"""Get the type from parsed YAML data."""
return yaml.load(textwrap.dedent(s))['backend']
return yaml.safe_load(textwrap.dedent(s))['backend']
@pytest.mark.parametrize('backend, expected', [
('QtWebKit', [usertypes.Backend.QtWebKit]),

View File

@ -1441,8 +1441,8 @@ class TestFont:
expected = '10pt Terminus'
elif klass is configtypes.QtFont:
desc = FontDesc(QFont.StyleNormal, QFont.Normal, 10, None,
'Terminus'),
expected = Font.fromdesc(*desc)
'Terminus')
expected = Font.fromdesc(desc)
assert klass().to_py('10pt monospace') == expected