MCPcopy Create free account

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

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

↓ 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:3354
↓ 8 callersMethodas_int_literal
(self)
crates/ty_python_semantic/src/types.rs:3328
↓ 8 callersMethodas_ipy_notebook
(&self)
crates/ruff_linter/src/source_kind.rs:34
↓ 8 callersMethodas_protocol_instance
(self)
crates/ty_python_semantic/src/types.rs:3193
↓ 8 callersMethodas_str
(&self)
crates/ruff_python_ast/src/name.rs:96
↓ 8 callersMethodas_str
(self)
crates/ty_python_semantic/src/types/diagnostic.rs:2559
↓ 8 callersMethodas_string
(self)
crates/ty_python_semantic/src/types/literal.rs:205
↓ 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:1579
↓ 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:1809
↓ 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:501
↓ 8 callersMethodbinding_type
Return the inferred binding type. A missing entry is `Never` when the whole pattern cannot match. Otherwise, it is `Unknown` as defensive recovery fo
crates/ty_python_semantic/src/types/narrow.rs:233
↓ 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:3335
↓ 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:6657
↓ 8 callersMethodcheck_types
Check types for all bindings in this constructor. If `CheckTypesMode::Finalize` is provided, inactive downstream constructors will be discarded. Othe
crates/ty_python_semantic/src/types/call/bind/constructor.rs:223
↓ 8 callersMethodclass_literal
Returns the class literal for this instance.
crates/ty_python_semantic/src/types/instance.rs:253
↓ 8 callersMethodclass_member
Look up a class-level member by iterating through the MRO.
crates/ty_python_semantic/src/types/class.rs:738
↓ 8 callersMethodclass_member
Look up a class-level member by name (including superclasses).
crates/ty_python_semantic/src/types/class/typed_dict.rs:1021
↓ 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 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:1520
↓ 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:1137
↓ 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 callersMethoddomain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1119
↓ 8 callersMethoddownstream_constructor
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:325
↓ 8 callersMethoddownstream_constructor_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:329
↓ 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:1451
↓ 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 callersMethodenvironment
(&self)
crates/ty_project/src/uv/metadata.rs:41
↓ 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:2081
↓ 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:3120
↓ 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:419
↓ 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:10351
↓ 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:2577
↓ 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:322
↓ 8 callersMethodfunction_like_kind
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:25
↓ 8 callersMethodgenerate
(self)
crates/ruff_python_codegen/src/generator.rs:238
↓ 8 callersMethodget
(&self, item: &T)
crates/ty_python_semantic/src/types/cyclic.rs:1153
↓ 8 callersFunctionget_function_f
(db: &'db TestDb, file: &'static str)
crates/ty_python_semantic/src/types/signatures.rs:6750
↓ 8 callersMethodget_or_infer_expression
Return an already-inferred type for `expr`, or infer it with `tcx` if needed. This is used in places where an expression may already have been inferr
crates/ty_python_semantic/src/types/infer/builder.rs:1090
↓ 8 callersFunctionget_redirect_target
Returns the redirect target for a rule code, prefix, or name.
crates/ruff_linter/src/rule_redirects.rs:7
↓ 8 callersMethodglobal_scope
Returns a reference to the global [`Scope`].
crates/ruff_python_semantic/src/model.rs:1530
↓ 8 callersMethodhas_default
Returns whether this parameter has a default without inferring its type.
crates/ty_python_semantic/src/types/signatures.rs:6477
↓ 8 callersMethodhas_valid_syntax
Returns `true` if the parsed source code is valid i.e., it has no [`ParseError`]s. Note that this does not include version-related [`UnsupportedSynta
crates/ruff_python_parser/src/lib.rs:438
↓ 8 callersMethodid
(self)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A001.py:38
↓ 8 callersMethodimport
Create a new `ImportRequest` from a module and member. If not present in the scope, the symbol should be imported using the "import" statement.
crates/ruff_linter/src/importer/mod.rs:630
↓ 8 callersMethodincludes_member
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types/protocol_class.rs:524
↓ 8 callersFunctionindentation
Calculates indentation width, advancing tabs to the next multiple of eight columns.
crates/ty_ide/src/docstring/document/syntax.rs:626
↓ 8 callersMethodindex
Returns a reference to the contained index. # Panics Panics if the index is `None`.
crates/ty_server/src/system.rs:119
↓ 8 callersMethodinfer_collection_literal
Infer the type of a collection literal expression.
crates/ty_python_semantic/src/types/infer/builder.rs:7895
↓ 8 callersMethodintern_typevar
Interns a single typevar, giving it a stable order in this builder
crates/ty_python_semantic/src/types/constraints.rs:1285
↓ 8 callersMethodinto_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:709
↓ 8 callersMethodis_
(self, key: Key, flag: int)
crates/ruff_benchmark/resources/tomllib/_parser.py:175
↓ 8 callersFunctionis_cased_uppercase
Return `true` if a string is _cased_ as uppercase. A string is cased as uppercase if it contains at least one uppercase character and no lowercase ch
crates/ruff_python_stdlib/src/str.rs:129
↓ 8 callersMethodis_defined_and
(self, f: impl Fn(Definition<'db>) -> bool)
crates/ty_python_core/src/definition.rs:323
← previousnext →1,801–1,900 of 31,562, ranked by callers