Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
↓ 3 callers
Method
finish
(mut self)
crates/ruff_db/src/parsed.rs:409
↓ 3 callers
Method
finish
(self)
crates/ty_ide/src/docstring/document/numpy.rs:376
↓ 3 callers
Method
finish
(self)
crates/ty_ide/src/docstring/document/google.rs:463
↓ 3 callers
Method
finish
( mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:5652
↓ 3 callers
Method
finish_definition
( mut self, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:12352
↓ 3 callers
Method
finish_expression_type
Apply context before recording an inferred expression type.
crates/ty_python_semantic/src/types/infer/builder.rs:6966
↓ 3 callers
Function
finite_alternatives
Expand a type into its finite runtime alternatives when its comparison semantics are known. Enum classes with custom comparison methods are deliberat
crates/ty_python_semantic/src/types/equality.rs:1471
↓ 3 callers
Function
first_argument_with_matching_function
( name: &str, func: &Expr, args: &'a [Expr], )
crates/ruff_linter/src/rules/flake8_comprehensions/helpers.rs:22
↓ 3 callers
Method
first_literal_flags
Returns the [`StringLiteralFlags`] associated with this string literal. For an implicitly concatenated string, it returns the flags for the first lit
crates/ruff_python_ast/src/nodes.rs:1545
↓ 3 callers
Function
fix_all
(snapshot: &DocumentSnapshot)
crates/ruff_server/src/server/api/requests/code_action.rs:193
↓ 3 callers
Function
fix_file
Fix errors in a file, and write the fixed source code to disk.
crates/ruff_linter/src/fix/mod.rs:30
↓ 3 callers
Method
fixture
Returns the decorated function that declares the fixture.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:229
↓ 3 callers
Function
fixture_exposures_for_name_in_scope
( db: &'db dyn Db, scope: ScopeId<'db>, name: Name, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1269
↓ 3 callers
Method
flip
(self)
crates/ty_python_semantic/src/types.rs:800
↓ 3 callers
Method
flow_snapshot_for_condition
(&mut self, condition: &ast::Expr)
crates/ty_python_core/src/builder.rs:1354
↓ 3 callers
Method
flush
(&mut self)
crates/ty/src/printer.rs:171
↓ 3 callers
Method
fmt
(&self, statements: &Suite, f: &mut PyFormatter)
crates/ruff_python_formatter/src/statement/suite.rs:96
↓ 3 callers
Method
folding_range_request
(&mut self, uri: &Uri)
crates/ty_server/tests/e2e/main.rs:1185
↓ 3 callers
Method
followed_by_multi_statement_line
Return `true` if a [`Stmt`] appears to be followed by other statements in a multi-statement line.
crates/ruff_python_index/src/indexer.rs:219
↓ 3 callers
Method
following_lines_str
(&self)
crates/ruff_linter/src/docstrings/sections.rs:410
↓ 3 callers
Method
foo
(self, timeout: float)
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC109_0.py:20
↓ 3 callers
Method
for_path
Returns a reference to the workspace for the given path, [`None`] if there's no workspace registered for the path.
crates/ty_server/src/session.rs:1784
↓ 3 callers
Method
force
(self)
crates/ty_python_semantic/src/importer.rs:841
↓ 3 callers
Method
force_exclude
(&self)
crates/ruff_workspace/src/resolver.rs:130
↓ 3 callers
Function
format
Format a docstring by trimming whitespace and adjusting the indentation. Summary of changes we make: Normalize the string like all other strings Igno
crates/ruff_python_formatter/src/string/docstring.rs:113
↓ 3 callers
Method
format_backend
(&self)
crates/ruff_server/src/session/settings.rs:173
↓ 3 callers
Method
format_file_with_cache
( &self, path: &str, cache: &Cache, )
crates/ruff/src/cache.rs:1075
↓ 3 callers
Function
format_import_from
( import_from: &ImportFromData, comments: &ImportFromCommentSet, aliases: &[(AliasData, ImportFrom
crates/ruff_linter/src/rules/isort/format.rs:47
↓ 3 callers
Function
format_range
( source: &str, range: TextRange, options: PyFormatOptions, )
crates/ruff_python_formatter/src/range.rs:52
↓ 3 callers
Function
format_with_options
( root: &dyn Format<SimpleFormatContext>, options: PrinterOptions, )
crates/ruff_formatter/src/printer/mod.rs:1688
↓ 3 callers
Method
formatted_names
Return a string that contains a formatted subset of the abstract methods in this collection. This is useful for diagnostics.
crates/ty_python_semantic/src/types/abstract_methods.rs:220
↓ 3 callers
Method
freshen_member_for_owner_specialization
Freshens a member's method binders to avoid capturing typevars in incoming class arguments. Constructor lookup must do this before adding the inherite
crates/ty_python_semantic/src/types.rs:9647
↓ 3 callers
Function
from_nonnegative_i32
(index: i32)
crates/ty_python_semantic/src/subscript.rs:24
↓ 3 callers
Method
fs
(&self)
crates/ruff_db/src/system/test.rs:385
↓ 3 callers
Method
full_line_end
(&self, offset: TextSize)
crates/ruff_source_file/src/line_ranges.rs:359
↓ 3 callers
Function
full_module_name
(prefix: Option<&ModuleName>, component_name: &str)
crates/ty_module_resolver/src/resolve/search.rs:1180
↓ 3 callers
Method
full_mro_except_first_element
Materialize the full MRO of the class. Return an iterator over that MRO which skips the first element of the MRO.
crates/ty_python_semantic/src/types/mro.rs:660
↓ 3 callers
Function
func
()
crates/ruff_python_semantic/resources/test/fixtures/cfg/no_flow.py:1
↓ 3 callers
Function
func
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/python37.py:12
↓ 3 callers
Function
func1
(arg: None | int)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:4
↓ 3 callers
Function
function
Docstring comes first. Possibly many lines.
crates/ruff_python_formatter/resources/test/fixtures/black/cases/comments.py:32
↓ 3 callers
Function
function_has_deferred_annotations
(function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder/function.rs:79
↓ 3 callers
Function
function_has_stub_body
Returns `true` if the function body is stub-like, ignoring a leading docstring.
crates/ty_python_semantic/src/types/function.rs:2191
↓ 3 callers
Method
function_like_dunder_get
Model the effect of `__get__` on functions, staticmethods, and classmethods. See [`Self::try_call_dunder_get`] for general descriptor access, includi
crates/ty_python_semantic/src/types/callable.rs:70
↓ 3 callers
Function
function_signature_expression_type
Infer the type of a parameter or return annotation in a function signature. This is very similar to `definition_expression_type`, but knows that `Typ
crates/ty_python_semantic/src/types/signatures.rs:75
↓ 3 callers
Method
function_spans
Returns a collection of useful spans for a function signature. These are useful for creating annotations on diagnostics. If there are no meaningful s
crates/ty_python_semantic/src/types.rs:11049
↓ 3 callers
Method
function_type
(&self, function: &ast::StmtFunctionDef)
crates/ty_python_semantic/src/types/infer/builder.rs:2187
↓ 3 callers
Function
g
(x: list["int"])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI020.py:8
↓ 3 callers
Method
generate
(&self, db: &'db dyn Db, classinfo: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:553
↓ 3 callers
Function
generate_comparison
( left: &Expr, ops: &[CmpOp], comparators: &[Expr], parent: AnyNodeRef, tokens: &Tokens,
crates/ruff_python_ast/src/helpers.rs:1649
↓ 3 callers
Function
generate_suppression_edits
( path: &Path, diagnostics: &[Diagnostic], locator: &Locator, comment_ranges: &CommentRanges,
crates/ruff_linter/src/noqa.rs:35
↓ 3 callers
Method
generator_return_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:8972
↓ 3 callers
Method
generic_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:295
↓ 3 callers
Method
getOrCreateVendoredFileHandle
(vendoredPath: string)
playground/ty/src/Editor/Editor.tsx:511
↓ 3 callers
Method
getVendoredPath
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:222
↓ 3 callers
Function
get_bound_typevar_instance
( db: &'db TestDb, type_alias: PEP695TypeAliasType<'db>, )
crates/ty_python_semantic/src/types/tests.rs:891
↓ 3 callers
Method
get_secret_value
(self)
crates/ruff_benchmark/resources/pydantic/types.py:420
↓ 3 callers
Method
global
Return the [`TextRange`] at which a name is declared as global in the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1777
↓ 3 callers
Method
global_definition
(&'db self, path: &str, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3482
↓ 3 callers
Method
global_scope_mut
Returns a mutable reference to the global [`Scope`].
crates/ruff_python_semantic/src/model.rs:1535
↓ 3 callers
Function
good_docstring
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:193
↓ 3 callers
Function
goto_declaration
Navigate to the declaration of a symbol. A "declaration" includes both formal declarations (class statements, def statements, and variable annotation
crates/ty_ide/src/goto_declaration.rs:14
↓ 3 callers
Method
goto_declaration
(&self)
crates/ty_ide/src/goto_declaration.rs:2767
↓ 3 callers
Function
goto_definition
Navigate to the definition of a symbol. A "definition" is the actual implementation of a symbol, potentially in a source file rather than a stub file
crates/ty_ide/src/goto_definition.rs:15
↓ 3 callers
Function
goto_implementation
Returns the known implementations for the supported target at `offset`. Returns `None` when the cursor is not on a supported target or no implementat
crates/ty_ide/src/goto_implementation.rs:74
↓ 3 callers
Function
goto_type_definition
( db: &dyn Db, file: ProgramFile<'_>, offset: TextSize, )
crates/ty_ide/src/goto_type_definition.rs:9
↓ 3 callers
Function
groupby
(data, key=None)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:259
↓ 3 callers
Function
has_any_external_visible_definitions
Determines whether the resolved definitions can have references outside their file.
crates/ty_ide/src/references.rs:332
↓ 3 callers
Method
has_cell_boundary
Returns `true` if the given range contains a cell boundary. A range starting at the cell boundary isn't considered to contain the cell boundary as it
crates/ruff_notebook/src/cell.rs:315
↓ 3 callers
Method
has_data_descriptor_method
Looks for a concrete `__set__` or `__delete__` method. A type such as `type[Any]` can hold a data descriptor without declaring either method.
crates/ty_python_semantic/src/types.rs:5535
↓ 3 callers
Method
has_directive_set
(&self, directive: MdtestDirective)
crates/mdtest/src/parser.rs:1100
↓ 3 callers
Method
has_dynamic
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:3066
↓ 3 callers
Method
has_evidence_without_validity
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:1987
↓ 3 callers
Method
has_incompatible_class_variable_declaration
Returns whether an instance declaration conflicts with a required writable class variable. An unannotated assignment preserves an inherited `ClassVar
crates/ty_python_semantic/src/types/protocol_class.rs:2095
↓ 3 callers
Method
has_instance_slot
Returns whether this class or any base defines a slot with the given name.
crates/ty_python_semantic/src/types/class/slots.rs:521
↓ 3 callers
Method
has_invalid_syntax
Returns `true` if the parsed source code is invalid i.e., it has [`ParseError`]s. Note that this does not include version-related [`UnsupportedSyntax
crates/ruff_linter/src/linter.rs:53
↓ 3 callers
Method
has_ordering_method_in_mro
Returns `true` if any class in this class's MRO (excluding `object`) defines an ordering method (`__lt__`, `__le__`, `__gt__`, `__ge__`). Used by `@to
crates/ty_python_semantic/src/types/class/static_literal.rs:316
↓ 3 callers
Function
has_own_parentheses
Returns the [`OwnParentheses`] value for a given [`Expr`], to indicate whether it has its own parentheses, and whether those parentheses are empty. A
crates/ruff_python_formatter/src/expression/mod.rs:1187
↓ 3 callers
Function
has_slots
Return `true` if the given body contains a `__slots__` assignment.
crates/ruff_linter/src/rules/flake8_slots/helpers.rs:4
↓ 3 callers
Function
has_target_own_parentheses
Returns `true` for targets that have their own set of parentheses when they split, in which case we want to avoid parenthesizing the assigned value.
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1331
↓ 3 callers
Method
hash
(&self, state: &mut H)
crates/ty_site_packages/src/lib.rs:87
↓ 3 callers
Function
hash_single
Helper function to hash a single value and return the hash.
crates/ty_python_core/src/member.rs:1030
↓ 3 callers
Method
highlight_range
Get semantic tokens for a specific range in the file
crates/ty_ide/src/semantic_tokens.rs:5045
↓ 3 callers
Method
hyperlinks
Configures hyperlink rendering for colored diagnostic output.
crates/ruff_db/src/diagnostic/mod.rs:1484
↓ 3 callers
Method
id
(&self)
crates/ruff_formatter/src/format_element/tag.rs:255
↓ 3 callers
Method
if_ambiguous
(self)
crates/ty_python_core/src/reachability_constraints.rs:83
↓ 3 callers
Function
if_elif_branches
(stmt_if: &StmtIf)
crates/ruff_python_ast/src/stmt_if.rs:36
↓ 3 callers
Method
if_false
(self)
crates/ty_python_core/src/reachability_constraints.rs:87
↓ 3 callers
Method
if_true
(self)
crates/ty_python_core/src/reachability_constraints.rs:79
↓ 3 callers
Method
implicit_attribute_name
( &self, db: &'db dyn Db, name: &str, decorator: MethodDecorator, )
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:492
↓ 3 callers
Function
implicit_builtins_symbol_scope
Returns the module scope that supplies `symbol` through implicit builtin fallback. Uses the same visibility rules as [`implicit_builtins_symbol`] so
crates/ty_python_semantic/src/place.rs:651
↓ 3 callers
Method
import
Builds a best-effort import action for this module, usually for an IDE completion. This method always returns an action, even when it cannot avoid ev
crates/ty_python_semantic/src/importer.rs:133
↓ 3 callers
Method
import_for_diagnostic
Builds an import action for a diagnostic fix, returning `None` if its name cannot be used confidently at the proposed use site. [`Self::import`] uses
crates/ty_python_semantic/src/importer.rs:323
↓ 3 callers
Method
imported_final_candidates_iterator
( &'map self, declarations: &'map [LiveDeclaration], )
crates/ty_python_core/src/use_def.rs:1493
↓ 3 callers
Method
importing_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12559
↓ 3 callers
Method
imports
(&self)
crates/ty_python_semantic/src/importer.rs:492
↓ 3 callers
Function
in_airflow_task_function
Returns `true` if the current statement hierarchy has a function that's decorated with `@airflow.decorators.task` or `@airflow.sdk.task`.
crates/ruff_linter/src/rules/airflow/helpers.rs:303
↓ 3 callers
Method
in_deferred_type_definition
Return `true` if the model is visiting any kind of type definition that was previously deferred when initially traversing the AST
crates/ruff_python_semantic/src/model.rs:2153
↓ 3 callers
Function
in_dunder_method
( dunder_name: &str, semantic: &SemanticModel, settings: &LinterSettings, )
crates/ruff_linter/src/rules/pylint/helpers.rs:29
↓ 3 callers
Method
in_function_scope
(&self)
crates/ruff_python_parser/tests/fixtures.rs:692
← previous
next →
4,001–4,100 of 31,562, ranked by callers