Skip to content

Commit

Permalink
Update release info and mypy dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
brunato committed Feb 11, 2023
1 parent 053deb6 commit 053fc53
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-xmlschema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
- name: Lint with mypy if Python version != 3.7
if: ${{ matrix.python-version != '3.7' }}
run: |
pip install mypy==0.991 elementpath==4.0.1 lxml-stubs
pip install mypy==1.0.0 elementpath==4.0.1 lxml-stubs
mypy --show-error-codes --strict xmlschema
- name: Lint with mypy if Python version == 3.7
if: ${{ matrix.python-version == '3.7' }}
run: |
pip install mypy==0.991 elementpath==4.0.1 lxml-stubs
pip install mypy==1.0.0 elementpath==4.0.1 lxml-stubs
mypy --show-error-codes --no-warn-redundant-casts --no-warn-unused-ignores --strict xmlschema
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
CHANGELOG
*********

`v2.2.1`_ (2023-02-11)
======================
* Fix mixed content extension without explicit mixed attribute (issue #334)

`v2.2.0`_ (2023-02-06)
======================
* Refine string serialization of XML resources and data elements
Expand Down Expand Up @@ -599,3 +603,4 @@ v0.9.6 (2017-05-05)
.. _v2.1.0: https://github.com/brunato/xmlschema/compare/v2.0.4...v2.1.0
.. _v2.1.1: https://github.com/brunato/xmlschema/compare/v2.1.0...v2.1.1
.. _v2.2.0: https://github.com/brunato/xmlschema/compare/v2.1.1...v2.2.0
.. _v2.2.1: https://github.com/brunato/xmlschema/compare/v2.2.0...v2.2.1
4 changes: 2 additions & 2 deletions publiccode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ publiccodeYmlVersion: '0.2'
name: xmlschema
url: 'https://github.com/sissaschool/xmlschema'
landingURL: 'https://github.com/sissaschool/xmlschema'
releaseDate: '2023-02-06'
softwareVersion: v2.2.0
releaseDate: '2023-02-11'
softwareVersion: v2.2.1
developmentStatus: stable
platforms:
- linux
Expand Down
2 changes: 1 addition & 1 deletion tests/validation/test_decoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,7 @@ def test_mixed_content_decode__issue_334(self):
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="root" type="mixedContentType" />
</xs:schema>
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ commands =

[testenv:mypy-py37]
deps =
mypy==0.991
mypy==1.0.0
elementpath==4.0.1
lxml-stubs
jinja2
Expand All @@ -53,7 +53,7 @@ commands =

[testenv:mypy-py{38,39,310,311}]
deps =
mypy==0.991
mypy==1.0.0
elementpath==4.0.1
lxml-stubs
jinja2
Expand All @@ -74,7 +74,7 @@ deps =
elementpath>=4.0.0, <5.0.0
lxml
jinja2
mypy==0.991
mypy==1.0.0
lxml-stubs
commands =
pytest tests -ra
Expand Down
4 changes: 3 additions & 1 deletion xmlschema/validators/complex_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,9 @@ def _parse(self) -> None:
if derivation_elem.tag == XSD_RESTRICTION:
self._parse_complex_content_restriction(derivation_elem, self.base_type)
else:
self._parse_complex_content_extension(derivation_elem, self.base_type, has_mixed_attribute)
self._parse_complex_content_extension(
derivation_elem, self.base_type, has_mixed_attribute
)

if content_elem is not self.elem[-1]:
k = 2 if content_elem is not self.elem[0] else 1
Expand Down
2 changes: 1 addition & 1 deletion xmlschema/xpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def __init__(self, name: str, xsd_type: BaseXsdType) -> None:

def __iter__(self) -> Iterator['XPathElement']:
if not self.type.has_simple_content():
yield from self.type.content.iter_elements() # type: ignore[union-attr]
yield from self.type.content.iter_elements() # type: ignore[union-attr,misc]

@property
def xpath_proxy(self) -> XMLSchemaProxy:
Expand Down

0 comments on commit 053fc53

Please sign in to comment.