MCPcopy Create free account

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

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

↓ 15 callersMethodsource_code
Return the notebook content. This is the concatenation of all Python code cells.
crates/ruff_notebook/src/notebook.rs:372
↓ 15 callersMethodsource_type
(&self)
crates/ruff_python_formatter/src/options.rs:131
↓ 15 callersMethodsource_type
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:127
↓ 15 callersMethodtake
Takes a snapshot of the current state of the matched overload bindings. # Panics Panics if the indexes of the matched overloads are not valid for th
crates/ty_python_semantic/src/types/call/bind.rs:9828
↓ 15 callersMethodtext_len
(&self)
crates/ruff_source_file/src/newlines.rs:333
↓ 15 callersMethodto_subclass_of
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class and all possible subclasses of the class. If the class
crates/ty_python_semantic/src/types/class/known.rs:1484
↓ 15 callersMethodtokens
Returns the [`Tokens`] for the parsed type annotation if the checker is in a typing context or the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:499
↓ 15 callersFunctiontrace_source_order_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:158
↓ 15 callersFunctiontrace_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:167
↓ 15 callersFunctionundefined
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:1038
↓ 15 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:33
↓ 15 callersMethodvisit_expr
(&self, expr: &mut Expr)
crates/ruff_python_ast/src/visitor/transformer.rs:20
↓ 15 callersMethodwith_site_packages
Convert to a builder that supports site-packages (third-party dependencies).
crates/ty_ide/src/lib.rs:620
↓ 14 callersMethodaccess
(&self, mode: ProtocolMemberAccessMode)
crates/ty_python_semantic/src/types/protocol_class.rs:2425
↓ 14 callersMethodadd
Adds a member to the table or updates the flags of an existing member if it already exists. Members are identified by their expression, which is hash
crates/ty_python_core/src/member.rs:623
↓ 14 callersMethodancestors
(&self)
crates/ruff_db/src/system/path.rs:215
↓ 14 callersFunctionany_qualified_base_class
Return `true` if any base class matches a [`QualifiedName`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:16
↓ 14 callersMethodany_rule_enabled
(&self, rules: &[Rule])
crates/ruff_linter/src/checkers/ast/mod.rs:577
↓ 14 callersMethodas_slice
Returns a slice containing the remaining comments.
crates/ruff_python_formatter/src/verbatim.rs:568
↓ 14 callersMethodas_str
(self)
crates/ty/src/python_version.rs:25
↓ 14 callersMethodas_str
(&self)
crates/ruff_source_file/src/newlines.rs:258
↓ 14 callersFunctionassert_include
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:362
↓ 14 callersMethodbound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:856
↓ 14 callersMethodcanonicalize
(path: &SystemPath, system: &dyn System)
crates/ty_module_resolver/src/resolve.rs:749
↓ 14 callersFunctionclass_member
Infer the public type of a class member/symbol (its type as seen from outside its scope) in the given `scope`.
crates/ty_python_semantic/src/types/member.rs:70
↓ 14 callersMethodclear
Clear the parsed module, dropping the AST once all references to it are dropped.
crates/ruff_db/src/parsed.rs:183
↓ 14 callersMethodconcise_message
Introspects this diagnostic and returns its message for concise formatting. When we concisely format diagnostics, we likely want to not only include
crates/ruff_db/src/diagnostic/mod.rs:250
↓ 14 callersMethodconstraint
Convert this result into a constraint for a branch with the given truthiness.
crates/ty_python_semantic/src/types/equality.rs:103
↓ 14 callersFunctioncreate_syntax_error_diagnostics
Create Ruff-style syntax error diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:3021
↓ 14 callersMethodcurrent_scopes
Returns an iterator over all scopes, starting from the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1550
↓ 14 callersMethodcurrent_statement_parent
Return the parent [`Stmt`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1482
↓ 14 callersMethoddiagnostic_source
(&self, resolver: &dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1201
↓ 14 callersFunctiondivergent
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, id_bits: u64, materialization: Option<Materi
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:362
↓ 14 callersMethodenable_workspace_diagnostic_refresh
Enable server-requested refreshes for pull diagnostics.
crates/ty_server/tests/e2e/main.rs:1430
↓ 14 callersMethodexpression
The source text of the expression (e.g., `0x0` in `f"{0x0=}"`).
crates/ruff_python_ast/src/nodes.rs:523
↓ 14 callersMethodfind
Recognizes the beginning of a fenced code block if one is present on the given line.
crates/ty_ide/src/docstring/document/preformatted.rs:19
↓ 14 callersMethodfirst_declaration
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3270
↓ 14 callersMethodfix
Returns the fix for this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:377
↓ 14 callersMethodfocus_range
Returns the range of the class's name
crates/ty_python_semantic/src/types/class/static_literal.rs:3468
↓ 14 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/pylint/unreachable.py:13
↓ 14 callersMethodformat
(&self)
crates/ruff_python_formatter/src/expression/mod.rs:496
↓ 14 callersMethodfunction
(self)
crates/ty_python_semantic/src/types/enums.rs:95
↓ 14 callersMethodget
(&self, document_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:391
↓ 14 callersMethodget
(&self, key: DefinitionNodeKey)
crates/ty_python_core/src/lib.rs:277
↓ 14 callersMethodget
(&self, index: InternedBindingsId)
crates/ty_python_core/src/use_def.rs:512
↓ 14 callersFunctionhard_line_break
()
crates/ruff_formatter/src/builders.rs:101
↓ 14 callersMethodhas_trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:336
↓ 14 callersMethodhide_snippet
Set whether or not the snippet on this annotation should be suppressed when rendering. Such annotations are only rendered with their file name and ra
crates/ruff_db/src/diagnostic/mod.rs:908
↓ 14 callersMethodid
(&self)
crates/ty_wasm/src/lib.rs:943
↓ 14 callersMethodimports
When set, include the import associated with the completion. Not enabled by default.
crates/ty_ide/src/completion.rs:11676
↓ 14 callersMethodindex
(self)
crates/ty_python_semantic/src/types/constraints.rs:1907
↓ 14 callersMethodinferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_ide/src/goto.rs:524
↓ 14 callersMethodintersects
Return true if `self` and `other` contain at least one shared `definition`. A symbol can resolve to multiple definitions (for example, overload group
crates/ty_ide/src/goto.rs:471
↓ 14 callersMethodis_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callersMethodis_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:577
↓ 14 callersMethodis_load
Return `true` if the reference occurred in a `Load` operation.
crates/ruff_python_semantic/src/reference.rs:41
↓ 14 callersMethodis_module
(&self)
crates/ruff_python_ast/src/generated.rs:48
↓ 14 callersMethodis_positional
Returns `true` if this is either a positional-only or standard (positional or keyword) parameter.
crates/ty_python_semantic/src/types/signatures.rs:6380
↓ 14 callersMethodis_protocol
Return `true` if this class is a protocol class. In an ideal world, perhaps we wouldn't hardcode this knowledge here; instead, we'd just look at the
crates/ty_python_semantic/src/types/class/known.rs:844
↓ 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 callersMethodkind
(&self)
crates/ty_python_core/src/scope.rs:158
↓ 14 callersMethodkind
(mut self, kind: impl Into<Option<CompletionKind>>)
crates/ty_ide/src/completion.rs:594
↓ 14 callersMethodlen
(&self)
crates/ruff_linter/src/noqa.rs:140
↓ 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 callersMethodmatch_parameters
Match parameters for this constructor method and downstream constructors.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:203
↓ 14 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:2513
↓ 14 callersMethodmode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:42
↓ 14 callersMethodname
(&self)
crates/ruff_benchmark/src/lib.rs:55
↓ 14 callersMethodname
(&self)
crates/ruff_linter/src/registry.rs:386
↓ 14 callersMethodnode_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.rs:452
↓ 14 callersMethodnodes
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:203
↓ 14 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:788
↓ 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:151
↓ 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:178
↓ 14 callersMethodpersist
Applies the pending changes and persists the cache to disk, if it has been changed.
crates/ruff/src/cache.rs:157
↓ 14 callersMethodprefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:24
↓ 14 callersMethodprint
(&self)
crates/ruff_formatter/src/lib.rs:324
↓ 14 callersMethodprogram_environment
(&self)
crates/ty_project/src/db.rs:838
↓ 14 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/semantic_model.rs:86
↓ 14 callersMethodproject
(source: &str)
crates/ty_project/src/uv/environments.rs:1230
↓ 14 callersMethodpromote
Promote (possibly nested) literals to types that these literals are instances of. Note that this function tries to promote literals to a more user-fr
crates/ty_python_semantic/src/types.rs:3727
↓ 14 callersMethodpush
(&mut self, constraint: Assignment<ConstraintId>)
crates/ty_python_semantic/src/types/constraints.rs:5092
↓ 14 callersMethodrecursive_type_normalized
Normalize recursive types for cycle recovery when there's no previous value. See [`Type::recursive_type_normalized`] for more details.
crates/ty_python_semantic/src/types/typevar.rs:2315
↓ 14 callersMethodrequire_bound_or_constraints
Returns the bounds or constraints of this typevar. If the typevar is unbounded, returns `object` as its upper bound.
crates/ty_python_semantic/src/types/typevar.rs:1141
↓ 14 callersFunctionresolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1833
↓ 14 callersMethodreverse
(self)
crates/ruff_linter/src/rules/refurb/rules/if_expr_min_max.rs:164
↓ 14 callersFunctionsearch_paths
( db: &'db dyn Db, resolver_environment: ResolverEnvironment<'db>, resolve_mode: ModuleResolveMode
crates/ty_module_resolver/src/resolve.rs:448
↓ 14 callersMethodset_search_paths
(&mut self, search_paths: SearchPaths)
crates/ty_module_resolver/src/db.rs:64
↓ 14 callersMethodsnapshot
(&self)
crates/ty_ide/src/completion.rs:11722
↓ 14 callersFunctionsymlink
()
crates/ty_module_resolver/src/list.rs:495
↓ 14 callersMethodto_file_path
Returns the corresponding [`AnySystemPath`] for this document key. Note, calling this method on a `DocumentKey::Opaque` representing a cell document
crates/ty_server/src/document.rs:123
↓ 14 callersMethodtrim_whitespace_start
(&self)
crates/ruff_python_trivia/src/whitespace.rs:117
↓ 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:260
↓ 14 callersMethodtry_bool
Resolves the boolean value of a type. This is used to determine the value that would be returned when `bool(x)` is called on an object `x`. Returns
crates/ty_python_semantic/src/types/bool.rs:41
↓ 14 callersMethodtry_iterate
Given the type of an object that is iterated over in some way, return a tuple spec describing the type of objects that are yielded by that iteration.
crates/ty_python_semantic/src/types/iteration.rs:232
↓ 14 callersMethodtuple_spec
If this is an instance type where the class has a tuple spec, returns the tuple spec. I.e., for the type `tuple[int, str]`, this will return the tupl
crates/ty_python_semantic/src/types/instance.rs:285
↓ 14 callersMethodunique
(targets: impl IntoIterator<Item = NavigationTarget>)
crates/ty_ide/src/lib.rs:239
↓ 14 callersMethodupper_bound
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:339
↓ 14 callersMethodvalue
Return the numeric value for this [`LineLength`]
crates/ruff_linter/src/line_width.rs:26
↓ 14 callersMethodwith_python_version
(&mut self, version: PythonVersion)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:122
← previousnext →1,101–1,200 of 31,562, ranked by callers