From a377d692388ea11f9c2909a32c4ef31ad628fbfb Mon Sep 17 00:00:00 2001 From: Simon Willison Date: Sat, 25 Jul 2026 14:42:54 -0700 Subject: [PATCH] Fix flake E501 long lines --- pyproject.toml | 9 ++++++++- sqlite_utils/db.py | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 003322c..6bc0a64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,7 +79,14 @@ build-backend = "setuptools.build_meta" max-line-length = 160 # Black compatibility, E203 whitespace before ':': extend-ignore = ["E203"] -extend-exclude = [".venv", "build", "dist", "docs", "sqlite_utils.egg-info"] +extend-exclude = [ + ".venv", + ".claude", + "build", + "dist", + "docs", + "sqlite_utils.egg-info", +] [tool.setuptools.package-data] sqlite_utils = ["py.typed"] diff --git a/sqlite_utils/db.py b/sqlite_utils/db.py index 8372e3b..9a00123 100644 --- a/sqlite_utils/db.py +++ b/sqlite_utils/db.py @@ -2954,7 +2954,10 @@ class Table(Queryable): quote_identifier(magic_lookup_column), quote_identifier(table), where=" AND ".join( - f"{quote_identifier(self.name)}.{quote_identifier(column)} IS {quote_identifier(table)}.{quote_identifier(rename.get(column) or column)}" + f"{quote_identifier(self.name)}." + f"{quote_identifier(column)} IS " + f"{quote_identifier(table)}." + f"{quote_identifier(rename.get(column) or column)}" for column in columns ), all_null=all_columns_are_null, @@ -4939,7 +4942,10 @@ class Table(Queryable): most_common_results = [ (truncate(r[0]), r[1]) for r in db.execute( - f"select {column_quoted}, count(*) from {table_quoted} group by {column_quoted} order by count(*) desc, {column_quoted} limit {common_limit}" + f"select {column_quoted}, count(*) " + f"from {table_quoted} group by {column_quoted} " + f"order by count(*) desc, {column_quoted} " + f"limit {common_limit}" ).fetchall() ] most_common_results.sort(key=lambda p: (p[1], p[0]), reverse=True) @@ -4951,7 +4957,10 @@ class Table(Queryable): least_common_results = [ (truncate(r[0]), r[1]) for r in db.execute( - f"select {column_quoted}, count(*) from {table_quoted} group by {column_quoted} order by count(*), {column_quoted} desc limit {common_limit}" + f"select {column_quoted}, count(*) " + f"from {table_quoted} group by {column_quoted} " + f"order by count(*), {column_quoted} desc " + f"limit {common_limit}" ).fetchall() ] least_common_results.sort(key=lambda p: (p[1], p[0]))