mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-07-09 01:05:53 +02:00
pytest warning fixes
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
jc changelog
|
||||
|
||||
20230402 v1.23.2
|
||||
20230417 v1.23.2
|
||||
- Add `bluetoothctl` command parser
|
||||
- Fix `iwconfig` command parser for SSIDs with dashes in the name
|
||||
- Fix `crontab` command parsers for incorrect variable parsing in some cases
|
||||
- Fix pytest warnings
|
||||
|
||||
20230323 v1.23.1
|
||||
- Fix `zpool-status` command parser for lines that start with tab
|
||||
|
@ -96,14 +96,14 @@ class PBParser(object):
|
||||
prefix = self.data[0:6]
|
||||
for case in Switch(prefix):
|
||||
if case('bplist'):
|
||||
self.file_type = 'binary'
|
||||
import biplist
|
||||
parsed_plist = biplist.readPlist(self.file_path)
|
||||
# self.file_type = 'binary'
|
||||
# import biplist
|
||||
# parsed_plist = biplist.readPlist(self.file_path)
|
||||
break
|
||||
if case('<?xml '):
|
||||
self.file_type = 'xml'
|
||||
import plistlib
|
||||
parsed_plist = plistlib.readPlist(self.file_path)
|
||||
# self.file_type = 'xml'
|
||||
# import plistlib
|
||||
# parsed_plist = plistlib.readPlist(self.file_path)
|
||||
break
|
||||
if case():
|
||||
self.file_type = 'ascii'
|
||||
@ -111,7 +111,7 @@ class PBParser(object):
|
||||
if self.data[0:2] == '//':
|
||||
# this is to try to see if we can locate the desired string encoding of the file
|
||||
import re
|
||||
result = re.search('^// !\$\*(.+?)\*\$!', self.data) # pylint: disable=anomalous-backslash-in-string
|
||||
result = re.search(r'^// !\$\*(.+?)\*\$!', self.data) # pylint: disable=anomalous-backslash-in-string
|
||||
if result:
|
||||
self.string_encoding = result.group(1)
|
||||
#now return the parse
|
||||
|
@ -57,7 +57,7 @@ def KeySorter(obj1, obj2):
|
||||
result = StringCmp(str(obj1), str(obj2))
|
||||
return result
|
||||
|
||||
class pbRoot(collections.MutableMapping):
|
||||
class pbRoot(collections.abc.MutableMapping):
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self.store = dict()
|
||||
|
Reference in New Issue
Block a user