Browse Source

Don't use mutable values as default for arguments

tags/0.3
Johann Schmitz 3 years ago
parent
commit
45c521534d
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      src/smartcheck/check.py

+ 3
- 3
src/smartcheck/check.py View File

@@ -198,8 +198,8 @@ class SMARTCheck(object):
198 198
 			'test_results': TEST_RESULT_RE.findall(tests_text)
199 199
 		}
200 200
 
201
-	def check(self, ignore_attributes=[]):
202
-		return len(self.check_attributes(ignore_attributes)) == 0 and self.check_tests()
201
+	def check(self, ignore_attributes=None):
202
+		return len(self.check_attributes(ignore_attributes or [])) == 0 and self.check_tests()
203 203
 
204 204
 	def check_tests(self):
205 205
 		ok_test_results = [
@@ -209,7 +209,7 @@ class SMARTCheck(object):
209 209
 		]
210 210
 		return not any([x[2] not in ok_test_results for x in self.self_tests['test_results']])
211 211
 
212
-	def check_attributes(self, ignore_attributes=[]):
212
+	def check_attributes(self, ignore_attributes=None):
213 213
 		failed_attributes = self.check_generic_attributes()
214 214
 
215 215
 		if self.exists_in_database():

Loading…
Cancel
Save