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
Method
try_from
(qualified_name: &QualifiedName<'_>)
crates/ruff_linter/src/rules/flake8_async/helpers.rs:14
Method
try_from
(value: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/unittest_assert.rs:116
Method
try_from
(value: &CmpOp)
crates/ruff_linter/src/rules/pylint/rules/compare_to_empty_string.rs:126
Method
try_from
(literal: &str)
crates/ruff_linter/src/rules/pyflakes/format.rs:36
Method
try_from
(literal: &str)
crates/ruff_linter/src/rules/pyflakes/cformat.rs:61
Method
try_from
(literal_expr: LiteralExpressionRef<'_>)
crates/ruff_linter/src/rules/pyupgrade/rules/native_literals.rs:85
Method
try_from_builder
(builder: MemberExprBuilder)
crates/ty_python_core/src/member.rs:171
Method
try_from_call
Converts a function call [`Expr`] into a [`MinMax`] if it is a call to `min` or `max`.
crates/ruff_linter/src/rules/pylint/rules/nested_min_max.rs:102
Method
try_from_call
(call: &'a ast::ExprCall, locator: &'a Locator)
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:73
Method
try_from_call_expression
( call: &'a ast::ExprCall, semantic: &'a SemanticModel, )
crates/ruff_linter/src/rules/pylint/rules/unspecified_encoding.rs:128
Method
try_from_definition_and_name
( db: &'db dyn Db, definition: Definition<'db>, name: &str, )
crates/ty_python_semantic/src/types/function.rs:2405
Method
try_from_diagnostic
( db: &dyn Db, diagnostic: &ruff_db::diagnostic::Diagnostic, encoding: PositionEncodin
crates/ty_server/src/server/api/diagnostics.rs:652
Method
try_from_elements
A fallible version of [`UnionType::from_elements`]. If all items in `elements` are `Some()`, the result of unioning all elements is returned. As soon
crates/ty_python_semantic/src/types/set_theoretic.rs:348
Method
try_from_explicit_base
Convert an explicit base while preserving a direct use of the `Any` special form.
crates/ty_python_semantic/src/types/class_base.rs:129
Method
try_from_expr
(expression: ast::ExprRef<'_>)
crates/ty_python_core/src/member.rs:167
Method
try_from_expr
Tries to create a `PlaceExpr` from an expression. Returns `None` if the expression is not a valid place expression and `Some` otherwise. Valid expre
crates/ty_python_core/src/place.rs:63
Method
try_from_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_within_dict_call.rs:111
Method
try_from_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_within_list_call.rs:134
Method
try_from_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension.rs:255
Method
try_from_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_literal_set.rs:138
Method
try_from_expr
( expr: &'a Expr, checker: &'a Checker, version: ast::PythonVersion, )
crates/ruff_linter/src/rules/ruff/typing.rs:73
Method
try_from_extension
Infers the source type from the file extension.
crates/ruff_python_ast/src/lib.rs:122
Method
try_from_file
(db: &'db dyn Db, file: File)
crates/ty_module_resolver/src/path.rs:941
Method
try_from_file_and_name
( db: &dyn Db, file: ImportingFile<'_>, symbol_name: &str, )
crates/ty_python_semantic/src/types/special_form.rs:254
Method
try_from_file_and_name
( db: &dyn Db, file: ImportingFile<'_>, class_name: &str, )
crates/ty_python_semantic/src/types/class/known.rs:1799
Method
try_from_fn_type
Returns the decorator category for a function type.
crates/ty_python_semantic/src/types/class.rs:2716
Method
try_from_instance
Given an instance of the class or type variable `T`, returns a [`Type`] instance representing `type[T]`. Returns the unsupported component if conversi
crates/ty_python_semantic/src/types/subclass_of.rs:98
Method
try_from_iter
(patterns: I)
crates/ruff_linter/src/settings/types.rs:263
Method
try_from_line
Returns an [`Overlong`] if the measured line exceeds the configured line length, or `None` otherwise.
crates/ruff_linter/src/rules/pycodestyle/overlong.rs:18
Method
try_from_literal_expr
(literal_expr: LiteralExpressionRef<'_>)
crates/ruff_linter/src/rules/pylint/settings.rs:107
Method
try_from_member_expr
Tries to create a `PlaceExpr` from a member expression. Returns `None` if the expression is not a valid place expression and `Some` otherwise.
crates/ty_python_core/src/place.rs:86
Method
try_from_path
(path: impl AsRef<Path>)
crates/ruff_python_ast/src/lib.rs:134
Method
try_from_search_path_and_name
(search_path: &SearchPath, name: &ModuleName)
crates/ty_module_resolver/src/module.rs:353
Method
try_from_slice
(segments: &[SegmentInfo])
crates/ty_python_core/src/member.rs:858
Method
try_from_statement
Checks if the statement is a simple string that can be formatted as a docstring
crates/ruff_python_formatter/src/statement/suite.rs:806
Method
try_from_str
(name: &str)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_call_around_sorted.rs:111
Method
try_from_tokens
Attempts to convert the token into the corresponding binary-like operator. `next` is required to distinguish `is not` and `not in` from their one-toke
crates/ruff_python_parser/src/parser/expression.rs:3091
Method
try_from_type
Given the class object `T`, returns a [`Type`] instance representing `type[T]`.
crates/ty_python_semantic/src/types/subclass_of.rs:75
Method
try_from_type
Attempt to resolve `ty` into a `ClassBase`. Return `None` if `ty` is not an acceptable type for a class base.
crates/ty_python_semantic/src/types/class_base.rs:145
Method
try_from_typevar_instances
Creates a generic context, returning `None` if there are no type variables.
crates/ty_python_semantic/src/types/generics.rs:456
Method
try_from_typevar_instances_in_program
( db: &'db dyn Db, program: Program<'db>, type_params: impl IntoIterator<Item = BoundT
crates/ty_python_semantic/src/types/generics.rs:464
Function
try_imports_existing_import1
()
crates/ty_ide/src/importer.rs:1281
Function
try_imports_existing_import2
()
crates/ty_ide/src/importer.rs:1322
Function
try_imports_new_import
()
crates/ty_ide/src/importer.rs:1236
Method
try_metaclass_inner
( db: &'db dyn Db, class: StaticClassLiteral<'db>, )
crates/ty_python_semantic/src/types/class/static_literal.rs:1325
Method
try_new
(prefix: P, variable: V, suffix: S)
crates/ty_python_semantic/src/types/tuple.rs:1154
Method
try_send_deferred_request
Attempts to queue a request without blocking the main loop. Returns `false` if the main-loop queue is full or disconnected.
crates/ty_server/src/session/client.rs:80
Method
try_send_notification
Attempts to send a notification without waiting for the client channel. Returns whether the notification was queued.
crates/ty_server/src/session/client.rs:140
Method
try_stmt
(self)
crates/ruff_python_ast/src/generated.rs:893
Function
trying_multiple_imports
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:3106
Function
tstring
()
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:181
Method
tstring
(self, x)
crates/ruff_linter/resources/test/fixtures/pylint/no_self_use.py:151
Function
tstring_single_quote_escape_eol
(eol: &str)
crates/ruff_python_parser/src/lexer.rs:2557
Function
tstring_with_mixed_literals
()
crates/ty_ide/src/semantic_tokens.rs:4511
Method
tuple_alternative_count
(db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/binary_expressions.rs:66
Function
tuple_concatenation_assignment
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:3353
Method
tuple_expr
(self)
crates/ruff_python_ast/src/generated.rs:2730
Function
tuple_fields
(node: &ast::ExprTuple)
crates/ruff_python_ast/src/comparable.rs:1406
Method
turkey
(self)
crates/ty_completion_eval/truth/object-attr-instance-methods/main.py:7
Function
twice
()
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:100
Function
two_lambdas_calling_same_function_two_distinct_items
()
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:1162
Function
two_multi_and_single
()
crates/ruff_annotate_snippets/tests/formatter.rs:1414
Function
two_non_empty_returns
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR004.py:63
Function
two_returns_one_non_empty
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR004.py:15
Function
two_rule_codes_not_allowed
()
crates/mdtest/src/matcher.rs:1421
Function
two_single_line_same_line
()
crates/ruff_annotate_snippets/tests/formatter.rs:1315
Function
two_suggestions_same_span
()
crates/ruff_annotate_snippets/tests/formatter.rs:1638
Function
two_suggestions_same_span2
()
crates/ruff_annotate_snippets/tests/formatter.rs:1687
Method
ty
(self, base_ty: Type<'db>)
crates/ty_python_semantic/src/reachability.rs:1125
Function
ty_cli_reference_is_up_to_date
()
crates/ruff_dev/src/generate_ty_cli_reference.rs:335
Function
ty_configuration_markdown_up_to_date
()
crates/ruff_dev/src/generate_ty_options.rs:311
Function
ty_display
()
crates/mdtest/src/assertion.rs:572
Function
ty_environment_and_active_environment
()
crates/ty/tests/self_environment.rs:159
Function
ty_environment_and_discovered_venv
()
crates/ty/tests/self_environment.rs:74
Function
ty_environment_is_only_environment
()
crates/ty/tests/self_environment.rs:24
Function
ty_environment_is_system_not_virtual
()
crates/ty/tests/self_environment.rs:241
Function
ty_extensions_auto_import_is_type_check_only_in_stub
()
crates/ty_ide/src/completion.rs:10127
Function
ty_extensions_pydantic_auto_import_generates_import_edit
()
crates/ty_ide/src/completion.rs:10118
Function
ty_extensions_vendored
()
crates/ty_module_resolver/src/list.rs:147
Function
ty_kind_to_lsp_kind
(kind: CompletionKind)
crates/ty_server/src/server/api/requests/completion.rs:202
Function
ty_module_resolver
(bencher: Bencher)
crates/ruff_benchmark/benches/module_resolution.rs:96
Function
ty_rules_up_to_date
()
crates/ruff_dev/src/generate_ty_rules.rs:211
Function
ty_system_environment_and_local_venv
()
crates/ty/tests/self_environment.rs:288
Function
type_alias
()
crates/ty_ide/src/semantic_tokens.rs:4794
Function
type_alias_classified_consistently
()
crates/ty_ide/src/semantic_tokens.rs:3189
Method
type_alias_is_self_referential
( state: State<'db, '_>, type_alias: TypeAliasType<'db>, self_identity: Ty
crates/ty_python_semantic/src/types/typevar.rs:542
Function
type_alias_rules
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/flake8_type_checking/mod.rs:154
Function
type_alias_rules_pre_py310
(rule_code: Rule, path: &Path)
crates/ruff_linter/src/rules/flake8_type_checking/mod.rs:168
Method
type_alias_stmt
(self)
crates/ruff_python_ast/src/generated.rs:523
Function
type_alias_to_generic_alias
()
crates/ty_ide/src/semantic_tokens.rs:4111
Function
type_alias_type_of
()
crates/ty_ide/src/semantic_tokens.rs:4085
Function
type_alias_values_use_type_form_highlighting
()
crates/ty_ide/src/semantic_tokens.rs:3146
Function
type_alias_variance
()
crates/ty_python_semantic/src/types/tests.rs:875
Function
type_aliases
()
crates/ruff_python_ast_integration_tests/tests/visitor.rs:105
Function
type_aliases
()
crates/ruff_python_ast_integration_tests/tests/source_order.rs:96
Method
type_annotation
( context: InlayHintImportContext<'_, 'db>, scope_node: AnyNodeRef<'_>, position: Text
crates/ty_ide/src/inlay_hints.rs:62
Function
type_annotation_clobbers_all
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:4173
Function
type_annotation_vs_variable_classification
()
crates/ty_ide/src/semantic_tokens.rs:3966
Function
type_annotations
()
crates/ty_ide/src/semantic_tokens.rs:3108
Method
type_as_abstract_method
( db: &'db dyn Db, ty: Type<'db>, defining_class: ClassType<'db>,
crates/ty_python_semantic/src/types/abstract_methods.rs:260
← previous
next →
30,401–30,500 of 31,562, ranked by callers