Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 1 callers
Function
fastapi_unused_path_parameter
FAST003
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:111
↓ 1 callers
Method
fenced_code_block
( self, code: T, language: &str, )
crates/ty_ide/src/markup.rs:11
↓ 1 callers
Function
fetchPlayground
(id: string)
playground/ty/src/Editor/api.ts:14
↓ 1 callers
Function
fetchPlayground
(id: string)
playground/ruff/src/Editor/api.ts:13
↓ 1 callers
Method
fetch_shell_config
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:31
↓ 1 callers
Method
field_is_strict
(self, db: &'db dyn Db, field: ConfigBoolean)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:85
↓ 1 callers
Function
field_metadata
Resolve a Pydantic field's metadata from its annotation and right-hand side.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:447
↓ 1 callers
Function
field_provides_default
Return whether a field specifier's `default` argument provides a default value. Pydantic's `Field(...)` uses the ellipsis as a required-field sentine
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:701
↓ 1 callers
Method
fields
(&self)
crates/ty_ide/src/docstring/document/rst.rs:130
↓ 1 callers
Function
fields_from_dict_call
(func: &Expr, keywords: &[Keyword])
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:223
↓ 1 callers
Function
fields_from_dict_literal
(items: &[ast::DictItem])
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:194
↓ 1 callers
Method
fields_in_source_order
(self)
crates/ruff_python_ast/generate.py:172
↓ 1 callers
Method
fields_inner
( self, db: &'db dyn Db, specialization: Option<Specialization<'db>>, field_po
crates/ty_python_semantic/src/types/class/static_literal.rs:2623
↓ 1 callers
Method
file
Returns the physical file represented by this program file.
crates/ty_python_core/src/program_file.rs:75
↓ 1 callers
Method
file
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition.rs:63
↓ 1 callers
Method
file_document_handles
Iterates over all open file-level documents. Notebook cells are excluded because their file-level representation is the containing notebook.
crates/ty_server/src/session.rs:1340
↓ 1 callers
Method
file_documents
Iterates over open documents that correspond to file-level documents. The index only stores documents that the client has opened. This filter keeps n
crates/ty_server/src/session/index.rs:39
↓ 1 callers
Method
file_path
(&self)
crates/ty_server/src/session.rs:2010
↓ 1 callers
Function
file_to_module_impl
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, path: SystemOrVendoredPathRef<'a>, mut se
crates/ty_module_resolver/src/resolve.rs:445
↓ 1 callers
Method
files
(&self)
crates/ty_test/src/db.rs:129
↓ 1 callers
Method
files
(&self)
crates/ruff_mdtest/src/db.rs:40
↓ 1 callers
Method
files
(&self)
crates/mdtest/src/lib.rs:776
↓ 1 callers
Method
fill_item_fits
Tests if the content of a `Fill` item fits in [`PrintMode::Flat`]. Returns `Err` if the top element of the queue is not a [`Tag::StartEntry`] or if t
crates/ruff_formatter/src/printer/mod.rs:1126
↓ 1 callers
Method
fill_separator_fits
Tests if the content of a `Fill` separator fits with `mode`. Returns `Err` if the top element of the queue is not a [`Tag::StartEntry`] or if the doc
crates/ruff_formatter/src/printer/mod.rs:1134
↓ 1 callers
Method
filter_class_pattern_subject_type
Narrow a class-pattern binding while keeping the original type arguments and aliases. For example, `children` keeps the recursive element type from `
crates/ty_python_semantic/src/types/narrow.rs:2504
↓ 1 callers
Method
filter_members
( self, db: &'db dyn Db, mut predicate: impl FnMut(&ProtocolMember<'_, 'db>) -> bool,
crates/ty_python_semantic/src/types/protocol_class.rs:886
↓ 1 callers
Method
filter_overloads_containing_variadic
Filter overloads based on variadic argument to variadic parameter match. This is the step 4 of the [overload call evaluation algorithm][1]. [1]: htt
crates/ty_python_semantic/src/types/call/bind.rs:4337
↓ 1 callers
Method
filter_overloads_using_any_or_unknown
Filter overloads based on [`Any`] or [`Unknown`] argument types. This is the step 5 of the [overload call evaluation algorithm][1]. The filtering wo
crates/ty_python_semantic/src/types/call/bind.rs:4373
↓ 1 callers
Method
filter_targets_by_conditions
( &'a self, mut predicate: T, )
crates/ruff_python_semantic/src/cfg/graph.rs:142
↓ 1 callers
Method
final_initializer
Writes outside the initializer cannot establish the type of a class-body `Final`.
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:523
↓ 1 callers
Method
finalize
Returns a set of all of the typevars that _only_ appear in a `Callable` in the return type, along with a "replacement map" for those `Callable`s. (The
crates/ty_python_semantic/src/types/generics.rs:705
↓ 1 callers
Method
finalize_argument_inference
Finalize the bindings after a provisional check, retaining only those that contribute to the final call evaluation.
crates/ty_python_semantic/src/types/call/bind.rs:1463
↓ 1 callers
Method
finalize_pending
(self)
crates/ruff_benchmark/resources/tomllib/_parser.py:151
↓ 1 callers
Function
finally_contains_comments
( preceding_stmt: Option<&Stmt>, preceding_end: TextSize, finalbody_stmt: &Stmt, finally_range
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:183
↓ 1 callers
Function
finally_has_preceding_comment
Returns `true` if the `finally` clause header has a leading own-line comment
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:208
↓ 1 callers
Function
finally_has_trailing_comment
Returns `true` if the `finally` branch has a trailing own-line comment
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:241
↓ 1 callers
Method
find
Returns `Some` if this set has an option that resolves to `name` and `None` otherwise. The name can be separated by `.` to find a nested option. ##
crates/ruff_options_metadata/src/lib.rs:279
↓ 1 callers
Function
find_antipattern
( grandparent: Option<&Expr>, parent: Option<&Expr>, )
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_strptime_without_zone.rs:152
↓ 1 callers
Method
find_applicable_ignore
( &self, diagnostic: &Diagnostic, )
crates/ruff_linter/src/suppression.rs:287
↓ 1 callers
Function
find_artifact
(run_id: int, name: str)
scripts/publish_pr_report.py:133
↓ 1 callers
Function
find_ast_for_from_import
Finds the AST node, if available, corresponding to the given `from` token. This always returns `None` when the `token` is not a `from` token.
crates/ty_ide/src/completion.rs:3223
↓ 1 callers
Function
find_ast_for_import
Finds the AST node, if available, corresponding to the given `import` token. This always returns `None` when the `token` is not a `import` token.
crates/ty_ide/src/completion.rs:3240
↓ 1 callers
Function
find_backticked_shortcut_links
Check for links of the form: [`foobar`]. See explanation at #16010.
scripts/check_docs_formatted.py:273
↓ 1 callers
Function
find_best_suggestion_impl
(options: BTreeSet<&'a str>, typo: &str)
crates/ty_python_semantic/src/diagnostic/levenshtein.rs:61
↓ 1 callers
Function
find_block_index
Find the index of the block that the import should be placed in. The index is the position of the pattern in `forced_separate` plus one. If the import
crates/ruff_linter/src/rules/isort/split.rs:7
↓ 1 callers
Method
find_continuation
Given an offset at the end of a line (including newlines), return the offset of the continuation at the end of that line.
crates/ruff_python_index/src/indexer.rs:133
↓ 1 callers
Method
find_decorator_span
Iterate through the decorators on this function, returning the span of the first one that matches the given predicate.
crates/ty_python_semantic/src/types/function.rs:404
↓ 1 callers
Method
find_decorator_span
Iterate through the decorators on this class, returning the span of the first one that matches the given predicate.
crates/ty_python_semantic/src/types/class/static_literal.rs:508
↓ 1 callers
Function
find_double_star
Given a [`PatternMatchMapping`], finds the range of the `**` element in the `rest` pattern, if it exists.
crates/ruff_python_formatter/src/pattern/pattern_match_mapping.rs:161
↓ 1 callers
Function
find_dunder_all_exprs
Find the `Expr` for top-level `__all__` bindings.
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:295
↓ 1 callers
Function
find_enclosing_node
Finds the node with the minimum covering range of `range`. It traverses the tree and returns the deepest node that fully encloses `range`. ## Eligib
crates/ruff_python_formatter/src/range.rs:154
↓ 1 callers
Function
find_executable
()
crates/ty/src/server.rs:29
↓ 1 callers
Function
find_file_open
Find `open` operation in the given `with` item.
crates/ruff_linter/src/rules/refurb/helpers.rs:254
↓ 1 callers
Function
find_func_mode_arg
(call: &'a ExprCall, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:156
↓ 1 callers
Function
find_func_parent_mode_arg
(call: &'a ExprCall, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:185
↓ 1 callers
Function
find_function
( statements: &'ast [ast::Stmt], selector: &str, )
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1221
↓ 1 callers
Method
find_import_from
Return the top-level [`Stmt`] that imports the given module using `Stmt::ImportFrom` preceding the given position, if any.
crates/ruff_linter/src/importer/mod.rs:468
↓ 1 callers
Function
find_keyword
Finds the range of `keyword` starting the search at `start_position`. If the start position is at the end of the previous statement, the search will
crates/ruff_python_formatter/src/statement/clause.rs:603
↓ 1 callers
Method
find_last
Finds the last node that fully covers the range and fulfills the given predicate. The "last" here means that after finding the "first" such node, the
crates/ruff_python_ast/src/find_node.rs:105
↓ 1 callers
Method
find_last_future_import
Find the last `from __future__` import statement in the AST.
crates/ty_python_semantic/src/importer.rs:468
↓ 1 callers
Method
find_last_future_import
Find the last `from __future__` import statement in the AST.
crates/ruff_linter/src/importer/mod.rs:556
↓ 1 callers
Function
find_last_nested_if
Find the last nested if statement and return the test expression and the last statement. ```python if xxx: if yyy: # ^^^ returns this expression z =
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:256
↓ 1 callers
Method
find_legacy_typevars_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, binding_context: Optio
crates/ty_python_semantic/src/types.rs:1911
↓ 1 callers
Method
find_line_with_directive
(&self, offset: TextSize)
crates/ruff_linter/src/noqa.rs:1268
↓ 1 callers
Method
find_line_with_directive_mut
( &mut self, offset: TextSize, )
crates/ruff_linter/src/noqa.rs:1272
↓ 1 callers
Function
find_link
Finds the first complete hyperlink or plausible wrapped candidate in `input`.
crates/ty_ide/src/docstring/markdown/general/inline.rs:278
↓ 1 callers
Function
find_llvm_profdata
(host: str, override: Path | None)
scripts/build_ruff_pgo.py:352
↓ 1 callers
Function
find_method_mode_arg
(call: &'a ExprCall, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:173
↓ 1 callers
Function
find_method_parent_mode_arg
( call: &'a ExprCall, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:194
↓ 1 callers
Function
find_module_component
Helper function to extract module component information from a dotted module name
crates/ty_ide/src/goto.rs:1495
↓ 1 callers
Function
find_multiplier
An `n`-byte keyword ends in `8 - n` zero bytes once packed, so its slot depends only on the low `n` bytes of the multiplier. Choose those bytes from l
crates/ruff_python_parser/src/lexer/keywords.rs:82
↓ 1 callers
Method
find_name_in_mro
This function is roughly equivalent to `find_name_in_mro` as defined in the [descriptor guide] or [`_PyType_Lookup`] in CPython's `Objects/typeobject.
crates/ty_python_semantic/src/types.rs:4281
↓ 1 callers
Method
find_name_in_mro_after_pivot
Similar to `Type::find_name_in_mro_with_policy`, but performs lookup starting *after* the pivot class in the MRO, based on the `owner` type instead of
crates/ty_python_semantic/src/types/bound_super.rs:960
↓ 1 callers
Function
find_parameter
( parameters: &'a Parameters, binding: &Binding, )
crates/ruff_python_semantic/src/analyze/typing.rs:1155
↓ 1 callers
Function
find_path_open
( item: &'a ast::WithItem, with: &'a ast::StmtWith, semantic: &'a SemanticModel<'a>, read_mode
crates/ruff_linter/src/rules/refurb/helpers.rs:306
↓ 1 callers
Function
find_project
(name: str)
scripts/setup_primer_project.py:50
↓ 1 callers
Function
find_report
( pull_request: int, report: str, comment_id: int | None = None )
scripts/publish_pr_report.py:118
↓ 1 callers
Function
find_return
(stmts: &[Stmt])
crates/ruff_linter/src/rules/flake8_simplify/rules/return_in_try_except_finally.rs:55
↓ 1 callers
Function
find_ruff_bin
Return the ruff binary path.
python/ruff/_find_ruff.py:11
↓ 1 callers
Function
find_run
Find an unexpired artifact published by this workflow on `main`. The artifacts API also returns matches from pull requests, including those f
python/py-fuzzer/prepare_corpus.py:51
↓ 1 callers
Function
find_runtime_in_interpolated_element
Check an interpolated string element (f-string or t-string) for runtime-varying calls, including format specifications.
crates/ruff_linter/src/rules/airflow/rules/runtime_value_in_dag_or_task.rs:273
↓ 1 callers
Function
find_shell_keyword
Return the `shell` keyword argument to the given function call, if any.
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:493
↓ 1 callers
Function
find_subprocess_argument
Return the command argument to a `subprocess` call.
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:434
↓ 1 callers
Function
fingerprint
Generate a unique fingerprint to identify a violation.
crates/ruff_db/src/diagnostic/render/gitlab.rs:156
↓ 1 callers
Function
fingerprint_unsupported_syntax_error
( error: &UnsupportedSyntaxError, node_id: usize, salt: u64, )
crates/ruff_python_formatter/tests/fixtures.rs:666
↓ 1 callers
Method
finish
(self)
crates/ruff_python_semantic/src/globals.rs:69
↓ 1 callers
Method
finish
Returns finished control flow graph
crates/ruff_python_semantic/src/cfg/graph.rs:277
↓ 1 callers
Method
finish
(self)
crates/ruff_workspace/src/resolver.rs:558
↓ 1 callers
Method
finish
( self, narrowing_constraints: &mut NarrowingConstraintsBuilder, reachability_constrai
crates/ty_python_core/src/use_def.rs:522
↓ 1 callers
Method
finish
Stores use IDs and their lexical places in node-index order. The IDs themselves keep the order in which the flow builder visited uses in each scope.
crates/ty_python_core/src/ast_ids.rs:112
↓ 1 callers
Method
finish
(self)
crates/ruff_options_metadata/src/lib.rs:351
↓ 1 callers
Method
finish
(self, syntax: Mod)
crates/ruff_python_parser/src/parser/mod.rs:225
↓ 1 callers
Method
finish
(mut self)
crates/mdtest/src/parser.rs:555
↓ 1 callers
Method
finish
Emits the field that was constructed with this builder.
crates/ty_ide/src/docstring/document/rst.rs:295
↓ 1 callers
Method
finish
Finish a comparison, caching its result if the generation is unchanged. When adding a result would exceed the cache limit, discard the completed entr
crates/ty_python_semantic/src/types/equality.rs:490
↓ 1 callers
Method
finish
(&mut self)
crates/ty_python_semantic/src/types/display.rs:524
↓ 1 callers
Method
finish
(self)
crates/ty_python_semantic/src/types/cyclic.rs:589
↓ 1 callers
Method
finish
( mut self, mut storage: ConstraintSetStorage<'_>, root: InteriorNode, mapped_
crates/ty_python_semantic/src/types/constraints/owned.rs:138
↓ 1 callers
Method
finish
(self)
crates/ruff_python_index/src/multiline_ranges.rs:56
↓ 1 callers
Method
finish_annotated_assignment
Bind the value of an annotated assignment whose declaration was recorded before its RHS.
crates/ty_python_core/src/builder.rs:1690
← previous
next →
9,401–9,500 of 31,766, ranked by callers