You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments