MCPcopy Create free account

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

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

↓ 4 callersMethodflags
Returns the line's flags
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:214
↓ 4 callersFunctionfoo
(answer=(p := 42))
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pep_572.py:14
↓ 4 callersFunctionfoo
(a, /)
crates/ruff_python_parser/resources/inline/ok/pos_only_py38.py:2
↓ 4 callersFunctionfoo
(a, /)
crates/ruff_python_parser/resources/inline/err/pos_only_py37.py:2
↓ 4 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB101_0.py:1
↓ 4 callersMethodfor_new_materialization_root
(&self)
crates/ty_python_semantic/src/types.rs:680
↓ 4 callersFunctionformatError
(error: unknown)
playground/ty/src/Editor/Chrome.tsx:380
↓ 4 callersFunctionformat_node
( parsed: &'a Parsed<N>, trivia: &'a TriviaRanges, source: &'a str, options: PyFormatOptions,
crates/ruff_python_formatter/src/lib.rs:162
↓ 4 callersMethodfree_threaded_build_available
(self)
crates/ruff_python_ast/src/python_version.rs:83
↓ 4 callersMethodfreeze
Freezes all inputs on files created from now on. Existing files retain their current durability. Callers should therefore call this before discoverin
crates/ruff_db/src/files.rs:92
↓ 4 callersMethodfresh_revision
(&mut self)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:40
↓ 4 callersMethodfrom
(text: &'a str)
crates/ruff_source_file/src/newlines.rs:51
↓ 4 callersMethodfull_range
(&self)
crates/ty_ide/src/lib.rs:161
↓ 4 callersMethodfunction_definition
(&'db self, path: &str, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3474
↓ 4 callersFunctionfunction_known_decorator_flags
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:345
↓ 4 callersFunctiong
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:149
↓ 4 callersMethodget
(&self, index: usize)
crates/ruff_db/src/parsed.rs:547
↓ 4 callersMethodget_for_declared_type
Returns the type of this argument when inferred against the provided declared type. If the type was not inferred against the declared type directly,
crates/ty_python_semantic/src/types/call/arguments.rs:486
↓ 4 callersMethodget_line
(&self, idx: usize)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:57
↓ 4 callersMethodget_or_build
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:688
↓ 4 callersMethodget_or_create_nest
( self, key: Key, *, access_lists: bool = True, )
crates/ruff_benchmark/resources/tomllib/_parser.py:198
↓ 4 callersFunctionget_redirect
Returns the original selector and its redirect target, both with a static lifetime.
crates/ruff_linter/src/rule_redirects.rs:12
↓ 4 callersMethodhasConfigurationFile
()
playground/ty/src/Playground.tsx:741
↓ 4 callersMethodhas_active_exception_handler
Returns whether an active `try` or `with` context can receive an exception from this scope. A context can remain on the stack for its `finally` suite
crates/ty_python_core/src/builder/except_handlers.rs:148
↓ 4 callersMethodhas_applicable_fix
Returns `true` if the diagnostic has a fix that applies at the configured applicability level.
crates/ruff_db/src/diagnostic/mod.rs:409
↓ 4 callersMethodhas_decorators
Whether the function has decorators, without loading its module's AST.
crates/ty_python_core/src/definition.rs:1207
↓ 4 callersMethodhas_implicit_positional_receiver_annotation
(&self)
crates/ty_python_semantic/src/types/signatures.rs:1925
↓ 4 callersMethodhas_known_members
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:207
↓ 4 callersMethodhas_pending_synchronizations
Returns whether any project or script synchronization is pending. A request stays pending until [`poll_sync`](Self::poll_sync) applies its result, ev
crates/ty_project/src/uv/environments.rs:465
↓ 4 callersMethodhas_pep_695_type_params
Returns `true` if the class has a PEP 695 type parameter list, including an empty list recovered from invalid syntax such as `class C[]: ...`.
crates/ty_python_semantic/src/types/class/static_literal.rs:407
↓ 4 callersFunctionhas_skip_comment
(trailing_comments: &[SourceComment], source: &str)
crates/ruff_python_formatter/src/comments/mod.rs:534
↓ 4 callersMethodhas_syntax_errors
Returns `true` if the parsed source code contains any [`ParseError`]s *or [`UnsupportedSyntaxError`]s. See [`Parsed::has_invalid_syntax`] for a versi
crates/ruff_python_parser/src/lib.rs:463
↓ 4 callersFunctionhas_trailing_content
Return `true` if the node ending at the given [`TextSize`] has trailing content.
crates/ruff_python_trivia/src/whitespace.rs:67
↓ 4 callersMethodhas_unguarded_alias_cycle
Returns whether expanding aliases, unions, and intersections can return to the same alias without entering another type. For example, `type A = int |
crates/ty_python_semantic/src/types/type_alias.rs:33
↓ 4 callersMethodhighlight_source
Style the source according to the [`AnnotationKind`] This gives extra emphasis to this annotation
crates/ruff_annotate_snippets/src/snippet.rs:386
↓ 4 callersFunctionhints
(db: &dyn Db, file: File)
crates/ty_ide/src/hints.rs:43
↓ 4 callersFunctionhover
( db: &'db dyn Db, file: ProgramFile<'db>, offset: TextSize, )
crates/ty_ide/src/hover.rs:21
↓ 4 callersMethodimplementation_callables
Return all effective implementation callables, falling back to the raw implementation.
crates/ty_python_semantic/src/types/function.rs:1319
↓ 4 callersMethodimplies
Returns a constraint set encoding that this constraint set implies another. In the result's source order, `self` will appear before `other`.
crates/ty_python_semantic/src/types/constraints.rs:771
↓ 4 callersFunctionimport
()
crates/ty_python_core/src/lib.rs:1341
↓ 4 callersMethodimport
(alias: &ast::Alias, kind: ImportKind)
crates/ty_ide/src/symbols.rs:444
↓ 4 callersMethodimport_rewrite_preserves_laziness
Whether changing this import's module preserves membership in `__lazy_modules__`.
crates/ruff_linter/src/checkers/ast/mod.rs:366
↓ 4 callersMethodimporter
Constructs an importer using the file's cached imports and source style.
crates/ty_python_semantic/src/types/context.rs:218
↓ 4 callersMethodin_forward_reference
Return `true` if the model is in a forward type reference. Includes deferred string types, and future types in annotations. ## Examples ```python fr
crates/ruff_python_semantic/src/model.rs:2173
↓ 4 callersMethodin_interpolated_string
Return `true` if the model is in an f-string or t-string.
crates/ruff_python_semantic/src/model.rs:2240
↓ 4 callersMethodin_parenthesized_context
Returns `true` if the iterator is within a parenthesized context.
crates/ruff_python_ast/src/token/tokens.rs:373
↓ 4 callersMethodin_runtime_context
Return `true` if the context is in a runtime context.
crates/ruff_python_semantic/src/reference.rs:51
↓ 4 callersMethodin_typing_only_annotation
Return `true` if the model is in a typing-only type annotation.
crates/ruff_python_semantic/src/model.rs:2095
↓ 4 callersMethodincluded_paths_or_root
Returns the paths that should be checked. The default is to check the entire project in which case this method returns the project root. However, use
crates/ty_project/src/lib.rs:648
↓ 4 callersMethodincoming
Returns the client to server request queue.
crates/ty_server/src/session/request_queue.rs:34
↓ 4 callersFunctionincoming_calls
Find every place in the project that calls the symbol at `offset`, grouped by enclosing function/method/class/module.
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:32
↓ 4 callersMethodincrement
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:558
↓ 4 callersMethodindent_width
Width of an indent in characters.
crates/ruff_formatter/src/printer/printer_options/mod.rs:56
↓ 4 callersFunctionindent_with_suffix
Returns the indentation of the given line and everything following it.
crates/ruff_python_formatter/src/string/docstring.rs:1866
↓ 4 callersMethodindex
Returns a reference to the index. # Panics Panics if there's a mutable reference to the index via [`index_mut`]. [`index_mut`]: Session::index_mut
crates/ty_server/src/session.rs:1447
↓ 4 callersMethodindex
(&self, index: I)
crates/ruff_index/src/slice.rs:146
↓ 4 callersMethodinfer
(&self, constraints: &ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:6768
↓ 4 callersMethodinfer_comprehensions
(&mut self, comprehensions: &[ast::Comprehension])
crates/ty_python_semantic/src/types/infer/builder.rs:8858
↓ 4 callersMethodinfer_extra_items_kwarg
(&mut self, value: &ast::Expr)
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:786
↓ 4 callersMethodinfer_first_comprehension_iter
Infer the type of the `iter` expression of the first comprehension.
crates/ty_python_semantic/src/types/infer/builder.rs:8464
↓ 4 callersFunctioninfer_function_default_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:471
↓ 4 callersFunctioninfer_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:527
↓ 4 callersMethodinfer_silent
Infer the expression silently, with diagnostics disabled. This method may be called an unlimited number of times.
crates/ty_python_semantic/src/types/infer/builder.rs:13029
↓ 4 callersMethodinfer_subscript_type_expression
( &mut self, subscript: &ast::ExprSubscript, value_ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2029
↓ 4 callersFunctioninherited_class_body_declaration
( db: &'db dyn Db, scope: ScopeId<'db>, symbol: ScopedSymbolId, )
crates/ty_python_semantic/src/types/member.rs:155
↓ 4 callersFunctioninline
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/comments9.py:86
↓ 4 callersFunctioninner
(expr: &Expr, func: &mut dyn FnMut(&Expr) -> bool)
crates/ruff_python_ast/src/helpers.rs:261
↓ 4 callersMethodinsert
insert the value given by the sequence `it`, returning a tuple (is this a substring already in the tree, was this exact sequence previously inserted).
crates/ruff_unicode_names2_generator/src/trie.rs:37
↓ 4 callersMethodinsert_print_mode
(&mut self, group_id: GroupId, mode: PrintMode)
crates/ruff_formatter/src/printer/mod.rs:926
↓ 4 callersMethodinsert_type
( &mut self, index: usize, tcx: impl Into<TypeContext<'db>>, ty: Type<'db>,
crates/ty_python_semantic/src/types/call/arguments.rs:711
↓ 4 callersMethodinstance_fallback
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1798
↓ 4 callersMethodinstance_type
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:774
↓ 4 callersMethodintern_declarations
(&mut self, declarations: Declarations)
crates/ty_python_core/src/use_def.rs:412
↓ 4 callersMethodinterpolated_string_ranges
Returns the byte offset ranges of interpolated strings.
crates/ruff_python_index/src/indexer.rs:111
↓ 4 callersMethodintersects_range_filter
(&self, range: TextRange)
crates/ty_ide/src/folding_range.rs:117
↓ 4 callersMethodinto_accesses
(self)
crates/ruff_linter/src/rules/pylint/helpers.rs:92
↓ 4 callersMethodinto_bindings
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13078
↓ 4 callersMethodinto_diagnostic
Create a new guard. This initializes a new diagnostic using the given message along with the ID and severity used to create this builder. The diagno
crates/ty_python_semantic/src/suppression.rs:355
↓ 4 callersMethodinto_document
Consumes `self` and returns the formatted document.
crates/ruff_formatter/src/lib.rs:315
↓ 4 callersMethodinto_error_context
Return the collected error context, or an empty tree if collection was disabled.
crates/ty_python_semantic/src/types/relation.rs:1805
↓ 4 callersMethodinto_file_path
(self)
crates/ty_server/src/document.rs:132
↓ 4 callersMethodinto_iter
(self)
crates/ty/src/args.rs:348
↓ 4 callersMethodinto_iter
(self)
crates/ruff_formatter/src/format_element.rs:405
↓ 4 callersMethodinto_lookup_result
Transform place and qualifiers into a [`LookupResult`], a [`Result`] type in which the `Ok` variant represents a definitely defined place and the `Err
crates/ty_python_semantic/src/place.rs:1156
↓ 4 callersMethodinto_lower_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:875
↓ 4 callersMethodinto_module
This is the module we were actually interested in resolving, complete the resolution
crates/ty_module_resolver/src/resolve.rs:1325
↓ 4 callersMethodinto_navigation_targets
Convert these semantic definitions to editor-facing navigation targets.
crates/ty_ide/src/goto.rs:408
↓ 4 callersMethodinto_path
(self)
crates/ruff_db/src/system.rs:358
↓ 4 callersMethodinto_path
(self)
crates/ty_site_packages/src/lib.rs:72
↓ 4 callersMethodinto_string
(self)
crates/ruff_db/src/system/path.rs:592
↓ 4 callersMethodinto_syntax
Consumes the [`Parsed`] output and returns the contained syntax node.
crates/ruff_python_parser/src/lib.rs:424
↓ 4 callersMethodinto_upper_bound
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:994
↓ 4 callersMethodinto_vec
Consumes the buffer and returns the written [`FormatElement]`s as a vector.
crates/ruff_formatter/src/buffer.rs:195
↓ 4 callersFunctioninvalid_end_tag
(end_tag: TagKind, start_tag: Option<TagKind>)
crates/ruff_formatter/src/printer/mod.rs:1569
↓ 4 callersFunctionis_available_definition
Returns whether `definition` remains bound in its defining scope and may exist at runtime.
crates/ty_python_semantic/src/types/dedicated/pytest.rs:18
↓ 4 callersMethodis_binding
True if this definition assigns a value to the place. False only for annotated assignments without a RHS.
crates/ty_python_core/src/definition.rs:918
↓ 4 callersMethodis_bool
(self)
crates/ty_python_semantic/src/types/literal.rs:233
↓ 4 callersMethodis_byte_string
Does the string have a `b` or `B` prefix?
crates/ruff_python_ast/src/nodes.rs:2498
↓ 4 callersMethodis_callable_type
Returns `true` if `self` is [`Type::Callable`].
crates/ty_python_semantic/src/types.rs:2632
↓ 4 callersFunctionis_camelcase
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:8
← previousnext →3,201–3,300 of 31,562, ranked by callers