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
↓ 1 callers
Function
f_string_in_gettext_func_call
INT001
crates/ruff_linter/src/rules/flake8_gettext/rules/f_string_in_gettext_func_call.rs:68
↓ 1 callers
Function
f_string_missing_placeholders
F541
crates/ruff_linter/src/rules/pyflakes/rules/f_string_missing_placeholders.rs:77
↓ 1 callers
Function
f_strings
UP032
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:425
↓ 1 callers
Function
fail_call
PT016
crates/ruff_linter/src/rules/flake8_pytest_style/rules/fail.rs:62
↓ 1 callers
Function
fake_func
()
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S701.py:27
↓ 1 callers
Method
fallback
( &self, result: Result<T, E>, fallback_fn: impl FnOnce(E) -> T, )
crates/ty_module_resolver/src/strategy.rs:102
↓ 1 callers
Method
fallback
Constructs [`RuffSettings`] by attempting to resolve settings from a user-provided configuration file, such as `pyproject.toml` or `ruff.toml`, within
crates/ruff_server/src/session/index/ruff_settings.rs:70
↓ 1 callers
Method
fallback_mro
Return the fallback MRO to use for type inference.
crates/ty_python_semantic/src/types/mro.rs:989
↓ 1 callers
Method
fallback_options
(&self)
crates/ty_server/src/session/settings.rs:63
↓ 1 callers
Method
fallback_registration
( &mut self, workspaces: &Workspaces, cache_key: u64, )
crates/ty_server/src/session/file_watcher.rs:183
↓ 1 callers
Method
fallback_return_type
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call.rs:535
↓ 1 callers
Method
fallback_type
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:605
↓ 1 callers
Function
fallible_context_manager
RUF075
crates/ruff_linter/src/rules/ruff/rules/fallible_context_manager.rs:64
↓ 1 callers
Function
falsy_dict_get_fallback
RUF056
crates/ruff_linter/src/rules/ruff/rules/falsy_dict_get_fallback.rs:63
↓ 1 callers
Function
fastapi_non_annotated_dependency
FAST002
crates/ruff_linter/src/rules/fastapi/rules/fastapi_non_annotated_dependency.rs:107
↓ 1 callers
Function
fastapi_redundant_response_model
FAST001
crates/ruff_linter/src/rules/fastapi/rules/fastapi_redundant_response_model.rs:83
↓ 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:83
↓ 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:404
↓ 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:644
↓ 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:190
↓ 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:2568
↓ 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:1313
↓ 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:1982
↓ 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:400
↓ 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:780
↓ 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:2502
↓ 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:873
↓ 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:4298
↓ 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:4334
↓ 1 callers
Method
filter_targets_by_conditions
( &'a self, mut predicate: T, )
crates/ruff_python_semantic/src/cfg/graph.rs:142
↓ 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:728
↓ 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:1444
↓ 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:174
↓ 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:199
↓ 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:232
↓ 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:3214
↓ 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:3231
↓ 1 callers
Function
find_backticked_shortcut_links
Check for links of the form: [`foobar`]. See explanation at #16010.
scripts/check_docs_formatted.py:291
↓ 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:509
↓ 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:464
↓ 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:552
↓ 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:1912
↓ 1 callers
Method
find_line_with_directive
(&self, offset: TextSize)
crates/ruff_linter/src/noqa.rs:1269
↓ 1 callers
Method
find_line_with_directive_mut
( &mut self, offset: TextSize, )
crates/ruff_linter/src/noqa.rs:1273
↓ 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:370
↓ 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:197
↓ 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_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:68
↓ 1 callers
Function
find_pyproject_config
Find the [`PyprojectConfig`] to use for formatting.
crates/ruff_dev/src/format_dev.rs: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:69
↓ 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:495
↓ 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:436
↓ 1 callers
Function
fingerprint
Generate a unique fingerprint to identify a violation.
crates/ruff_db/src/diagnostic/render/gitlab.rs:161
↓ 1 callers
Function
fingerprint_unsupported_syntax_error
( error: &UnsupportedSyntaxError, node_id: usize, salt: u64, )
crates/ruff_python_formatter/tests/fixtures.rs:666
← previous
next →
9,301–9,400 of 31,562, ranked by callers