Python Fire is a library for automatically generating command line interfaces (CLIs) from absolutely any Python object.
This report summarizes scanner evidence for google/python-fire, a Python project with 28,221 GitHub stars. SynthScan examined 13,206 lines of code across 76 source files, recording 181 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 21.5 (Elevated pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 135 finding(s).
Are imports declared and package/API names verified? 34 finding(s).
Are wrappers, guards, and repeated structures necessary? 49 finding(s).
Which changes need focused human review? 181 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 181 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | fire/test_components.py | 375 | Generators have a ``Yields`` section instead of a ``Returns`` section. Args: n (int): The upper limit of th | STRING |
| HIGH | fire/core.py | 74 | This function, Fire, is the main entrypoint for Python Fire. Executes a command either from the `command` argument or | STRING |
| HIGH | fire/core.py | 362 | Execute a Fire command on a target component using the args supplied. Arguments that come after a final isolated '--' | STRING |
| HIGH | fire/core.py | 623 | Returns a subcomponent of component by consuming an arg from args. Given a starting component and args, this function | STRING |
| HIGH | fire/core.py | 765 | Parses the positional and named arguments from the available supplied args. Modifies kwargs, removing args as they ar | STRING |
| HIGH | fire/core.py | 823 | Parses the supplied arguments for keyword arguments. Given a list of arguments, finds occurrences of --name value, an | STRING |
| HIGH | fire/parser.py | 80 | Parse value as a Python literal, or container of containers and literals. First the AST of the value is updated so th | STRING |
| HIGH | fire/__main__.py | 43 | Performs a module import given the filename. Args: path (str): the path to the file to be imported. Raises: | STRING |
| HIGH | fire/__main__.py | 79 | Imports a given module or filename. If the module_or_filename exists in the file system and ends with .py, we attem | STRING |
| HIGH | fire/console/files.py | 34 | Internal function to a find an executable. Args: executable: The name of the executable to find. path: A list | STRING |
| HIGH | fire/console/files.py | 75 | Searches for `executable` in the directories listed in `path` or $PATH. Executable must not contain a directory or an | STRING |
| HIGH | fire/console/platforms.py | 116 | Gets the enum corresponding to the given operating system id. Args: os_id: str, The operating system id to pa | STRING |
| HIGH | fire/console/platforms.py | 240 | Gets the enum corresponding to the given architecture id. Args: architecture_id: str, The architecture id to | STRING |
| HIGH | fire/console/platforms.py | 422 | Ensure that the Python version we are using is compatible. This will print an error message if not compatible. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/custom_descriptions.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/fire_import_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/interact_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/trace.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/test_components.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/decorators_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/test_components_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/formatting_windows.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/docstrings_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/trace_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/completion.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/helptext_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/testutils.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/inspectutils.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/fire_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/__init__.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/completion_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/core.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/parser_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/formatting.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/custom_descriptions_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/core_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/docstrings.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/parser.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/parser_fuzz_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/formatting_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/test_components_py3.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/test_components_bin.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/helptext.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/docstrings_fuzz_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/value_types.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/main_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/testutils_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/interact.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/__main__.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/inspectutils_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/decorators.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | fire/console/files.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/encoding.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/encoding.py | 101 | return string.decode(sys.getdefaultencoding()) | COMMENT |
| LOW | fire/console/console_io.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/platforms.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/console_attr_os.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/console_pager.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/text.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | fire/console/console_attr.py | 1 | # -*- coding: utf-8 -*- # | COMMENT |
| LOW | examples/widget/widget_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/widget/widget.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/widget/collector.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/widget/collector_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/identity/identity.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/cipher/cipher_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/cipher/cipher.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/diff/diff_test.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/diff/diff.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | examples/diff/difffull.py | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| LOW | .github/scripts/build.sh | 1 | # Copyright (C) 2018 Google Inc. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | fire/inspectutils.py | 306 | except (TypeError, AttributeError): | CODE |
| HIGH | fire/console/encoding.py | 71 | except UnicodeError: | CODE |
| HIGH | fire/console/encoding.py | 88 | except UnicodeError: | CODE |
| HIGH | fire/console/encoding.py | 95 | except UnicodeError: | CODE |
| HIGH | fire/console/encoding.py | 102 | except UnicodeError: | CODE |
| HIGH | fire/console/encoding.py | 79 | except UnicodeError: | CODE |
| HIGH | fire/console/console_attr_os.py | 47 | except: # pylint: disable=bare-except | CODE |
| HIGH | fire/console/console_attr_os.py | 153 | except: # pylint: disable=bare-except | CODE |
| HIGH | fire/console/console_attr.py | 785 | except UnicodeEncodeError: | CODE |
| HIGH | fire/console/console_attr.py | 791 | except UnicodeEncodeError: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/test_components.py | 30 | def multiplier_with_docstring(num, rate=2): | CODE |
| LOW | fire/test_components.py | 448 | def function_with_keyword_arguments(arg1, arg2=3, **kwargs): | CODE |
| LOW | fire/test_components.py | 453 | def fn_with_code_in_docstring(): | CODE |
| LOW | fire/test_components.py | 548 | def fn_with_kwarg_and_defaults(arg1, arg2, opt=True, **kwargs): | CODE |
| LOW | fire/test_components.py | 559 | def fn_with_multiple_defaults(first='first', last='last', late='late'): | CODE |
| LOW | fire/docstrings_test.py | 37 | def test_one_line_simple_whitespace(self): | CODE |
| LOW | fire/docstrings_test.py | 73 | def test_one_line_runs_over_whitespace(self): | STRING |
| LOW | fire/docstrings_test.py | 85 | def test_google_format_args_only(self): | STRING |
| LOW | fire/docstrings_test.py | 102 | def test_google_format_arg_named_args(self): | STRING |
| LOW | fire/docstrings_test.py | 115 | def test_google_format_typed_args_and_returns(self): | STRING |
| LOW | fire/docstrings_test.py | 143 | def test_google_format_multiline_arg_description(self): | STRING |
| LOW | fire/docstrings_test.py | 169 | def test_rst_format_typed_args_and_returns(self): | STRING |
| LOW | fire/docstrings_test.py | 198 | def test_numpy_format_typed_args_and_returns(self): | STRING |
| LOW | fire/docstrings_test.py | 232 | def test_numpy_format_multiline_arg_description(self): | STRING |
| LOW | fire/docstrings_test.py | 261 | def test_multisection_docstring(self): | STRING |
| LOW | fire/docstrings_test.py | 280 | def test_google_section_with_blank_first_line(self): | STRING |
| LOW | fire/docstrings_test.py | 293 | def test_ill_formed_docstring(self): | STRING |
| LOW | fire/docstrings_test.py | 309 | def test_numpy_colon_in_description(self): | STRING |
| LOW | fire/docstrings_test.py | 335 | def test_rst_format_typed_args_and_kwargs(self): | STRING |
| LOW⚡ | fire/custom_descriptions_test.py | 25 | def test_string_type_summary_enough_space(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 31 | def test_string_type_summary_not_enough_space_truncated(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 37 | def test_string_type_summary_not_enough_space_new_line(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 43 | def test_string_type_summary_not_enough_space_long_truncated(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 49 | def test_string_type_description_enough_space(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 55 | def test_string_type_description_not_enough_space_truncated(self): | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 61 | def test_string_type_description_not_enough_space_new_line(self): | CODE |
| LOW | fire/docstrings.py | 274 | def _get_or_create_arg_by_name(state, name, is_kwarg=False): | CODE |
| LOW | fire/docstrings.py | 386 | def _consume_google_args_line(line_info, state): | CODE |
| LOW | fire/docstrings.py | 577 | def _google_section_permitted(line_info, state): | CODE |
| LOW | fire/docstrings.py | 639 | def _section_from_possible_title(possible_title): | CODE |
| LOW | fire/docstrings.py | 751 | def _line_is_numpy_parameter_type(line_info): | CODE |
| LOW | fire/formatting_test.py | 37 | def test_indent_multiple_lines(self): | CODE |
| LOW⚡ | fire/formatting_test.py | 58 | def test_ellipsis_truncate_not_enough_space(self): | CODE |
| LOW⚡ | fire/formatting_test.py | 64 | def test_ellipsis_middle_truncate(self): | CODE |
| LOW⚡ | fire/formatting_test.py | 70 | def test_ellipsis_middle_truncate_not_enough_space(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/interact_test.py | 24 | CODE | |
| LOW | fire/test_components.py | 21 | CODE | |
| LOW | fire/__init__.py | 17 | CODE | |
| LOW | fire/formatting.py | 17 | CODE | |
| LOW | fire/test_components_py3.py | 17 | CODE | |
| LOW | fire/console/files.py | 18 | CODE | |
| LOW | fire/console/files.py | 19 | CODE | |
| LOW | fire/console/files.py | 20 | CODE | |
| LOW | fire/console/encoding.py | 19 | CODE | |
| LOW | fire/console/encoding.py | 20 | CODE | |
| LOW | fire/console/encoding.py | 21 | CODE | |
| LOW | fire/console/platforms.py | 18 | CODE | |
| LOW | fire/console/platforms.py | 19 | CODE | |
| LOW | fire/console/platforms.py | 20 | CODE | |
| LOW | fire/console/console_attr_os.py | 18 | CODE | |
| LOW | fire/console/console_attr_os.py | 19 | CODE | |
| LOW | fire/console/console_attr_os.py | 20 | CODE | |
| LOW | fire/console/console_pager.py | 18 | CODE | |
| LOW | fire/console/console_pager.py | 19 | CODE | |
| LOW | fire/console/console_pager.py | 20 | CODE | |
| LOW | fire/console/text.py | 17 | CODE | |
| LOW | fire/console/text.py | 18 | CODE | |
| LOW | fire/console/text.py | 19 | CODE | |
| LOW | fire/console/console_attr.py | 90 | CODE | |
| LOW | fire/console/console_attr.py | 91 | CODE | |
| LOW | fire/console/console_attr.py | 92 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/formatting_windows.py | 30 | CODE | |
| LOW | fire/completion.py | 479 | CODE | |
| LOW | fire/testutils.py | 71 | CODE | |
| LOW | fire/inspectutils.py | 49 | CODE | |
| LOW | fire/inspectutils.py | 87 | CODE | |
| LOW | fire/core.py | 239 | CODE | |
| LOW | fire/core.py | 361 | CODE | |
| LOW | fire/core.py | 763 | CODE | |
| LOW | fire/core.py | 822 | CODE | |
| LOW | fire/core.py | 965 | CODE | |
| LOW | fire/docstrings.py | 386 | CODE | |
| LOW | fire/docstrings.py | 411 | CODE | |
| LOW | fire/parser.py | 79 | CODE | |
| LOW | fire/helptext.py | 191 | CODE | |
| LOW | fire/helptext.py | 597 | CODE | |
| LOW | fire/console/console_io.py | 68 | CODE | |
| LOW | fire/console/platforms.py | 141 | CODE | |
| LOW | fire/console/platforms.py | 421 | CODE | |
| LOW | fire/console/console_attr_os.py | 158 | CODE | |
| LOW | fire/console/console_attr_os.py | 165 | CODE | |
| LOW | fire/console/console_pager.py | 169 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | fire/custom_descriptions_test.py | 44 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 44 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 56 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 56 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 62 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 62 | component = 'Lorem ipsum dolor sit amet' | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 65 | self.assertEqual(description, 'The string "Lorem ipsum dolor sit amet"') | CODE |
| LOW⚡ | fire/custom_descriptions_test.py | 65 | self.assertEqual(description, 'The string "Lorem ipsum dolor sit amet"') | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/core.py | 221 | # Check if --help would be consumed as a keyword argument, or is a member. | COMMENT |
| LOW | fire/helptext.py | 196 | # Check if positional args are allowed. If not, require flag syntax for args. | COMMENT |
| LOW | fire/helptext.py | 336 | # Check if positional args are allowed. If not, require flag syntax for args. | COMMENT |
| LOW | fire/helptext.py | 708 | # Check if positional args are allowed. If not, show flag syntax for args. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | fire/formatting_windows.py | 15 | """This module is used for enabling formatting on Windows.""" | STRING |
| MEDIUM | fire/console/platforms.py | 371 | # Create a new session with the new process the group leader. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/trace.py | 246 | CODE | |
| LOW | fire/core.py | 164 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/inspectutils.py | 109 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | fire/__init__.py | 19 | __all__ = ['Fire'] | CODE |