MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,766 in github.com/astral-sh/ruff

↓ 9 callersFunctiontest_helper
(source: &str, expected: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_return_statements.rs:106
↓ 9 callersFunctiontext
Creates a text from a dynamic string. This is done by allocating a new string internally.
crates/ruff_formatter/src/builders.rs:343
↓ 9 callersMethodtext_len
Returns the length of the indentation in bytes. # Panics If the indentation is longer than 4GB.
crates/ruff_python_formatter/src/string/docstring.rs:1731
↓ 9 callersMethodtruncated_display
Return a truncated snippet for user-facing display.
crates/ruff_linter/src/fix/snippet.rs:27
↓ 9 callersMethodtry_expression_type
(&self, expr: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder.rs:1089
↓ 9 callersMethodtry_set_optional_fix
( &mut self, func: impl FnOnce() -> anyhow::Result<Option<Fix>>, )
crates/ruff_linter/src/checkers/ast/mod.rs:3945
↓ 9 callersMethodtype_expression_flags
Get metadata for a type expression from the current inference result.
crates/ty_python_semantic/src/types/infer/builder.rs:1130
↓ 9 callersMethodtyping_importer
Create a [`TypingImporter`] that will import `member` from either `typing` or `typing_extensions`. On Python <`version_added_to_typing`, `member` is
crates/ruff_linter/src/checkers/ast/mod.rs:669
↓ 9 callersMethodvisit_type_definition
Visit an [`Expr`], and treat it as a type definition.
crates/ruff_linter/src/checkers/ast/mod.rs:2780
↓ 9 callersFunctionwalk_pattern
(visitor: &mut V, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:754
↓ 9 callersFunctionwalk_type_with_recursion_guard
( db: &'db dyn Db, ty: Type<'db>, visitor: &impl TypeVisitor<'db>, recursion_guard: &TypeColle
crates/ty_python_semantic/src/types/visitor.rs:362
↓ 9 callersMethodwarning
Override the output style for [warnings][crate::Level::WARNING]
crates/ruff_annotate_snippets/src/renderer/mod.rs:216
↓ 9 callersMethodwith_auto_import
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:172
↓ 9 callersMethodwith_disable_language_services
(mut self, disable_language_services: bool)
crates/ty_server/src/session/options.rs:157
↓ 9 callersMethodwith_optional_range
Returns a new `Span` with the given optional `range` attached to it.
crates/ruff_db/src/diagnostic/mod.rs:1237
↓ 9 callersMethodwrite_files
(&self, files: impl IntoIterator<Item = (SystemPathBuf, &'a str)>)
crates/ruff_db/src/system/os/ignore.rs:62
↓ 8 callersMethod__init__
(self, foo)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:332
↓ 8 callersMethodacknowledge_request
Acknowledge a successful server-to-client request.
crates/ty_server/tests/e2e/main.rs:618
↓ 8 callersMethodadd
Attempts to adds the given completion to this collection. When added, `true` is returned. This might not add the completion for a variety of reasons
crates/ty_ide/src/completion.rs:245
↓ 8 callersMethodadd
(x, y)
crates/ruff_linter/resources/test/fixtures/refurb/FURB118.py:47
↓ 8 callersFunctionadd_argument
Generic function to add arguments or keyword arguments to function calls. The new argument will be inserted before the first existing keyword argumen
crates/ruff_linter/src/fix/edits.rs:278
↓ 8 callersMethodadd_definition
Add a [`Definition`] associated with the `definition_node` AST node. ## Panics This method panics if `debug_assertions` are enabled and the `definit
crates/ty_python_core/src/builder.rs:1520
↓ 8 callersFunctionadd_type_expression_reference_link
( mut diag: LintDiagnosticGuard<'db, 'env>, )
crates/ty_python_semantic/src/types/diagnostic.rs:3975
↓ 8 callersMethodas_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:584
↓ 8 callersMethodas_enum_literal
(self)
crates/ty_python_semantic/src/types.rs:3353
↓ 8 callersMethodas_int_literal
(self)
crates/ty_python_semantic/src/types.rs:3327
↓ 8 callersMethodas_ipy_notebook
(&self)
crates/ruff_linter/src/source_kind.rs:34
↓ 8 callersMethodas_literal_value
(self)
crates/ty_python_semantic/src/types.rs:3214
↓ 8 callersMethodas_protocol_instance
(self)
crates/ty_python_semantic/src/types.rs:3192
↓ 8 callersMethodas_str
(&self)
crates/ruff_python_ast/src/name.rs:96
↓ 8 callersMethodas_str
(self)
crates/ty_python_semantic/src/types/diagnostic.rs:2611
↓ 8 callersMethodas_string
(self)
crates/ty_python_semantic/src/types/literal.rs:220
↓ 8 callersFunctionassert_revealed_type
(db: &TestDb, filename: &str, expected: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:81
↓ 8 callersFunctionassert_workspace_diagnostics_suspends_for_long_polling
( server: &mut TestServer, request_id: &lsp_server::RequestId, )
crates/ty_server/tests/e2e/pull_diagnostics.rs:1613
↓ 8 callersMethodat_offset
Searches the token(s) at `offset`. Returns [`TokenAt::Between`] if `offset` points directly inbetween two tokens (the left token ends at `offset` and
crates/ruff_python_ast/src/token/tokens.rs:92
↓ 8 callersMethodat_top_level
Return `true` if the model is at the top level of the module (i.e., in the module scope, and not nested within any statements).
crates/ruff_python_semantic/src/model.rs:1838
↓ 8 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured.rs:1100
↓ 8 callersMethodbind_self_with_receiver
Binds the receiver using its runtime type while using `typing_self_type` to replace occurrences of `typing.Self`. These differ for class methods: the
crates/ty_python_semantic/src/types/signatures.rs:471
↓ 8 callersMethodbindings
Returns a tuple of the name and ID of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:103
↓ 8 callersMethodbindings_iterator
( &'map self, bindings: &'map [LiveBinding], boundness_analysis: BoundnessAnalysis,
crates/ty_python_core/src/use_def.rs:1465
↓ 8 callersMethodblock_comments
Given a [`CommentRanges`], determine which comments are grouped together in "comment blocks". A "comment block" is a sequence of consecutive own-line
crates/ruff_python_trivia/src/comment_ranges.rs:157
↓ 8 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:3349
↓ 8 callersMethodcallable
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:81
↓ 8 callersMethodcallable_type_kind
Return the kind for this function when it is converted into a [`CallableType`].
crates/ty_python_semantic/src/types/function.rs:2060
↓ 8 callersFunctioncheck_display_graph
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, set: ConstraintSet<'db, 'c>
crates/ty_python_semantic/src/types/constraints.rs:6770
↓ 8 callersMethodcheck_types
Check types for all bindings in this constructor. Provisional checks preserve downstream constructors. Final checks discard inactive ones.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:222
↓ 8 callersMethodclass_member
Look up a class-level member by iterating through the MRO.
crates/ty_python_semantic/src/types/class.rs:757
↓ 8 callersMethodclass_method
(cls)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N804.py:17
↓ 8 callersMethodclear_salsa_events
Clears the salsa events.
crates/ty_module_resolver/src/db.rs:84
↓ 8 callersMethodclone
(&self)
crates/ruff_unicode_names2/src/lib.rs:114
↓ 8 callersMethodcmp
(&self, other: &Self)
crates/ruff_source_file/src/lib.rs:189
↓ 8 callersMethodcode
(&self)
crates/ruff_benchmark/src/lib.rs:62
↓ 8 callersMethodcontains_inclusive
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:184
↓ 8 callersMethodcurrent_exception_context_stack
Retrieve the [`ExceptionContextStack`] that is relevant for the current scope.
crates/ty_python_core/src/builder/except_handlers.rs:221
↓ 8 callersMethodcurrent_place_table
(&self)
crates/ty_python_core/src/builder.rs:1068
↓ 8 callersMethodcurrent_statement_id
Return the [`NodeId`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1549
↓ 8 callersMethoddataclass_params
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:218
↓ 8 callersMethoddeprecated_properties
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1138
↓ 8 callersFunctiondeserialize
()
crates/ruff_workspace/src/pyproject.rs:288
↓ 8 callersFunctiondeserialize_fixture
(content: &str)
crates/ruff_server/src/session/options.rs:520
↓ 8 callersMethoddocument_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:791
↓ 8 callersFunctiondocument_symbols
Get all document symbols for a file with the given options.
crates/ty_ide/src/document_symbols.rs:6
↓ 8 callersMethoddownstream_constructor
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:305
↓ 8 callersMethodeat_char
(&mut self, c: char)
crates/ruff_python_parser/src/lexer/cursor.rs:104
↓ 8 callersFunctionempty_line
()
crates/ruff_formatter/src/builders.rs:133
↓ 8 callersMethodenable_diagnostic_dynamic_registration
Enable or disable dynamic registration of diagnostics capability
crates/ty_server/tests/e2e/main.rs:1458
↓ 8 callersMethodend_of_scope_bindings
( &self, place: ScopedPlaceId, )
crates/ty_python_core/src/use_def.rs:1212
↓ 8 callersMethodenter
Returns the type bound from a context manager with type `self`. This method should only be used outside of type checking because it omits any errors.
crates/ty_python_semantic/src/types/context_manager.rs:156
↓ 8 callersMethodenter_string_annotation
Given a string expression, determine if it's a string annotation, and if it is, yield the parsed sub-AST and a sub-model that knows it's analyzing a s
crates/ty_python_semantic/src/semantic_model.rs:592
↓ 8 callersMethoderror
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:58
↓ 8 callersMethodevaluate
Evaluate a comparison recursively, treating `left` as the operand being constrained. For example, proving that every constraint of `EQUAL_VALUES` com
crates/ty_python_semantic/src/types/equality.rs:579
↓ 8 callersFunctionexactly_one_argument_with_matching_function
( name: &str, func: &Expr, args: &'a [Expr], keywords: &[Keyword], )
crates/ruff_linter/src/rules/flake8_comprehensions/helpers.rs:3
↓ 8 callersMethodexecution_context
Return the [`ExecutionContext`] of the current scope.
crates/ruff_python_semantic/src/model.rs:2110
↓ 8 callersMethodexpand_top_level_aliases
Resolve outermost aliases and expand aliases that expose top-level union elements. Aliases nested inside non-union types remain unexpanded.
crates/ty_python_semantic/src/types.rs:3119
↓ 8 callersMethodexpect_function
(&self)
crates/ty_python_core/src/scope.rs:433
↓ 8 callersMethodextend_back
(&mut self, elements: &'a [FormatElement])
crates/ruff_formatter/src/printer/queue.rs:105
↓ 8 callersMethodextra
(&self)
crates/ty_python_core/src/use_def.rs:1045
↓ 8 callersFunctionextract
(metadata: &Value)
crates/ty_project/src/uv/metadata/dependencies.rs:416
↓ 8 callersFunctionextract_fixed_length_iterable_element_types
Extract the element types from an expression with a statically known fixed-length iteration. List and tuple literals are expanded directly so we pres
crates/ty_python_semantic/src/types/iteration.rs:136
↓ 8 callersFunctionf
(*args, **kwargs)
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py:4
↓ 8 callersMethodfile_range
(&self)
crates/ty_ide/src/lib.rs:96
↓ 8 callersMethodfile_stem
(&self)
crates/ruff_db/src/system/path.rs:304
↓ 8 callersMethodfile_type
(&self)
crates/ruff_db/src/system.rs:321
↓ 8 callersMethodfind_first
Finds the first node that fully covers the range and fulfills the given predicate. The "first" here means that the node closest to a leaf is returned
crates/ruff_python_ast/src/find_node.rs:90
↓ 8 callersMethodfind_legacy_typevars
Locates any legacy `TypeVar`s in this type, and adds them to a set. This is used to build up a generic context from any legacy `TypeVar`s that appear
crates/ty_python_semantic/src/types.rs:10411
↓ 8 callersFunctionfind_newline
(text: &str)
crates/ruff_source_file/src/newlines.rs:58
↓ 8 callersMethodfinish
Finish the code example by generating any final actions if applicable. This typically adds an action when the end of a code example coincides with th
crates/ruff_python_formatter/src/string/docstring.rs:743
↓ 8 callersMethodfix_applicability
The lowest fix applicability to show when rendering.
crates/ruff_db/src/diagnostic/render.rs:2606
↓ 8 callersMethodflip
Flips the polarity of the variance. Covariant becomes contravariant, contravariant becomes covariant, others remain unchanged.
crates/ty_python_semantic/src/types/variance.rs:175
↓ 8 callersMethodflush_pending_line
Flushes content buffered for the current line.
crates/ty_ide/src/docstring/markdown/general.rs:308
↓ 8 callersMethodfmt
(&self, item: &Identifier, f: &mut PyFormatter)
crates/ruff_python_formatter/src/other/identifier.rs:11
↓ 8 callersFunctionformat
( document: &TextDocument, source_type: SourceType, formatter_settings: &FormatterSettings, pa
crates/ruff_server/src/format.rs:47
↓ 8 callersMethodformat
(&self)
crates/ruff_python_formatter/src/statement/mod.rs:74
↓ 8 callersMethodformat
(&self, file_id: &FileHandle)
crates/ty_wasm/src/lib.rs:298
↓ 8 callersMethodformatted
Converts every item to an object that knows how to format it.
crates/ruff_python_formatter/src/shared_traits.rs:70
↓ 8 callersMethodfull_end
(&self)
crates/ruff_source_file/src/newlines.rs:217
↓ 8 callersMethodfull_line_range
Computes the range of this `offset`s line. The range starts at the beginning of the line and goes up to, and including, the new line character at the
crates/ruff_source_file/src/line_ranges.rs:98
↓ 8 callersMethodfull_lines_range
Computes the range of all lines that this `range` covers. The range starts at the beginning of the line at `range.start()` and goes up to, and includ
crates/ruff_source_file/src/line_ranges.rs:193
↓ 8 callersFunctionfunction_known_decorators
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:321
↓ 8 callersMethodfunction_like_kind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:25
← previousnext →1,801–1,900 of 31,766, ranked by callers