Skip to content

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cpuinfo/cpuinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ def _filter_dict_keys_with_empty_values(info, acceptable_values = {}):
905905
return filtered_info
906906

907907
class ASM:
908-
def __init__(self, restype=None, argtypes=(), machine_code=[]):
908+
def __init__(self, restype=None, argtypes=None, machine_code=None):
909909
self.restype = restype
910910
self.argtypes = argtypes
911911
self.machine_code = machine_code
@@ -1000,7 +1000,7 @@ def __init__(self, trace=None):
10001000
# Figure out if SE Linux is on and in enforcing mode
10011001
self.is_selinux_enforcing = _is_selinux_enforcing(trace)
10021002

1003-
def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
1003+
def _asm_func(self, restype=None, argtypes=None, machine_code=None):
10041004
asm = ASM(restype, argtypes, machine_code)
10051005
asm.compile()
10061006
return asm

tests/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ class MockCPUID:
269269
_counter = 0
270270
_is_first = False
271271

272-
def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
272+
def _asm_func(self, restype=None, argtypes=None, machine_code=None):
273273
class CPUIDGetTicks:
274274
# NOTE: This assumes that the function returned is a get_ticks function
275275
def func(self):

tests/test_cpuid.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
class MockASM(ASM):
99
is_first = False
1010

11-
def __init__(self, restype=None, argtypes=(), machine_code=[]):
11+
def __init__(self, restype=None, argtypes=None, machine_code=None):
1212
super(MockASM, self).__init__(restype, argtypes, machine_code)
1313

1414
def compile(self):

tools/get_system_info.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def print_output(name, output):
296296

297297

298298
class ASM:
299-
def __init__(self, restype=None, argtypes=(), machine_code=[]):
299+
def __init__(self, restype=None, argtypes=None, machine_code=None):
300300
self.restype = restype
301301
self.argtypes = argtypes
302302
self.machine_code = machine_code
@@ -392,7 +392,7 @@ def __init__(self):
392392
# Figure out if SE Linux is on and in enforcing mode
393393
self.is_selinux_enforcing = _is_selinux_enforcing()
394394

395-
def _asm_func(self, restype=None, argtypes=(), machine_code=[]):
395+
def _asm_func(self, restype=None, argtypes=None, machine_code=None):
396396
asm = ASM(restype, argtypes, machine_code)
397397
asm.compile()
398398
return asm

0 commit comments

Comments
 (0)