Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional pylint warning suppression #927

Merged
merged 1 commit into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions soco/music_services/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def _get_account_xml(soco):
device = soco or discovery.any_soco()
log.debug("Fetching account data from %s", device)
settings_url = "http://{}:1400/status/accounts".format(device.ip_address)
# Remove this as part of PR #925
# pylint: disable=W3101
result = requests.get(settings_url).content
log.debug("Account data: %s", result)
return result
Expand Down
2 changes: 2 additions & 0 deletions soco/soap.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ def call(self):
if _LOG.isEnabledFor(logging.DEBUG):
_LOG.debug("Sending %s, %s", headers, prettify(data))

# Remove this as part of PR #925
# pylint: disable=W3101
response = requests.post(
self.endpoint,
headers=headers,
Expand Down
24 changes: 4 additions & 20 deletions soco/zonegroupstate.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,9 @@

"""
import logging
import sys
import time

# pylint: disable=I1101
try:
from lxml import etree as LXML

except ImportError:
print(
"""
SoCo Error: Import of dependency 'lxml' failed. Please install it.

Depending on your platform you may also need to install
system libraries 'libxml2' and 'libxslt'.

Please refer to: https://lxml.de/installation.html for more details.
"""
)
sys.exit(1)
from lxml import etree as LXML

from . import config
from .groups import ZoneGroup
Expand Down Expand Up @@ -110,7 +94,7 @@
</xsl:template>
</xsl:stylesheet>
"""
ZGS_TRANSFORM = LXML.XSLT(LXML.fromstring(ZGS_XSLT))
ZGS_TRANSFORM = LXML.XSLT(LXML.fromstring(ZGS_XSLT)) # pylint:disable=I1101

_LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -285,6 +269,6 @@ def update_soco_instances(self, tree):

def normalize_zgs_xml(xml):
"""Normalize the ZoneGroupState payload and return an lxml ElementTree instance."""
parser = LXML.XMLParser(remove_blank_text=True)
tree = LXML.fromstring(xml, parser)
parser = LXML.XMLParser(remove_blank_text=True) # pylint:disable=I1101
tree = LXML.fromstring(xml, parser) # pylint:disable=I1101
return ZGS_TRANSFORM(tree)