diff roundup/configuration.py @ 7845:0c71ac9cdcd0

chore(lint): change class props from mutable lists to tuples A number of class props were lists [] which are mutable. Change them to tuples. Better performance and no change of getting the contents changed.
author John Rouillard <rouilj@ieee.org>
date Sat, 30 Mar 2024 21:48:17 -0400
parents b95474b23440
children 8b31893f5930
line wrap: on
line diff
--- a/roundup/configuration.py	Sat Mar 30 21:40:02 2024 -0400
+++ b/roundup/configuration.py	Sat Mar 30 21:48:17 2024 -0400
@@ -405,8 +405,8 @@
 class IsolationOption(Option):
     """Database isolation levels"""
 
-    allowed = ['read uncommitted', 'read committed', 'repeatable read',
-               'serializable']
+    allowed = ('read uncommitted', 'read committed', 'repeatable read',
+               'serializable')
     class_description = "Allowed values: %s" % ', '.join("'%s'" % a
                                                          for a in allowed)
 
@@ -420,7 +420,7 @@
 class IndexerOption(Option):
     """Valid options for indexer"""
 
-    allowed = ['', 'xapian', 'whoosh', 'native', 'native-fts']
+    allowed = ('', 'xapian', 'whoosh', 'native', 'native-fts')
     class_description = "Allowed values: %s" % ', '.join("'%s'" % a
                                                          for a in allowed)
 
@@ -428,7 +428,7 @@
     #    SELECT cfgname FROM pg_ts_config;
     # on a postgresql 14.1 server.
     # So the best we can do is hardcode this.
-    valid_langs = ["simple",
+    valid_langs = ("simple",
                    "custom1",
                    "custom2",
                    "custom3",
@@ -461,7 +461,7 @@
                    "swedish",
                    "tamil",
                    "turkish",
-                   "yiddish"]
+                   "yiddish")
 
     def str2value(self, value):
         _val = value.lower()
@@ -863,7 +863,7 @@
        Fail with error and suggestions if they are incompatible.
     """
 
-    compatibility_matrix = [
+    compatibility_matrix = (
         ('anydbm', 'anydbm'),
         ('anydbm', 'redis'),
         ('sqlite', 'anydbm'),
@@ -871,7 +871,7 @@
         ('sqlite', 'redis'),
         ('mysql', 'mysql'),
         ('postgresql', 'postgresql'),
-        ]
+        )
 
     def validate(self, options):
         ''' make sure session db is compatible with primary db.

Roundup Issue Tracker: http://roundup-tracker.org/