File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 2424 pip install --upgrade ruff
2525 - name : Lint with ruff
2626 run : |
27- ruff . --output-format github
27+ ruff check . --output-format github
2828
2929 PyLint :
3030 runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -1773,11 +1773,11 @@ def get_result(remote: SSHClientBase) -> exec_result.ExecResult:
17731773 for remote , future in futures .items ():
17741774 try :
17751775 result = future .result (timeout = 0.1 )
1776- results [( remote .hostname , remote .port ) ] = result
1776+ results [remote .hostname , remote .port ] = result
17771777 if result .exit_code not in prep_expected :
1778- errors [( remote .hostname , remote .port ) ] = result
1778+ errors [remote .hostname , remote .port ] = result
17791779 except Exception as e : # noqa: PERF203
1780- raised_exceptions [( remote .hostname , remote .port ) ] = e
1780+ raised_exceptions [remote .hostname , remote .port ] = e
17811781
17821782 if raised_exceptions : # always raise
17831783 raise exceptions .ParallelCallExceptionsError (
Original file line number Diff line number Diff line change 5050 lxml = None # pylint: disable=invalid-name
5151
5252if typing .TYPE_CHECKING :
53- import xml .etree .ElementTree # nosec # for typing only
53+ import xml .etree .ElementTree as ET # nosec # for typing only
5454 from collections .abc import Callable
5555 from collections .abc import Collection
5656 from collections .abc import Iterable
@@ -677,7 +677,7 @@ def stdout_yaml(self) -> typing.Any:
677677 # noinspection PyUnresolvedReferences
678678 @property
679679 @_handle_deserialize ("xml" )
680- def stdout_xml (self ) -> xml . etree . ElementTree .Element :
680+ def stdout_xml (self ) -> ET .Element :
681681 """XML from stdout.
682682
683683 :return: Decoded XML document.
Original file line number Diff line number Diff line change 2222
2323import datetime
2424import unittest
25- import xml .etree .ElementTree
25+ import xml .etree .ElementTree as ET
2626from unittest import mock
2727
2828import exec_helpers
@@ -297,10 +297,10 @@ def test_indexed_lines_access(self):
297297 def test_stdout_xml (self ):
298298 """Test xml etree decode."""
299299 result = exec_helpers .ExecResult ("test" , stdout = [b"<?xml version='1.0'?>\n " , b"<data>123</data>\n " ])
300- expect = xml . etree . ElementTree .fromstring (b"<?xml version='1.0'?>\n <data>123</data>\n " )
300+ expect = ET .fromstring (b"<?xml version='1.0'?>\n <data>123</data>\n " )
301301 self .assertEqual (
302- xml . etree . ElementTree .tostring (expect ),
303- xml . etree . ElementTree .tostring (result .stdout_xml ),
302+ ET .tostring (expect ),
303+ ET .tostring (result .stdout_xml ),
304304 )
305305
306306 @unittest .skipIf (lxml is None , "no lxml installed" )
You can’t perform that action at this time.
0 commit comments