comparison roundup/anypy/TODO.txt @ 8600:892533a65881 default tip

chore(ruff): cleanup indexer_* code after ruff analysis. indexer_common.py: use 'for x, y in adict.items() rather than 'for x in adict' and later reference 'adict[x]'. indexer_dbm.py: use 'with open() ... as fd: <stuff>' rather than 'fd = open()<stuff>close()'. 4 instances. whitespace fixes around operators use 'for x, y in adict.items() rather than 'for x in adict' and later reference 'adict[x]'. replace 'return 0' with 'return' as ruff was reporting function didn't have explicit return at end when internal return returned a not None value. AFICT load_index's return value is never checked. replace 'for _key, value in x.items()' with 'for value in x.values()'. _key is never used. indexer_postgresql_fts.py: import sorting. symbolic string for server version needed for FTS support. rename variable id. remove unneeded flow control (else after raise) indexer_rdbms.py: import sorting. rename variable id 2 places. add variable 'a = self.db.arg' to make scanning SQL code that uses % to insert placeholders easier. Also reduces dereferencing. replaced 'tuple([list comprehension])' with tuple(same comprehension but is a generator) indexer_sqlite_fts.py: import sorting. rename variable id. remove unneeded flow control (else after raise). indexer_whoosh.py: import sorting. remove qparser from whoosh import. Unused andnot needed until we implement using whoosh query language in roundup searches. indexer_xapian.py: import sorting. rewrite loop that appended to a list as a list comprehension
author John Rouillard <rouilj@ieee.org>
date Sun, 26 Apr 2026 19:26:54 -0400
parents 4566360871dc
children
comparison
equal deleted inserted replaced
8599:bc21d46ba8c0 8600:892533a65881

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