cleanup: Remove unnecessary calls of del

Related #2273
This commit is contained in:
MattHag 2024-03-02 16:48:06 +01:00 committed by GitHub
parent ad0f9ec712
commit 574a95da50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 0 additions and 10 deletions

View File

@ -59,7 +59,6 @@ DeviceInfo = namedtuple(
"hidpp_long",
],
)
del namedtuple
# Global handle to hidapi
_hidapi = None

View File

@ -51,7 +51,6 @@ def strhex(d):
#
print_lock = Lock()
del Lock
def _print(marker, data, scroll=False):

View File

@ -68,7 +68,6 @@ DeviceInfo = namedtuple(
"hidpp_long",
],
)
del namedtuple
#
# exposed API

View File

@ -377,7 +377,6 @@ _HIDPP_Notification.__str__ = lambda self: "Notification(%02x,%d,%02X,%02X,%s)"
self.address,
_strhex(self.data),
)
del namedtuple
#
#

View File

@ -561,6 +561,3 @@ BATTERY_STATUS = NamedInts(
def BATTERY_OK(status):
return status not in (BATTERY_STATUS.invalid_battery, BATTERY_STATUS.thermal_error)
del namedtuple

View File

@ -37,8 +37,6 @@ def _find_locale_path(lc_domain):
if mo_files:
return _path.join(location, "locale")
# del _path
try:
locale.setlocale(locale.LC_ALL, "")
@ -46,7 +44,6 @@ except Exception:
pass
language, encoding = locale.getlocale()
del locale
_LOCALE_DOMAIN = _NAME.lower()
path = _find_locale_path(_LOCALE_DOMAIN)