File Complexity Overall
  • There are 363 files with units, with 82,002 lines of code.
    • 10 very complex files (McCabe index sum 251+; 15,738 lines of code)
    • 27 complex files (McCabe index sum 126-250; 18,388 lines of code)
    • 58 medium complex files (McCabe index sum 51-125; 21,644 lines of code)
    • 59 slightly complex files (McCabe index sum 26-50; 11,055 lines of code)
    • 209 simple files (McCabe index sum 1-25; 15,177 lines of code)
  • 117 main files have no units (e.g. languages without unit analysis, or files without functions) and are not classified.
system19% | 22% | 26% | 13% | 18%
Legend:
251+
126-250
51-125
26-50
1-25


explore: grouped by folders | grouped by complexity
File Complexity per Extension
251+
126-250
51-125
26-50
1-25
py19% | 22% | 26% | 13% | 18%
ts0% | 0% | 0% | 0% | 100%
File Complexity per Logical Decomposition
primary
251+
126-250
51-125
26-50
1-25
metaflow19% | 22% | 26% | 13% | 18%
devtools0% | 0% | 0% | 0% | 100%
Most Complex Files (Top 50)

The McCabe index of a file grows with its size: per 100 lines tells a large but plain file from a dense one, and most complex unit whether the complexity sits in one unit or is spread over many.

File# lines# unitsMcCabe index
(sum)
per 100
lines
most complex
unit
argo_workflows.py
in metaflow/plugins/argo
3836 225 767 20 119
typing_extensions.py
in metaflow/_vendor/v3_6
1505 186 524 35 47
typing_extensions.py
in metaflow/_vendor
1935 183 500 26 23
typing_extensions.py
in metaflow/_vendor/v3_7
1581 164 433 27 17
emitter.py
in metaflow/_vendor/yaml
953 60 380 40 30
core.py
in metaflow/client
1142 138 365 32 19
scanner.py
in metaflow/_vendor/yaml
878 72 354 40 32
runtime.py
in metaflow
1931 69 332 17 44
core.py
in metaflow/_vendor/click
1126 106 324 29 25
__init__.py
in metaflow/extension_support
851 28 263 31 108
s3.py
in metaflow/plugins/datatools/s3
1058 56 222 21 57
step_functions.py
in metaflow/plugins/aws/step_functions
967 59 218 23 49
stub_generator.py
in metaflow/cmd/develop
1334 29 200 15 53
_transformer.py
in metaflow/_vendor/typeguard
953 49 198 21 17
_transformer.py
in metaflow/_vendor/v3_7/typeguard
939 50 196 21 17
s3op.py
in metaflow/plugins/datatools/s3
1086 31 193 18 56
flowspec.py
in metaflow
723 37 191 26 34
kubernetes_jobsets.py
in metaflow/plugins/kubernetes
888 62 177 20 24
constructor.py
in metaflow/_vendor/yaml
628 51 175 28 18
task_datastore.py
in metaflow/datastore
698 51 171 24 17
__init__.py
in metaflow/_vendor/importlib_metadata
530 100 166 31 7
__init__.py
in metaflow/_vendor/v3_7/importlib_metadata
530 100 166 31 7
__init__.py
in metaflow/_vendor/v3_6/importlib_metadata
530 100 166 31 7
conda_environment.py
in metaflow/plugins/pypi
444 26 163 37 54
_termui_impl.py
in metaflow/_vendor/click
493 35 161 33 17
_compat.py
in metaflow/_vendor/click
547 66 159 29 23
decorators.py
in metaflow
684 53 155 23 14
graph.py
in metaflow
482 19 154 32 27
components.py
in metaflow/plugins/cards/card_modules
781 55 151 19 9
types.py
in metaflow/_vendor/click
458 48 150 33 20
component_serializer.py
in metaflow/plugins/cards
521 51 145 28 20
server.py
in metaflow/plugins/env_escape
454 30 145 32 55
kubernetes_job.py
in metaflow/plugins/kubernetes
556 31 145 26 34
util.py
in metaflow
371 35 139 37 18
lint.py
in metaflow
436 28 138 32 21
configure_cmd.py
in metaflow/cmd
770 34 130 17 11
airflow_utils.py
in metaflow/plugins/airflow
527 41 129 24 21
airflow.py
in metaflow/plugins/airflow
621 18 124 20 31
basic.py
in metaflow/plugins/cards/card_modules
653 55 122 19 28
argo_workflows_cli.py
in metaflow/plugins/argo
1166 25 122 10 21
metadata.py
in metaflow/metadata_provider
452 47 122 27 13
kubernetes_decorator.py
in metaflow/plugins/kubernetes
473 10 115 24 50
parser.py
in metaflow/_vendor/yaml
412 31 111 27 29
specifiers.py
in metaflow/_vendor/packaging
322 46 110 34 15
batch_client.py
in metaflow/plugins/aws/batch
662 56 108 16 7
serializer.py
in metaflow/datastore/artifacts
415 28 106 26 11
parser.py
in metaflow/_vendor/click
256 20 102 40 14
convert_to_native_type.py
in metaflow/plugins/cards/card_modules
375 37 102 27 14
user_step_decorator.py
in metaflow/user_decorators
409 29 101 25 20
task.py
in metaflow
793 10 97 12 33
About This Analysis
  • File complexity is the sum of the McCabe indexes (conditional complexity) of the units (methods, functions...) in a file.
  • Files are classified in five categories based on that sum: 1-25 (simple files), 26-50 (slightly complex files), 51-125 (medium complex files), 126-250 (complex files), 251+ (very complex files). The default bands are five times the unit complexity bands, as a file is a group of units.
  • Only main code files with units are classified. Files without units (languages without unit analysis, or files without functions) have no complexity to measure and are left out rather than counted as simple.
  • A very complex file holds many decisions, which often means it has too many responsibilities: a candidate to split, and a place where changes need more testing.
Learn more...