Skip to content

Commit c684ff9

Browse files
committed
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.
1 parent d8877b4 commit c684ff9

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

roundup/configuration.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ def str2value(self, value):
405405
class IsolationOption(Option):
406406
"""Database isolation levels"""
407407

408-
allowed = ['read uncommitted', 'read committed', 'repeatable read',
409-
'serializable']
408+
allowed = ('read uncommitted', 'read committed', 'repeatable read',
409+
'serializable')
410410
class_description = "Allowed values: %s" % ', '.join("'%s'" % a
411411
for a in allowed)
412412

@@ -420,15 +420,15 @@ def str2value(self, value):
420420
class IndexerOption(Option):
421421
"""Valid options for indexer"""
422422

423-
allowed = ['', 'xapian', 'whoosh', 'native', 'native-fts']
423+
allowed = ('', 'xapian', 'whoosh', 'native', 'native-fts')
424424
class_description = "Allowed values: %s" % ', '.join("'%s'" % a
425425
for a in allowed)
426426

427427
# FIXME this is the result of running:
428428
# SELECT cfgname FROM pg_ts_config;
429429
# on a postgresql 14.1 server.
430430
# So the best we can do is hardcode this.
431-
valid_langs = ["simple",
431+
valid_langs = ("simple",
432432
"custom1",
433433
"custom2",
434434
"custom3",
@@ -461,7 +461,7 @@ class IndexerOption(Option):
461461
"swedish",
462462
"tamil",
463463
"turkish",
464-
"yiddish"]
464+
"yiddish")
465465

466466
def str2value(self, value):
467467
_val = value.lower()
@@ -863,15 +863,15 @@ class SessiondbBackendOption(Option):
863863
Fail with error and suggestions if they are incompatible.
864864
"""
865865

866-
compatibility_matrix = [
866+
compatibility_matrix = (
867867
('anydbm', 'anydbm'),
868868
('anydbm', 'redis'),
869869
('sqlite', 'anydbm'),
870870
('sqlite', 'sqlite'),
871871
('sqlite', 'redis'),
872872
('mysql', 'mysql'),
873873
('postgresql', 'postgresql'),
874-
]
874+
)
875875

876876
def validate(self, options):
877877
''' make sure session db is compatible with primary db.

0 commit comments

Comments
 (0)