MCPcopy Create free account

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

Functions27,349 in github.com/astral-sh/ruff

↓ 14 callersFunctionimport_from
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:52
↓ 14 callersMethodin_range
Returns a slice of [`Token`] that are within the given `range`. The start and end offset of the given range should be either: 1. Token boundary 2. Ga
crates/ruff_python_ast/src/token/tokens.rs:82
↓ 14 callersMethodinto_iter
(self)
crates/ty_project/src/lib.rs:785
↓ 14 callersMethodinto_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:37
↓ 14 callersMethodis_disjoint_from
Return true if `self & other` should simplify to `Never`: if the intersection of the two types could never be inhabited by any possible runtime value.
crates/ty_python_semantic/src/types/relation.rs:682
↓ 14 callersMethodis_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callersMethodis_empty
(&self)
crates/ty_python_core/src/rank.rs:74
↓ 14 callersMethodis_file
(self)
crates/ty_project/src/watch.rs:162
↓ 14 callersMethodis_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:513
↓ 14 callersMethodis_keyword_variadic
Returns `true` if this is a keyword-variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:4284
↓ 14 callersMethodis_raw
Return true if this prefix indicates a "raw f-string", e.g. `rf"{bar}"` or `Rf"{bar}"`
crates/ruff_python_ast/src/str_prefix.rs:83
↓ 14 callersMethodlocal_range
Returns the range within this document. Only use `range` when you already have a URI context and this range is guaranteed to be within the same docum
crates/ty_server/src/document/range.rs:33
↓ 14 callersMethodmap_type
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/member.rs:47
↓ 14 callersMethodmatching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:3839
↓ 14 callersMethodmode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:42
↓ 14 callersMethodname
Returns the base symbol name for this group. Callers must ensure that all symbols in this group have the same base name. This returns `None` if and
crates/ty_ide/src/all_symbols.rs:523
↓ 14 callersMethodor
(self, other: Self)
crates/ty_python_core/src/lib.rs:977
↓ 14 callersMethodparse_expression_list
Parses every Python expression. Matches the `expressions` rule in the [Python grammar]. The [`ExpressionContext`] can be used to match the `star_expr
crates/ruff_python_parser/src/parser/expression.rs:152
↓ 14 callersMethodparse_named_expression_or_higher
Parses every Python expression except unparenthesized tuple. Matches the `named_expression` rule in the [Python grammar]. The [`ExpressionContext`] c
crates/ruff_python_parser/src/parser/expression.rs:179
↓ 14 callersMethodpath
(&'a self, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1179
↓ 14 callersMethodpersist
Applies the pending changes and persists the cache to disk, if it has been changed.
crates/ruff/src/cache.rs:157
↓ 14 callersMethodprint
(&self)
crates/ruff_formatter/src/lib.rs:324
↓ 14 callersMethodpush
(&mut self, constraint: ConstraintAssignment)
crates/ty_python_semantic/src/types/constraints.rs:6716
↓ 14 callersMethodrender_diagnostics
(&self, diagnostics: I)
crates/ty_ide/src/lib.rs:445
↓ 14 callersFunctionresolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1839
↓ 14 callersMethodrest
Returns the remaining text to lex. Use [`Cursor::text_len`] to get the length of the remaining text.
crates/ruff_python_parser/src/lexer/cursor.rs:57
↓ 14 callersMethodreturn_type
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/call.rs:235
↓ 14 callersMethodroot_path
(&self)
crates/ty/tests/file_watching.rs:42
↓ 14 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:418
↓ 14 callersMethodsettings
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:662
↓ 14 callersMethodsnapshot
(&self)
crates/ty_ide/src/completion.rs:10883
↓ 14 callersMethodstatus
(&self)
crates/ty_python_semantic/src/lint.rs:134
↓ 14 callersMethodtrim_whitespace_start
(&self)
crates/ruff_python_trivia/src/whitespace.rs:73
↓ 14 callersMethodtry_add_root
Adds a new root for `path` and returns the root. The root isn't added nor is the file root's kind updated if a root for `path` already exists.
crates/ruff_db/src/files.rs:240
↓ 14 callersMethodtry_call
Calls `self`. Returns a [`CallError`] if `self` is (always or possibly) not callable, or if the arguments are not compatible with the formal parameter
crates/ty_python_semantic/src/types.rs:5430
↓ 14 callersMethodtry_to_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1181
↓ 14 callersFunctionunbound
()
crates/ty_python_core/src/use_def/place_state.rs:645
↓ 14 callersFunctionwalk_body
(visitor: &mut V, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:119
↓ 14 callersMethodworkspace_diagnostic_request
Send a `workspace/diagnostic` request with optional previous result IDs.
crates/ty_server/tests/e2e/main.rs:955
↓ 14 callersMethodwrite_file
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`.
crates/ruff_db/src/system/memory_fs.rs:192
↓ 13 callersMethodadd_declaration_with_binding
( &mut self, node: AnyNodeRef, definition: Definition<'db>, declared_and_infer
crates/ty_python_semantic/src/types/infer/builder.rs:1505
↓ 13 callersMethodall
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:77
↓ 13 callersMethodancestors
(&self)
crates/ruff_db/src/system/path.rs:201
↓ 13 callersMethodas_any_import
(&self)
crates/ruff_python_semantic/src/binding.rs:297
↓ 13 callersMethodas_function_literal
(self)
crates/ty_python_semantic/src/types.rs:1709
↓ 13 callersMethodas_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1223
↓ 13 callersFunctionassert_function_query_was_not_run
( db: &Db, query: Q, input: I, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:6
↓ 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:137
↓ 13 callersMethodat_ts
Returns `true` if the current token is found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:636
↓ 13 callersMethodbefore
Returns a slice of tokens before the given [`TextSize`] offset. If the given offset is between two tokens, the returned slice will end just before th
crates/ruff_python_ast/src/token/tokens.rs:144
↓ 13 callersMethodbinding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:324
↓ 13 callersMethodbinding_ids
Returns the IDs of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:98
↓ 13 callersFunctionclassify
Classify a function based on its scope, name, and decorators.
crates/ruff_python_semantic/src/analyze/function_type.rs:20
↓ 13 callersMethodcontents
(&self)
crates/ruff_server/src/edit/text_document.rs:68
↓ 13 callersFunctioncreate_constraint
( db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, bound_typevar: BoundTypeVar
crates/ty_python_semantic/src/types/constraints.rs:7035
↓ 13 callersFunctioncreate_diagnostics
Create Ruff-style diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:2951
↓ 13 callersMethodcurrent_statement_parent
Return the parent [`Stmt`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1481
↓ 13 callersMethoddefinitions
Gets the definitions for this goto target. The `alias_resolution` parameter controls whether import aliases (i.e. "x" in "from a import b as x") are
crates/ty_ide/src/goto.rs:555
↓ 13 callersMethodencoding
(&self)
crates/ruff_server/src/session.rs:192
↓ 13 callersMethodexists
Returns a new BDD that is the _existential abstraction_ of `self` for a set of typevars. The result will return true whenever `self` returns true for
crates/ty_python_semantic/src/types/constraints.rs:2804
↓ 13 callersMethodexpression
The source text of the expression (e.g., `0x0` in `f"{0x0=}"`).
crates/ruff_python_ast/src/nodes.rs:459
↓ 13 callersMethodexpression
(&self, expression_key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/lib.rs:651
↓ 13 callersMethodextension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 13 callersMethodfile
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/ide_support.rs:1346
↓ 13 callersMethodfirst_declaration
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3023
↓ 13 callersMethodfix
Returns the fix for this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:341
↓ 13 callersFunctionfoo
(a, b)
crates/ruff_linter/resources/test/fixtures/ruff/RUF069.py:18
↓ 13 callersMethodget
(&self, key: DefinitionNodeKey)
crates/ty_python_core/src/lib.rs:271
↓ 13 callersMethodget
(&self, key: &K)
crates/ty_python_core/src/frozen.rs:66
↓ 13 callersMethodhas_known_decorator
(self, db: &dyn Db, decorator: FunctionDecorators)
crates/ty_python_semantic/src/types/function.rs:325
↓ 13 callersMethodid
(&self)
crates/ruff_python_ast/src/nodes.rs:2510
↓ 13 callersMethodid
(&self)
crates/ty_wasm/src/lib.rs:932
↓ 13 callersMethodinferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_ide/src/goto.rs:448
↓ 13 callersFunctionintersection
( db: &'db TestDb, tys: impl IntoIterator<Item = Type<'db>>, )
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:628
↓ 13 callersMethodinto_uri
Converts the key back into its original URI.
crates/ruff_server/src/edit.rs:55
↓ 13 callersMethodis_empty
(&self)
crates/ruff_linter/src/noqa.rs:320
↓ 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_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:216
↓ 13 callersMethodis_standard_library
(&self)
crates/ty_module_resolver/src/path.rs:34
↓ 13 callersMethodis_typed_dict
Return `true` if this class constitutes a typed dict specification (inherits from `typing.TypedDict` or `typing_extensions.TypedDict`, either directly
crates/ty_python_semantic/src/types/class/static_literal.rs:748
↓ 13 callersMethoditer_overloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:820
↓ 13 callersMethodjoin
(mut self)
crates/ruff_server/src/server/schedule/thread.rs:88
↓ 13 callersMethodjoin_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:291
↓ 13 callersMethodkind
(mut self, kind: impl Into<Option<CompletionKind>>)
crates/ty_ide/src/completion.rs:526
↓ 13 callersMethodlast
(mut self)
crates/ruff_python_ast/src/nodes.rs:248
↓ 13 callersMethodlen
Return the number of bytes in the source code.
crates/ruff_linter/src/locator.rs:133
↓ 13 callersMethodlookup_symbol
Lookup a symbol in the current scope without materializing lazy builtins.
crates/ruff_python_semantic/src/model.rs:795
↓ 13 callersMethodmaterialized_divergent_fallback
If `self` is a materialized `Divergent` type, returns the concrete type it should behave as: `object` for top-materialized, `Never` for bottom-materia
crates/ty_python_semantic/src/types.rs:1079
↓ 13 callersMethodnormalize_path
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:371
↓ 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:840
↓ 13 callersFunctionoriginal_class_type
Return the original class literal for a class definition. For decorated classes, this is the class object before applying decorators. The public bind
crates/ty_python_semantic/src/types/infer.rs:710
↓ 13 callersFunctionparameter_documentation
Returns the parameter documentation recognized in a reST docstring.
crates/ty_ide/src/docstring/document/rst.rs:35
↓ 13 callersMethodparse_comma_separated_list
Parses a comma separated list of elements where each element is parsed using the given `parse_element` function. The difference between this function
crates/ruff_python_parser/src/parser/mod.rs:737
↓ 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:205
↓ 13 callersMethodpop
(&mut self)
crates/ruff_formatter/src/printer/stack.rs:14
↓ 13 callersMethodprovenance
(&self)
crates/ty_python_semantic/src/types/call.rs:319
↓ 13 callersMethodrange
(&self)
crates/ty_ide/src/semantic_tokens.rs:158
↓ 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:233
↓ 13 callersMethodresolve_member
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:375
← previousnext →901–1,000 of 27,349, ranked by callers