Skip to content

Commit

Permalink
Merge pull request #54 from common-workflow-language/newer-ruamel
Browse files Browse the repository at this point in the history
switch to latest ruamel.yaml with native types
  • Loading branch information
mr-c authored Aug 19, 2016
2 parents fefc957 + bc57aa0 commit 6fb2969
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 65 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ list-author-emails:
@git log --format='%aN,%aE' | sort -u | grep -v 'root'

mypy: ${PYSOURCES}
rm -Rf typeshed/2.7/ruamel/yaml
ln -s $(shell python -c 'from __future__ import print_function; import ruamel.yaml; import os.path; print(os.path.dirname(ruamel.yaml.__file__))') \
typeshed/2.7/ruamel/
MYPYPATH=typeshed/2.7 mypy --py2 --disallow-untyped-calls \
--fast-parser --warn-redundant-casts --warn-unused-ignores \
schema_salad
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests
ruamel.yaml==0.11.11
ruamel.yaml==0.12.4
rdflib>=4.1.
rdflib-jsonld>=0.3.0
mistune
Expand Down
2 changes: 1 addition & 1 deletion schema_salad/ref_resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ def fetch(self, url, inject_ids=True): # type: (unicode, bool) -> Any
textIO = StringIO(text)
textIO.name = url # type: ignore
result = yaml.load(textIO, Loader=SafeLoader)
except yaml.parser.ParserError as e: # type: ignore
except yaml.parser.ParserError as e:
raise validate.ValidationException("Syntax error %s" % (e))
if isinstance(result, dict) and inject_ids and self.identifiers:
for identifier in self.identifiers:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

install_requires = [
'requests',
'ruamel.yaml == 0.11.11',
'ruamel.yaml == 0.12.4',
'rdflib >= 4.1.0',
'rdflib-jsonld >= 0.3.0',
'mistune',
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ whitelist_externals = make
deps =
mypy-lang>=0.4
typed-ast
-rrequirements.txt

[testenv:py35-lint]
commands = flake8 schema_salad setup.py
Expand Down
7 changes: 0 additions & 7 deletions typeshed/2.7/ruamel/yaml/__init__.pyi

This file was deleted.

8 changes: 0 additions & 8 deletions typeshed/2.7/ruamel/yaml/cyaml.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions typeshed/2.7/ruamel/yaml/error.pyi

This file was deleted.

9 changes: 0 additions & 9 deletions typeshed/2.7/ruamel/yaml/loader.pyi

This file was deleted.

21 changes: 0 additions & 21 deletions typeshed/2.7/ruamel/yaml/main.pyi

This file was deleted.

8 changes: 0 additions & 8 deletions typeshed/2.7/ruamel/yaml/parser.pyi

This file was deleted.

0 comments on commit 6fb2969

Please sign in to comment.