Skip to content

libcst 1.8.6

Version history | Download JSON

  • PyPI https://pypi.org/project/libcst/
    Repository https://github.com/Instagram/LibCST

  • py.typed

  • Coverage


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "Typed" : 2267
        "Any" : 10
        "Untyped" : 19
    • 99.2% coverage
    • 98.7% coverage (strict)
    • 2296 typable
      • 2267 typed
      • 19 untyped
      • 10 Any
  • Typables


    %%{init: {"pie": {"textPosition": 0.85}, "theme": "neutral", "themeVariables": {"pieStrokeWidth": "1px"}}}%%
    pie title
        "functions" : 210
        "classes" : 1902
        "other" : 31
    • 65 functions (+0 overloads)
      • 145 parameters
    • 540 classes
      • 886 methods (+1 overloads)
        • 948 parameters
      • 59 properties
    • 86 modules
      • 31 attrs

Modules

Module Coverage Coverage (strict) Typables Ignores
libcst 0.0% 0.0% 0 0
libcst._batched_visitor 100.0% 100.0% 6 0
libcst._exceptions 100.0% 100.0% 15 0
libcst._flatten_sentinel 100.0% 100.0% 6 0
libcst._maybe_sentinel 100.0% 100.0% 1 0
libcst._metadata_dependent 100.0% 100.0% 10 0
libcst._nodes.base 100.0% 86.5% 37 0
libcst._nodes.expression 100.0% 100.0% 340 0
libcst._nodes.module 100.0% 100.0% 13 0
libcst._nodes.op 100.0% 100.0% 58 0
libcst._nodes.statement 100.0% 100.0% 321 0
libcst._nodes.whitespace 100.0% 100.0% 20 0
libcst._parser.entrypoints 100.0% 100.0% 9 0
libcst._parser.types.config 100.0% 100.0% 2 0
libcst._position 100.0% 100.0% 3 0
libcst._removal_sentinel 100.0% 100.0% 1 0
libcst._types 0.0% 0.0% 0 0
libcst._visitors 100.0% 100.0% 22 0
libcst.codegen.gather 100.0% 100.0% 6 0
libcst.codegen.gen_matcher_classes 97.7% 97.7% 43 0
libcst.codegen.gen_type_mapping 100.0% 100.0% 4 0
libcst.codegen.gen_visitor_functions 100.0% 100.0% 4 0
libcst.codegen.generate 100.0% 100.0% 9 0
libcst.codegen.transforms 100.0% 100.0% 6 0
libcst.codemod._cli 100.0% 100.0% 33 0
libcst.codemod._codemod 100.0% 100.0% 13 0
libcst.codemod._command 100.0% 100.0% 18 0
libcst.codemod._context 100.0% 100.0% 1 0
libcst.codemod._runner 100.0% 100.0% 5 0
libcst.codemod._testing 0.0% 0.0% 0 0
libcst.codemod._visitor 90.9% 90.9% 11 0
libcst.codemod.commands.add_pyre_directive 92.3% 92.3% 13 0
libcst.codemod.commands.add_trailing_commas 100.0% 100.0% 17 0
libcst.codemod.commands.convert_format_to_fstring 93.9% 93.9% 33 0
libcst.codemod.commands.convert_namedtuple_to_dataclass 100.0% 100.0% 6 0
libcst.codemod.commands.convert_percent_format_to_fstring 90.0% 90.0% 10 0
libcst.codemod.commands.convert_type_comments 100.0% 100.0% 73 0
libcst.codemod.commands.convert_union_to_or 100.0% 100.0% 7 0
libcst.codemod.commands.ensure_import_present 100.0% 100.0% 4 0
libcst.codemod.commands.fix_pyre_directives 100.0% 100.0% 17 0
libcst.codemod.commands.fix_variadic_callable 100.0% 100.0% 4 0
libcst.codemod.commands.noop 100.0% 100.0% 3 0
libcst.codemod.commands.remove_pyre_directive 100.0% 100.0% 10 0
libcst.codemod.commands.remove_unused_imports 100.0% 100.0% 12 0
libcst.codemod.commands.rename 100.0% 100.0% 48 0
libcst.codemod.commands.rename_typing_generic_aliases 100.0% 100.0% 3 0
libcst.codemod.commands.strip_strings_from_types 100.0% 100.0% 4 0
libcst.codemod.commands.unnecessary_format_string 100.0% 100.0% 4 0
libcst.codemod.visitors._add_imports 100.0% 100.0% 29 0
libcst.codemod.visitors._apply_type_annotations 94.3% 94.3% 88 0
libcst.codemod.visitors._gather_comments 100.0% 100.0% 10 0
libcst.codemod.visitors._gather_exports 100.0% 100.0% 30 0
libcst.codemod.visitors._gather_global_names 100.0% 100.0% 18 0
libcst.codemod.visitors._gather_imports 100.0% 100.0% 7 0
libcst.codemod.visitors._gather_string_annotation_names 100.0% 100.0% 20 0
libcst.codemod.visitors._gather_unused_imports 100.0% 100.0% 21 0
libcst.codemod.visitors._imports 100.0% 100.0% 4 0
libcst.codemod.visitors._remove_imports 100.0% 100.0% 28 0
libcst.display.graphviz 100.0% 100.0% 6 0
libcst.display.text 100.0% 100.0% 6 0
libcst.helpers._template 100.0% 100.0% 12 0
libcst.helpers.common 100.0% 100.0% 3 0
libcst.helpers.expression 100.0% 100.0% 4 0
libcst.helpers.matchers 100.0% 100.0% 3 0
libcst.helpers.module 100.0% 100.0% 27 0
libcst.helpers.node_fields 100.0% 100.0% 18 0
libcst.helpers.paths 100.0% 100.0% 2 0
libcst.matchers 0.0% 0.0% 0 0
libcst.matchers._decorators 100.0% 100.0% 8 0
libcst.matchers._matcher_base 100.0% 100.0% 124 0
libcst.matchers._visitors 96.9% 96.9% 65 0
libcst.metadata.accessor_provider 100.0% 100.0% 2 0
libcst.metadata.base_provider 95.5% 95.5% 22 0
libcst.metadata.expression_context_provider 95.1% 95.1% 41 0
libcst.metadata.file_path_provider 100.0% 88.9% 9 0
libcst.metadata.full_repo_manager 100.0% 100.0% 13 0
libcst.metadata.name_provider 92.3% 89.7% 39 0
libcst.metadata.parent_node_provider 100.0% 100.0% 7 0
libcst.metadata.position_provider 100.0% 100.0% 18 0
libcst.metadata.reentrant_codegen 100.0% 100.0% 16 0
libcst.metadata.scope_provider 100.0% 100.0% 233 0
libcst.metadata.span_provider 100.0% 100.0% 17 0
libcst.metadata.type_inference_provider 100.0% 93.8% 16 0
libcst.metadata.wrapper 100.0% 100.0% 19 0
libcst.testing.utils 100.0% 91.3% 23 0
libcst.tool 100.0% 100.0% 3 0

Incomplete Annotations

libcst._nodes.base (0 missing, 5 any)

Symbol Typable Typed Any
meth CSTNode.init_subclass 2 2 1
meth CSTNode._codegen 3 3 1
meth CSTNode.with_changes 2 2 1
meth CSTNode.with_deep_changes 3 3 1
meth CSTNode.field 3 3 1

libcst.codegen.gen_matcher_classes (1 missing, 0 any)

Symbol Typable Typed Any
attr node_fields 1 0 0

libcst.codemod._visitor (1 missing, 0 any)

Symbol Typable Typed Any
attr ContextAwareVisitor.context 1 0 0

libcst.codemod.commands.add_pyre_directive (1 missing, 0 any)

Symbol Typable Typed Any
attr AddPyreDirectiveCommand.needs_add 1 0 0

libcst.codemod.commands.convert_format_to_fstring (2 missing, 0 any)

Symbol Typable Typed Any
attr ConvertFormatStringCommand.allow_strip_comments 1 0 0
attr ConvertFormatStringCommand.allow_await 1 0 0

libcst.codemod.commands.convert_percent_format_to_fstring (1 missing, 0 any)

Symbol Typable Typed Any
attr EscapeStringQuote.quote 1 0 0

libcst.codemod.visitors._apply_type_annotations (5 missing, 0 any)

Symbol Typable Typed Any
attr ApplyTypeAnnotationsVisitor.overwrite_existing_annotations 1 0 0
attr ApplyTypeAnnotationsVisitor.use_future_annotations 1 0 0
attr ApplyTypeAnnotationsVisitor.strict_posargs_matching 1 0 0
attr ApplyTypeAnnotationsVisitor.strict_annotation_matching 1 0 0
attr ApplyTypeAnnotationsVisitor.always_qualify_annotations 1 0 0

libcst.matchers._visitors (2 missing, 0 any)

Symbol Typable Typed Any
attr MatchDecoratorMismatch.func 1 0 0
attr MatchDecoratorMismatch.message 1 0 0

libcst.metadata.base_provider (1 missing, 0 any)

Symbol Typable Typed Any
attr BaseMetadataProvider.cache 1 0 0

libcst.metadata.expression_context_provider (2 missing, 0 any)

Symbol Typable Typed Any
attr ExpressionContextVisitor.provider 1 0 0
attr ExpressionContextVisitor.context 1 0 0

libcst.metadata.file_path_provider (0 missing, 1 any)

Symbol Typable Typed Any
meth FilePathProvider.gen_cache 4 4 1

libcst.metadata.name_provider (3 missing, 1 any)

Symbol Typable Typed Any
meth FullyQualifiedNameProvider.gen_cache 5 5 1
attr FullyQualifiedNameVisitor.module_name 1 0 0
attr FullyQualifiedNameVisitor.package_name 1 0 0
attr FullyQualifiedNameVisitor.provider 1 0 0

libcst.metadata.type_inference_provider (0 missing, 1 any)

Symbol Typable Typed Any
meth TypeInferenceProvider.gen_cache 5 5 1

libcst.testing.utils (0 missing, 2 any)

Symbol Typable Typed Any
func try_get_provider_attr 4 4 1
func update_test_limit 3 3 1

Type-Ignore Comments

No type-ignore comments.