We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b0f7c4e commit 6468ddaCopy full SHA for 6468dda
mp_reader/analyzer.py
@@ -709,9 +709,13 @@ def type_stats(
709
# Apply the filter to the sorted types
710
sorted_types = [s for s in sorted_types if type_filter(record.get_type_name(s[-1]))]
711
712
- n_omitted_matches = len(sorted_types) - count
+ if count is not None:
713
+ n_omitted_matches = len(sorted_types) - count
714
+ sorted_types = sorted_types[:count]
715
+ else:
716
+ n_omitted_matches = 0
717
- for _, _, _, tid in sorted_types[:count]:
718
+ for _, _, _, tid in sorted_types:
719
get_stats_for_type(
720
tid,
721
record,
0 commit comments