From 66697533c2ed2786c73880e4f04045da0931ee61 Mon Sep 17 00:00:00 2001 From: Tom Forbes Date: Mon, 31 Jul 2023 02:52:57 +0100 Subject: [PATCH] Add type breakdown --- sql/stats.prql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/stats.prql b/sql/stats.prql index 0edc7b63..a7677040 100644 --- a/sql/stats.prql +++ b/sql/stats.prql @@ -146,7 +146,9 @@ let project_level_breakdowns = ( has_toml = (suffix path '.toml') && ! has_pyproject, has_yaml = (suffix path '.yml') || (suffix path '.yaml'), - has_types = (suffix path 'py.typed') || (suffix path '.pyi') + has_pyi = (suffix path '.pyi'), + has_py_typed = (suffix path 'py.typed'), + has_types = has_pyi || has_py_typed, is_init_py = suffix path '__init__.py', @@ -172,6 +174,8 @@ let project_level_breakdowns = ( has_toml = s"COUNT(DISTINCT {project_name}) FILTER ({has_toml})", has_yaml = s"COUNT(DISTINCT {project_name}) FILTER ({has_yaml})", + has_pyi = s"COUNT(DISTINCT {project_name}) FILTER ({has_pyi})", + has_py_typed = s"COUNT(DISTINCT {project_name}) FILTER ({has_py_typed})", has_types = s"COUNT(DISTINCT {project_name}) FILTER ({has_types})", has_tests = s"COUNT(DISTINCT {project_name}) FILTER ({has_tests})",