MCPcopy Create free account

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

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

↓ 14 callersMethodwith_signatures
Replace the signatures without losing binding behavior or deprecation metadata.
crates/ty_python_semantic/src/types/callable.rs:796
↓ 14 callersMethodwithout_paramspec_attr
Returns a new bound typevar instance without any `ParamSpec` attribute set. This method will also remove any upper bound that was set by `with_params
crates/ty_python_semantic/src/types/typevar.rs:1203
↓ 13 callersMethodadd_and_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:362
↓ 13 callersMethodadd_pair_implication
( &mut self, ante1: AtomicConstraint<'db>, ante2: AtomicConstraint<'db>, post:
crates/ty_python_semantic/src/types/constraints/sequents.rs:336
↓ 13 callersMethodall_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:995
↓ 13 callersMethodapply_optional_specialization
Applies an optional specialization to this specialization.
crates/ty_python_semantic/src/types/generics.rs:1528
↓ 13 callersMethodas_any_import
(&self)
crates/ruff_python_semantic/src/binding.rs:302
↓ 13 callersMethodas_expr_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1139
↓ 13 callersMethodas_ref
(&self)
crates/ruff_db/src/files/path.rs:106
↓ 13 callersMethodas_str
(&self)
crates/ruff_db/src/diagnostic/render/sarif.rs:186
↓ 13 callersMethodas_typed_dict
(self)
crates/ty_python_semantic/src/types.rs:3233
↓ 13 callersMethodassert_reverse_tokenization
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:15
↓ 13 callersMethodat_expr
Returns `true` if the current token is the start of an expression.
crates/ruff_python_parser/src/parser/expression.rs:136
↓ 13 callersMethodat_ts
Returns `true` if the current token is found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:673
↓ 13 callersMethodbinding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:414
↓ 13 callersMethodbinding_ids
Returns the IDs of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:98
↓ 13 callersMethodcollect_vec
Walks the project paths and collects the paths of all files that are included in the project. The file-walk callback uses a cloned database. Salsa qu
crates/ty_project/src/walk.rs:154
↓ 13 callersMethodconfig
(mut self, config: &'a Path)
crates/ruff/tests/integration_test.rs:45
↓ 13 callersMethodcurrent_directory
(&self)
crates/ty_test/src/db.rs:570
↓ 13 callersMethodencoding
(&self)
crates/ruff_server/src/session.rs:200
↓ 13 callersMethodentries
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:190
↓ 13 callersMethodenum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:756
↓ 13 callersMethodenum_class_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:412
↓ 13 callersFunctionerror
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT022.py:15
↓ 13 callersMethoderror
Return the underlying [`ParseError`].
crates/ruff_linter/src/logging.rs:232
↓ 13 callersMethodexpect_ty_file
Returns the [`File`] attached to this [`Span`]. Panics if the file is a [`UnifiedFile::Ruff`] instead of a [`UnifiedFile::Ty`].
crates/ruff_db/src/diagnostic/mod.rs:1273
↓ 13 callersMethodexplicit_bases
Return an iterator over the inferred types of this class's *explicit* bases. Note that any class (except for `object`) that has no explicit bases wil
crates/ty_python_semantic/src/types/class/static_literal.rs:709
↓ 13 callersMethodfile
Returns the `UnifiedFile` attached to this `Span`.
crates/ruff_db/src/diagnostic/mod.rs:1247
↓ 13 callersMethodfile
(self, db: &dyn Db)
crates/ty_python_core/src/scope.rs:26
↓ 13 callersMethodfile_type
Returns the entry's file type without following symlinks.
crates/ty_module_resolver/src/path.rs:483
↓ 13 callersMethodfilter_union
If the type is a union (or a type alias that resolves to a union), filters union elements based on the provided predicate. Aliases among the elements
crates/ty_python_semantic/src/types.rs:3654
↓ 13 callersFunctionfoo
(a, b)
crates/ruff_linter/resources/test/fixtures/ruff/RUF069.py:18
↓ 13 callersMethodget
Return parameter at given index, or `None` if index is out-of-range.
crates/ty_python_semantic/src/types/signatures.rs:5769
↓ 13 callersMethodincludes
Returns `true` if the string list of `codes` includes `code` (or an alias thereof).
crates/ruff_linter/src/noqa.rs:135
↓ 13 callersFunctioninfer_complete_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:499
↓ 13 callersMethodinto_type_var
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:187
↓ 13 callersMethodinto_uri
Converts the key back into its original URI.
crates/ruff_server/src/edit.rs:55
↓ 13 callersFunctioninto_vec
(assertions: InlineFileAssertions<'_>)
crates/mdtest/src/assertion.rs:567
↓ 13 callersMethodis_declared
(self)
crates/ty_python_semantic/src/place.rs:67
↓ 13 callersMethodis_definitely_bound
(&self)
crates/ty_python_semantic/src/place.rs:392
↓ 13 callersMethodis_empty
(&self)
crates/ruff_linter/src/noqa.rs:341
↓ 13 callersMethodis_final
Returns whether this class is final.
crates/ty_python_semantic/src/types/class.rs:900
↓ 13 callersMethodis_instance_of
Return `true` if `self` is a nominal instance of the given known class.
crates/ty_python_semantic/src/types/instance.rs:149
↓ 13 callersMethodis_keyword
(self)
crates/ruff_python_ast/src/token.rs:359
↓ 13 callersFunctionis_override
Returns `true` if a function definition is an `@override` (PEP 698).
crates/ruff_python_semantic/src/analyze/visibility.rs:37
↓ 13 callersMethodis_required
(&self)
crates/ty_python_semantic/src/types/class.rs:2793
↓ 13 callersMethodis_subtype_of_class_literal
Return `true` if this class is a subtype of (any specialization of) `class_literal`.
crates/ty_python_semantic/src/types/class.rs:1342
↓ 13 callersMethodis_type_var
(self)
crates/ty_python_semantic/src/types/typevar.rs:39
↓ 13 callersMethoditem
Returns the field exposed by a literal key. Undeclared keys synthesize a field only for explicit extra items. Hidden items on an implicitly open `Typ
crates/ty_python_semantic/src/types/typed_dict.rs:414
↓ 13 callersMethoditer_prefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1229
↓ 13 callersFunctionknown_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints.rs:5263
↓ 13 callersMethodlen
(&self)
crates/ty_server/src/server/schedule/thread/pool.rs:133
↓ 13 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5732
↓ 13 callersMethodline_starts
Returns the [byte offsets](TextSize) for every line
crates/ruff_source_file/src/line_index.rs:533
↓ 13 callersMethodlookup_symbol
Lookup a symbol in the current scope without materializing lazy builtins.
crates/ruff_python_semantic/src/model.rs:834
↓ 13 callersMethodname
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:371
↓ 13 callersMethodnormalize_path
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:371
↓ 13 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ruff_server/tests/e2e/main.rs:690
↓ 13 callersMethodopener_len
The total length of the string's opener, i.e., the length of the prefixes plus the length of the quotes used to open the string.
crates/ruff_python_ast/src/nodes.rs:1014
↓ 13 callersFunctionparameter_documentation
Returns the parameter documentation recognized in a reST docstring. `normalized_source` must have already undergone PEP-257 trimming and universal ne
crates/ty_ide/src/docstring/document/rst.rs:38
↓ 13 callersMethodparse_conditional_expression_or_higher
Parses every Python expression except unparenthesized tuple and named expressions. Matches the `expression` rule in the [Python grammar]. This uses
crates/ruff_python_parser/src/parser/expression.rs:204
↓ 13 callersMethodpop
(&mut self)
crates/ruff_formatter/src/printer/stack.rs:14
↓ 13 callersMethodprimary_annotation
Returns a shared borrow of the "primary" annotation of this diagnostic if one exists. When there are multiple primary annotations, then the first one
crates/ruff_db/src/diagnostic/mod.rs:299
↓ 13 callersMethodprogram_settings
(&self)
crates/ty_python_core/src/db.rs:124
↓ 13 callersMethodpush
(&mut self, line_number: OneIndexed, messages: Vec<Failure>)
crates/mdtest/src/matcher.rs:43
↓ 13 callersMethodquery
Loads this constraint set into a new builder, invokes a callback with that builder, and returns the result. This is more efficient than [`ConstraintS
crates/ty_python_semantic/src/types/constraints.rs:325
↓ 13 callersMethodrange
(&self)
crates/ruff_python_formatter/src/lib.rs:115
↓ 13 callersMethodremove
Removes `rule` from the set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let mut set = RuleSet::from_rules(&[Rule::AmbiguousFun
crates/ruff_linter/src/registry/rule_set.rs:229
↓ 13 callersMethodresolve_member
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:392
↓ 13 callersMethodresolved_client_capabilities
Returns the resolved client capabilities that were captured during initialization.
crates/ty_server/src/session.rs:1548
↓ 13 callersMethodreturn_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:11171
↓ 13 callersMethodroot
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:367
↓ 13 callersMethodroot
Returns the path to the test directory root.
crates/ruff/tests/cli/main.rs:179
↓ 13 callersMethodrun
(self)
crates/ty_site_packages/src/lib.rs:2571
↓ 13 callersMethodsecondary_code
Returns the secondary code for the diagnostic if it exists. The "primary" code for the diagnostic is its lint name. Diagnostics in ty don't have seco
crates/ruff_db/src/diagnostic/mod.rs:450
↓ 13 callersMethodset
(&mut self, name: impl Into<String>, value: impl Into<String>)
crates/ruff_db/src/system/command.rs:131
↓ 13 callersMethodskip_bytes
(&mut self, count: usize)
crates/ruff_python_trivia/src/cursor.rs:187
↓ 13 callersMethodsnapshot
Generate a [`Snapshot`] of the current semantic model.
crates/ruff_python_semantic/src/model.rs:2054
↓ 13 callersFunctionspace
()
crates/ruff_formatter/src/builders.rs:664
↓ 13 callersMethodspeculate
Returns a fresh [`TypeInferenceBuilder`] for the current scope that can be used to speculatively infer expressions during multi-inference. The infere
crates/ty_python_semantic/src/types/infer/builder.rs:12645
↓ 13 callersFunctionsuffixed_err
Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.
crates/ruff_benchmark/resources/tomllib/_parser.py:652
↓ 13 callersMethodto_zero_indexed
Return the zero-indexed primitive value for this [`OneIndexed`]
crates/ruff_source_file/src/line_index.rs:604
↓ 13 callersFunctionuv_sync_command
( case: &CliTest, virtual_env: Option<&Path>, )
crates/ty/tests/cli/uv_workspace.rs:70
↓ 13 callersFunctionwalk_body
(visitor: &mut V, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:119
↓ 13 callersMethodwith_extension
(&self, extension: &str)
crates/ruff_db/src/system/path.rs:379
↓ 12 callersMethodadd_atom
(&mut self, predicate: ScopedPredicateId)
crates/ty_python_core/src/narrowing_constraints.rs:238
↓ 12 callersMethodas_char
(self)
crates/ruff_python_ast/src/str.rs:20
↓ 12 callersMethodas_fixed_length
Returns the inner fixed-length tuple if this is a `Tuple::Fixed` variant.
crates/ty_python_semantic/src/types/tuple.rs:2528
↓ 12 callersMethodas_str
(&self)
crates/ruff_db/src/diagnostic/mod.rs:943
↓ 12 callersMethodas_str
(self)
crates/ruff_linter/src/rules/refurb/rules/sorted_min_max.rs:220
↓ 12 callersMethodas_u32
(self)
crates/ty_python_core/src/reachability_constraints.rs:109
↓ 12 callersFunctionassert_example
(target: &str, expected: snapbox::Data)
crates/ruff_annotate_snippets/tests/examples.rs:88
↓ 12 callersFunctionassert_function_query_was_run
Assert that the Salsa query described by the generic parameter `C` was executed at least once with the input `input` in the history span represented b
crates/ruff_db/src/testing.rs:86
↓ 12 callersMethodbinary_search
(&self, value: &T)
crates/ruff_index/src/slice.rs:121
↓ 12 callersMethodbindings
(&self)
crates/ty_python_core/src/use_def/place_state.rs:763
↓ 12 callersMethodbool
Resolves the boolean value of the type and falls back to [`Truthiness::Ambiguous`] if the type doesn't implement `__bool__` correctly. This method sh
crates/ty_python_semantic/src/types/bool.rs:25
↓ 12 callersMethodbuild
(self)
crates/ruff_db/src/testing.rs:202
↓ 12 callersMethodbuild_inference_with
Build correlated type-variable inference, preserving missing evidence and incomplete solutions. The hook must retain whether an override is only a fal
crates/ty_python_semantic/src/types/generics.rs:2890
↓ 12 callersMethodcallable_type
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1501
↓ 12 callersMethodchange_workspace_folders
Send a `workspace/didChangeWorkspaceFolders` notification with the given added/removed workspace folders. The paths provided should be paths to the ro
crates/ty_server/tests/e2e/main.rs:968
← previousnext →1,201–1,300 of 31,562, ranked by callers