mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Modernize code to Python 3.6+ (#1158)
* Compact dict and set building * Remove redundant parentheses * Simplify chained conditions * Change method name to lowercase * Use triple double quotes for docstrings Thanks, @eumiro!
This commit is contained in:
parent
90eba4c3ca
commit
a882d67962
19 changed files with 76 additions and 82 deletions
|
|
@ -162,10 +162,8 @@ class ColumnFacet(Facet):
|
|||
)
|
||||
num_distinct_values = len(distinct_values)
|
||||
if (
|
||||
num_distinct_values
|
||||
and num_distinct_values > 1
|
||||
1 < num_distinct_values < row_count
|
||||
and num_distinct_values <= facet_size
|
||||
and num_distinct_values < row_count
|
||||
# And at least one has n > 1
|
||||
and any(r["n"] > 1 for r in distinct_values)
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue