Skip to content

Commit 04df098

Browse files
committed
fix: update action versions in workflows and improve XML parsing documentation
1 parent 3d851f9 commit 04df098

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ jobs:
2222
- name: Run tox
2323
run: tox -e py
2424
- name: SonarQube Scan
25-
uses: SonarSource/sonarqube-scan-action@v6
25+
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4
2626
env:
2727
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/unittests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
# The key configuration value here is `virtualenvs-in-project: true`: this creates the
4646
# venv as a `.venv` in your testing directory, which allows the next step to easily
4747
# cache it.
48-
- uses: snok/install-poetry@v1
48+
- uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a
4949
with:
5050
version: 2.1.0
5151
virtualenvs-create: true

pystreamapi/loaders/__xml/__xml_loader.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ def _lazy_parse_xml_file(file_path: str, encoding: str,
3939
"""Lazily parse an XML file by reading its content and yielding parsed namedtuples."""
4040
def generator():
4141
"""Generator that reads the XML file and yields parsed namedtuples lazily."""
42+
# skipcq: PTC-W6004
4243
with open(file_path, mode='r', encoding=encoding) as xmlfile:
43-
# skipcq: PTC-W6004
4444
xml_string = xmlfile.read()
4545
yield from _parse_xml_string_lazy(xml_string, retrieve_children, cast_types)
4646

@@ -49,9 +49,7 @@ def generator():
4949

5050
def _lazy_parse_xml_string(xml_string: str, retrieve_children: bool,
5151
cast_types: bool) -> Iterator[Any]:
52-
"""
53-
Lazily parse an XML string by yielding parsed namedtuples for each element.
54-
"""
52+
"""Lazily parse an XML string by yielding parsed namedtuples for each element."""
5553
def generator():
5654
"""Generator that yields parsed namedtuples from the XML string lazily."""
5755
yield from _parse_xml_string_lazy(xml_string, retrieve_children, cast_types)

0 commit comments

Comments
 (0)