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
module_import_not_at_top_of_file
E402
crates/ruff_linter/src/rules/pycodestyle/rules/module_import_not_at_top_of_file.rs:79
↓ 1 callers
Function
module_item
Build an item for the module-level enclosing scope (no enclosing function).
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:469
↓ 1 callers
Method
module_name
(&self)
crates/ty_ide/src/symbols.rs:459
↓ 1 callers
Method
module_name
(mut self, name: &'db ModuleName)
crates/ty_ide/src/completion.rs:599
↓ 1 callers
Function
module_name_for_path
Derives a module name from the first applicable search path, without requiring the path to exist.
crates/ty_ide/src/will_rename.rs:1327
↓ 1 callers
Function
module_search_snapshot
( db: &'db dyn Db, name: ModuleNameIngredient<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:472
↓ 1 callers
Function
module_type_body_scope_inner
( db: &'db dyn Db, program: Program<'db>, )
crates/ty_python_semantic/src/place.rs:2414
↓ 1 callers
Function
module_type_implicit_global_declaration
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, )
crates/ty_python_semantic/src/place.rs:2427
↓ 1 callers
Function
module_type_symbols_from_scope
An internal micro-optimisation for `module_type_implicit_global_symbol`. This function returns a list of the symbols that typeshed declares in the bo
crates/ty_python_semantic/src/place.rs:2567
↓ 1 callers
Function
module_type_symbols_inner
( db: &'db dyn Db, program: Program<'db>, )
crates/ty_python_semantic/src/place.rs:2599
↓ 1 callers
Function
module_visibility
Infer the [`Visibility`] of a module from its path.
crates/ruff_python_semantic/src/analyze/visibility.rs:166
↓ 1 callers
Method
most_expanded
Returns the most expanded variant # Panics When the number of variants is less than two.
crates/ruff_formatter/src/format_element.rs:355
↓ 1 callers
Method
most_precise
Given two [`TupleLength`]s, return the more precise instance, if it makes sense to consider one more precise than the other.
crates/ty_python_semantic/src/types/tuple.rs:82
↓ 1 callers
Function
move_imports
Generate a [`Fix`] to remove runtime imports from a type-checking block.
crates/ruff_linter/src/rules/flake8_type_checking/rules/runtime_import_in_type_checking_block.rs:318
↓ 1 callers
Function
move_initialization
Generate a [`Fix`] to move a mutable argument default initialization into the function body.
crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs:152
↓ 1 callers
Method
move_to
Moves current block to provided index
crates/ruff_python_semantic/src/cfg/graph.rs:292
↓ 1 callers
Function
moved_to_provider_in_3
AIR302
crates/ruff_linter/src/rules/airflow/rules/moved_to_provider_in_3.rs:98
↓ 1 callers
Method
moves_module
Returns whether the module resolves entirely within the directory being renamed. For instance, this is false when the rename targets only one directo
crates/ty_ide/src/will_rename.rs:300
↓ 1 callers
Function
mro_member_definitions
Finds the member definitions selected by normal Python MRO lookup for `class`. This intentionally stops at the first class in the MRO that defines `m
crates/ty_python_semantic/src/types/ide_support.rs:552
↓ 1 callers
Method
mro_no_int_or_str_fallback
Exclude attributes defined on `int` or `str` when looking up attributes.
crates/ty_python_semantic/src/types.rs:1422
↓ 1 callers
Method
multi_bindings_at_use
( &self, use_id: ScopedUseId, )
crates/ty_python_core/src/use_def.rs:1122
↓ 1 callers
Function
multi_line_summary_start
D212, D213
crates/ruff_linter/src/rules/pydocstyle/rules/multi_line_summary_start.rs:144
↓ 1 callers
Method
multi_suggestion_separator
(&self)
crates/ruff_annotate_snippets/src/renderer/mod.rs:313
↓ 1 callers
Function
multiline_string_sequence_postlude
Return a string representing the "postlude" for a multiline string sequence. See inline comments in `MultilineStringSequence::into_sorted_source_code
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:956
↓ 1 callers
Function
multiline_string_sequence_prelude
Return a string representing the "prelude" for a multiline string sequence. See inline comments in `MultilineStringSequenceValue::into_sorted_source_
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:883
↓ 1 callers
Function
multiple_imports_on_one_line
E401
crates/ruff_linter/src/rules/pycodestyle/rules/multiple_imports_on_one_line.rs:52
↓ 1 callers
Function
multiple_starts_ends_with
PIE810
crates/ruff_linter/src/rules/flake8_pie/rules/multiple_starts_ends_with.rs:72
↓ 1 callers
Function
multiple_with_statements
SIM117
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_with.rs:125
↓ 1 callers
Method
must_be_virtual_env
Whether the given `sys.prefix` path must be a virtual environment (rather than a system Python environment).
crates/ty_site_packages/src/lib.rs:2207
↓ 1 callers
Function
mutable_argument_default
B006
crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs:100
↓ 1 callers
Function
mutable_class_default
RUF012
crates/ruff_linter/src/rules/ruff/rules/mutable_class_default.rs:104
↓ 1 callers
Function
mutable_contextvar_default
B039
crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_contextvar_default.rs:73
↓ 1 callers
Function
mutable_dataclass_default
RUF008
crates/ruff_linter/src/rules/ruff/rules/mutable_dataclass_default.rs:75
↓ 1 callers
Function
mutable_fromkeys_value
RUF024
crates/ruff_linter/src/rules/ruff/rules/mutable_fromkeys_value.rs:70
↓ 1 callers
Function
my_dag
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR003_dag_decorator.py:8
↓ 1 callers
Function
my_func
()
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S104.py:18
↓ 1 callers
Function
my_task
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR003_dag_decorator.py:10
↓ 1 callers
Method
name
(&self)
crates/ty_project/src/metadata.rs:391
↓ 1 callers
Method
name
(&self)
crates/ruff_source_file/src/lib.rs:158
↓ 1 callers
Method
name
Return the name of the module.
crates/ruff_python_semantic/src/definition.rs:72
↓ 1 callers
Method
name
Returns the name of the binding (e.g., `x` in `x = 1`).
crates/ruff_python_semantic/src/binding.rs:272
↓ 1 callers
Method
name
(&self)
crates/ty_python_core/src/symbol.rs:61
↓ 1 callers
Method
name
(&self)
crates/ty_ide/src/goto_definition.rs:2910
↓ 1 callers
Method
name
The declared alias name, shared by all specializations of this constructor.
crates/ty_python_semantic/src/types/recursive.rs:492
↓ 1 callers
Method
name
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:151
↓ 1 callers
Function
name_5
()
crates/ty_python_semantic/resources/corpus/cyclic_symbol_in_comprehension.py:29
↓ 1 callers
Function
name_condition_definition_info
( db: &'db dyn Db, scope: ScopeId<'db>, name: Name, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:632
↓ 1 callers
Function
name_matches_parameter
Returns `true` when `argument_name` case-insensitively matches the parameter name, or has the parameter name as a full underscore-separated prefix or
crates/ty_ide/src/inlay_hints.rs:683
↓ 1 callers
Function
name_or_attribute
YTT202
crates/ruff_linter/src/rules/flake8_2020/rules/name_or_attribute.rs:51
↓ 1 callers
Function
named_expr_without_context
PLW0131
crates/ruff_linter/src/rules/pylint/rules/named_expr_without_context.rs:40
↓ 1 callers
Method
named_return_types
The offending return types, paired with the name of the method that returned each one.
crates/ty_python_semantic/src/types/context_manager.rs:325
↓ 1 callers
Function
namedtuple_base
If the class's bases consist solely of named tuples, return the kind of named tuple (either `collections.namedtuple()`, or `typing.NamedTuple()`). Oth
crates/ruff_linter/src/rules/flake8_slots/rules/no_slots_in_namedtuple_subclass.rs:103
↓ 1 callers
Method
namedtuple_base_has_unknown_fields
Returns `true` if this class inherits from a functional namedtuple (`DynamicNamedTupleLiteral`) that has unknown fields. When the base namedtuple's f
crates/ty_python_semantic/src/types/class/static_literal.rs:244
↓ 1 callers
Function
names
(table: &PlaceTable)
crates/ty_python_core/src/lib.rs:1238
↓ 1 callers
Method
names
The names inside the `__all__` definition.
crates/ruff_python_semantic/src/model/all.rs:62
↓ 1 callers
Function
namespace_package
()
crates/ty_module_resolver/src/list.rs:1305
↓ 1 callers
Function
nan_comparison
PLW0177
crates/ruff_linter/src/rules/pylint/rules/nan_comparison.rs:53
↓ 1 callers
Function
nan_comparison_match
PLW0177
crates/ruff_linter/src/rules/pylint/rules/nan_comparison.rs:58
↓ 1 callers
Method
narrow_end
(&mut self, offset: TextSize)
crates/ruff_python_formatter/src/range.rs:489
↓ 1 callers
Method
narrow_join
Evaluates one projected join from its boundary and caches its narrowed suffix type.
crates/ty_python_semantic/src/reachability.rs:1658
↓ 1 callers
Function
narrow_literal_comparison
Return a constraint for literal pairs whose equality cannot be decided statically. A concrete string or string-valued enum member can constrain a `Li
crates/ty_python_semantic/src/types/equality.rs:1565
↓ 1 callers
Function
narrow_literal_string_against_enum
Narrow `LiteralString` against a string-valued enum member with inherited `str` semantics.
crates/ty_python_semantic/src/types/equality.rs:1584
↓ 1 callers
Method
narrow_nominal_attribute_by_truthiness
( &self, attribute_value_type: Type<'db>, attribute_value_expr: &ast::Expr, at
crates/ty_python_semantic/src/types/narrow.rs:5523
↓ 1 callers
Function
narrow_range
Narrows the formatting `range` to a smaller sub-range than the enclosing node's range. The range is narrowed by searching the enclosing node's childr
crates/ruff_python_formatter/src/range.rs:326
↓ 1 callers
Method
narrow_start
(&mut self, offset: TextSize)
crates/ruff_python_formatter/src/range.rs:483
↓ 1 callers
Method
narrow_tuple_subscript_by_truthiness
Narrow unions of tuples based on the truthiness of an element.
crates/ty_python_semantic/src/types/narrow.rs:5372
↓ 1 callers
Function
narrow_type_by_constraint
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, evaluator: &NarrowingEvaluator<'_, 'db>, bas
crates/ty_python_semantic/src/reachability.rs:1006
↓ 1 callers
Method
narrow_typeddict_subscript_by_truthiness
Narrow tagged unions of `TypedDict`s based on the truthiness of a `Literal` key.
crates/ty_python_semantic/src/types/narrow.rs:5269
↓ 1 callers
Method
narrow_with_present_key
TODO: Restructure this helper to return the key-presence constraint and apply it with `NarrowingConstraint::intersection` at the call site instead of
crates/ty_python_semantic/src/types/narrow.rs:5302
↓ 1 callers
Method
narrowing_alias_predicate
Returns alias metadata for an alias Name node in a predicate, if one exists.
crates/ty_python_core/src/lib.rs:397
↓ 1 callers
Method
narrowing_constraint_between
Combines the narrowing gates after `ancestor` through `target` into one constraint. `ancestor` must be an ancestor of `target`.
crates/ty_python_core/src/use_def.rs:1956
↓ 1 callers
Method
narrowing_constraints_for
( &self, source: &PlaceLoadSource<'_>, )
crates/ty_python_semantic/src/place_load.rs:845
↓ 1 callers
Method
narrowing_gate
Converts a reachability formula into a narrowing gate. An ambiguous reachability leaf cannot exclude a control-flow path, so its narrowing gate is `A
crates/ty_python_core/src/reachability_constraints.rs:243
↓ 1 callers
Function
native_literals
UP018
crates/ruff_linter/src/rules/pyupgrade/rules/native_literals.rs:186
↓ 1 callers
Function
necessary_sequence_pattern_type
Preserve the sequence element constraints that can be addressed at fixed indices.
crates/ty_python_semantic/src/types/narrow.rs:1606
↓ 1 callers
Function
needless_bool
SIM103
crates/ruff_linter/src/rules/flake8_simplify/rules/needless_bool.rs:94
↓ 1 callers
Function
needless_else
RUF047
crates/ruff_linter/src/rules/ruff/rules/needless_else.rs:50
↓ 1 callers
Function
needs_bracket_spacing
(expr: &Expr, context: &PyFormatContext)
crates/ruff_python_formatter/src/other/interpolated_string_element.rs:298
↓ 1 callers
Function
needs_paren
(precedence: OperatorPrecedence)
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:212
↓ 1 callers
Function
needs_paren_expr
(arg: &Expr)
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:216
↓ 1 callers
Method
needs_parentheses
( &self, parent: AnyNodeRef, context: &PyFormatContext, )
crates/ruff_python_formatter/src/expression/mod.rs:450
↓ 1 callers
Method
needs_parentheses
( &self, parent: AnyNodeRef, _context: &PyFormatContext, )
crates/ruff_python_formatter/src/expression/expr_lambda.rs:189
↓ 1 callers
Function
needs_parentheses_for_precedence
Check if the union expression needs parentheses to preserve operator precedence. This is needed when the union is part of a larger expression where th
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_none_literal.rs:281
↓ 1 callers
Method
negate
(mut self)
crates/ruff_python_ast/src/comparable.rs:2142
↓ 1 callers
Method
negate
(self)
crates/ty_python_core/src/lib.rs:1018
↓ 1 callers
Method
negation_is_subtype_of
Return whether the negation of this intersection is a subtype of `target`. Applying De Morgan's law to an intersection produces a union. Checking eac
crates/ty_python_semantic/src/types.rs:11256
↓ 1 callers
Function
negation_with_equal_op
SIM201
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_unary_op.rs:159
↓ 1 callers
Function
negation_with_not_equal_op
SIM202
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_unary_op.rs:202
↓ 1 callers
Function
negative_range
check that gaps have no names (these are unassigned/control codes).
crates/ruff_unicode_names2/src/lib.rs:423
↓ 1 callers
Function
nested1
(x, y, z)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET508.py:120
↓ 1 callers
Function
nested2
(x, y, z)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET508.py:130
↓ 1 callers
Function
nested_1
empty
crates/ruff_linter/resources/test/fixtures/pylint/too_many_branches.py:43
↓ 1 callers
Function
nested_if_body
Returns the body, the range of the `if` or `elif` and whether the range is for an `if` or `elif`
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:207
↓ 1 callers
Function
nested_if_statements
SIM102
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:84
↓ 1 callers
Function
nested_min_max
PLW3301
crates/ruff_linter/src/rules/pylint/rules/nested_min_max.rs:172
↓ 1 callers
Method
nested_test
Return the context for a boolean test inside another expression, such as a `not` expression passed as a call argument. An [`Self::Assertion`] context
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:318
↓ 1 callers
Method
nested_union_specialization
For `x: T | list[T]`, a `list[int]` argument can match `T` with `T = list[int]` or `list[T]` with `T = int`. Using both bindings to specialize `list[T
crates/ty_python_semantic/src/types/call/bind.rs:9193
↓ 1 callers
Function
never_union
RUF020
crates/ruff_linter/src/rules/ruff/rules/never_union.rs:76
↓ 1 callers
Method
new
(db: &'a dyn Db, project: Project)
crates/ty_project/src/lib.rs:1074
↓ 1 callers
Method
new
(cwd: impl AsRef<SystemPath>)
crates/ruff_db/src/system/os.rs:39
← previous
next →
11,801–11,900 of 31,766, ranked by callers