Skip to content

Commit

Permalink
Add type breakdown
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Jul 31, 2023
1 parent 0afd199 commit 6669753
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sql/stats.prql
Original file line number Diff line number Diff line change
Expand Up @@ -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',

Expand All @@ -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})",
Expand Down

0 comments on commit 6669753

Please sign in to comment.