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
↓ 2 callers
Method
merge_field
( &mut self, db: &'db dyn Db, field: FieldInstance<'db>, specialization: Optio
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:350
↓ 2 callers
Function
merge_receiver_constraints
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, first: Option<&ReceiverConstraints<'db>>, se
crates/ty_python_semantic/src/types/signatures.rs:115
↓ 2 callers
Method
merge_solution
( &self, types: &mut FxHashMap<BoundTypeVarIdentity<'db>, Type<'db>>, solution: &[Type
crates/ty_python_semantic/src/types/generics.rs:3095
↓ 2 callers
Method
merge_strict
(&mut self, strict: ConfigBoolean)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:346
↓ 2 callers
Method
merge_window
Set the "merge window" for annotations and fix diff hunks in this test. Nearby annotations or fix edits are rendered in a single source frame even wh
crates/ruff_db/src/diagnostic/render.rs:2573
↓ 2 callers
Method
message
(&self)
crates/mdtest/src/matcher.rs:73
↓ 2 callers
Method
message
(&self)
crates/ruff_linter/src/rules/pylint/rules/logging.rs:50
↓ 2 callers
Method
message_formats
()
crates/ruff_linter/src/violation.rs:114
↓ 2 callers
Function
metaclass_instance_type
Return the instance type of a metaclass, preserving that its instances are class objects. If the metaclass is `type[Unknown]`, ordinary instance proj
crates/ty_python_semantic/src/types/class.rs:3505
↓ 2 callers
Method
metadata
(&self)
crates/ruff_dev/src/generate_ty_options.rs:132
↓ 2 callers
Method
method
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:10
↓ 2 callers
Method
method1
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/target_version_flag.py:3
↓ 2 callers
Method
min_start
Return the [`TextSize`] of the first [`Edit`] in the [`Fix`].
crates/ruff_diagnostics/src/fix.rs:144
↓ 2 callers
Method
minimum_key_size
(&self)
crates/ruff_linter/src/rules/flake8_bandit/rules/weak_cryptographic_key.rs:72
↓ 2 callers
Function
minimum_parallel_job_len
Chooses a minimum Rayon job length without starving the worker pool on smaller inputs. The maximum should be an empirically chosen upper bound for th
crates/ty_project/src/parallel.rs:12
↓ 2 callers
Function
missing_args
(checker: &Checker, docstring: &Docstring, docstrings_args: &FxHashSet<String>)
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:1896
↓ 2 callers
Method
missing_submodule_is_terminal
(&self, context: &ResolverContext)
crates/ty_module_resolver/src/resolve.rs:1410
↓ 2 callers
Function
mixed_case_variable_in_class_scope
N815
crates/ruff_linter/src/rules/pep8_naming/rules/mixed_case_variable_in_class_scope.rs:59
↓ 2 callers
Function
mixed_case_variable_in_global_scope
N816
crates/ruff_linter/src/rules/pep8_naming/rules/mixed_case_variable_in_global_scope.rs:68
↓ 2 callers
Method
mixin_class
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/class/enum_literal.rs:211
↓ 2 callers
Function
mk_table
(safe_fixes: &[&str], unsafe_fixes: &[&str])
crates/ruff_linter/src/settings/fix_safety_table.rs:167
↓ 2 callers
Method
mode
(&self)
crates/ruff_formatter/src/format_element/tag.rs:245
↓ 2 callers
Function
model_config
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:791
↓ 2 callers
Method
modify
A private function for overriding how we update the line index by default.
crates/ty_server/src/document/text_document.rs:150
↓ 2 callers
Method
module_completions
Returns completions for symbols available in the given module as if it were imported by this model's `File`.
crates/ty_python_semantic/src/semantic_model.rs:248
↓ 2 callers
Function
module_detail
(db: &dyn Db, file: ResolverFile<'_>)
crates/ty_ide/src/call_hierarchy.rs:121
↓ 2 callers
Function
module_docstring
Get the module-level docstring for the given file.
crates/ty_python_semantic/src/lib.rs:223
↓ 2 callers
Method
module_getattr_call_failure
Recreates a failed module `__getattr__` call without caching its call bindings.
crates/ty_python_semantic/src/types.rs:1033
↓ 2 callers
Method
module_laziness
Test exact module membership in the current `__lazy_modules__` declaration. Returns [`ImportLaziness::Unknown`] for dynamic declarations or uncertain
crates/ruff_python_semantic/src/model.rs:2458
↓ 2 callers
Method
module_name
For example, given `import foo`, returns `["foo"]`.
crates/ruff_python_semantic/src/binding.rs:758
↓ 2 callers
Method
module_name_for_system_path
Derives the module name a system path would have on this search path. The path need not exist. Returns `None` if the path is outside this search path
crates/ty_module_resolver/src/path.rs:605
↓ 2 callers
Function
module_names_for_path
( db: &'a dyn Db, path: &'a SystemPath, )
crates/ty_ide/src/will_rename.rs:1331
↓ 2 callers
Method
module_owner
(&self, module: &ModuleName)
crates/ty_python_semantic/src/dependency.rs:262
↓ 2 callers
Function
module_type_body_scope
Return the body scope of the canonical `types.ModuleType` class.
crates/ty_python_semantic/src/place.rs:2406
↓ 2 callers
Function
monacoRangeToTyRange
(range: IRange)
playground/ty/src/Editor/Editor.tsx:1079
↓ 2 callers
Method
most_derived_metaclass
Select the more derived metaclass, or return `None` for a conflict. One metaclass must derive from the other. Unlike [`Self::could_coexist_in_mro_wit
crates/ty_python_semantic/src/types/class.rs:1550
↓ 2 callers
Method
must_point_directly_to_sys_prefix
Whether paths with this origin always point directly to the `sys.prefix` directory. Some variants can point either directly to `sys.prefix` or to a P
crates/ty_site_packages/src/lib.rs:2226
↓ 2 callers
Function
name
(name: &str, checker: &Checker, at: TextSize)
crates/ruff_linter/src/rules/flake8_annotations/helpers.rs:251
↓ 2 callers
Method
name
(self)
scripts/ty_benchmark/src/benchmark/tool.py:96
↓ 2 callers
Method
name
(self, name: String)
crates/ty_server/src/server/schedule/thread.rs:48
↓ 2 callers
Method
name
Returns the name used to represent the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:470
↓ 2 callers
Method
name
(self)
crates/ty_python_semantic/src/types/overrides.rs:2324
↓ 2 callers
Method
name
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:320
↓ 2 callers
Method
name
Return the name of the symbol at runtime
crates/ty_python_semantic/src/types/special_form.rs:684
↓ 2 callers
Method
name_source
Returns the binding or decorator from which this exposure gets its public name.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1044
↓ 2 callers
Method
name_type
Returns the type of `.name`/`._name_` for a given enum member. This is the canonical member name when alias detection is precise. When alias detectio
crates/ty_python_semantic/src/types/enums.rs:402
↓ 2 callers
Method
names
(self)
crates/ty_ide/src/docstring/document/google.rs:175
↓ 2 callers
Function
nan_comparison_impl
(checker: &Checker, comparators: impl Iterator<Item = &'a Expr>)
crates/ruff_linter/src/rules/pylint/rules/nan_comparison.rs:67
↓ 2 callers
Method
narrow
(&mut self, items: I)
crates/ruff_python_formatter/src/range.rs:467
↓ 2 callers
Method
narrow_nominal_attribute
( &self, attribute_value_type: Type<'db>, attribute_value_expr: &ast::Expr, at
crates/ty_python_semantic/src/types/narrow.rs:5474
↓ 2 callers
Method
narrow_offset
(&mut self, offset: TextSize)
crates/ruff_python_formatter/src/range.rs:478
↓ 2 callers
Method
narrow_place_load_source
( &self, place_expr: PlaceExprRef, operand: Option<PlaceUse>, source: &mut Res
crates/ty_python_semantic/src/types/infer/builder.rs:11128
↓ 2 callers
Method
narrow_place_with_applicable_constraints
Perform narrowing with applicable constraints between the current scope and the enclosing scope.
crates/ty_python_semantic/src/types/infer/builder.rs:10666
↓ 2 callers
Method
narrow_projected
Narrows a projected constraint while reusing suffix results for its original binding type. Registering each root lets the graph recognize shared join
crates/ty_python_semantic/src/reachability.rs:1256
↓ 2 callers
Method
narrow_source_place
( &self, place: Option<&SourcePlace>, ty: Type<'db>, constraint_keys: &[(FileS
crates/ty_python_semantic/src/types/infer/builder.rs:11258
↓ 2 callers
Function
narrow_string_membership
Narrow membership in a known string literal using substring semantics.
crates/ty_python_semantic/src/types/narrow/containment.rs:157
↓ 2 callers
Method
narrow_tuple_subscript
Narrow unions of tuples by comparing an element's value. Given a subscript expression like `t[0]` where `t` is a union of tuple types, and a comparis
crates/ty_python_semantic/src/types/narrow.rs:5344
↓ 2 callers
Method
narrow_tuple_subscript_by_type
Apply an element's type constraint to its containing tuple union.
crates/ty_python_semantic/src/types/narrow.rs:5400
↓ 2 callers
Method
narrow_typeddict_subscript
Narrow tagged unions of `TypedDict`s with `Literal` keys. Given a subscript expression like `union["tag"]` where `union` is a `TypedDict` (or union c
crates/ty_python_semantic/src/types/narrow.rs:5200
↓ 2 callers
Method
narrow_uncached
Recursively evaluates an unshared projected path while accumulating narrowing constraints.
crates/ty_python_semantic/src/reachability.rs:1687
↓ 2 callers
Method
navigation_targets
(&self, db: &dyn Db, env: &ProgramEnvironment<'_>)
crates/ty_ide/src/lib.rs:294
↓ 2 callers
Function
needs_chaperone_space
If the last line of the docstring is `content""""` or `content\"""`, we need a chaperone space that avoids `content""""` and `content\"""`. This only
crates/ruff_python_formatter/src/string/docstring.rs:1598
↓ 2 callers
Function
needs_line_break
Returns `true` if the unary operator will have a hard line break between the operator and its operand and thus requires parentheses.
crates/ruff_python_formatter/src/expression/expr_unary_op.rs:105
↓ 2 callers
Function
negate
Negate a condition, i.e., `a` => `not a` and `not a` => `a`.
crates/ruff_linter/src/cst/helpers.rs:21
↓ 2 callers
Method
negate
(&self)
crates/ruff_python_ast/src/nodes.rs:2971
↓ 2 callers
Method
negated
(self)
crates/ty_python_core/src/predicate.rs:92
↓ 2 callers
Method
negated
Reverse the defensive branches for the operand of `not`: a truthy operand makes the containing condition false, and a falsy operand makes it true. Fo
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:296
↓ 2 callers
Method
negated_divergent
Negating a divergent marker preserves the marker and flips its materialization, if any.
crates/ty_python_semantic/src/types.rs:2525
↓ 2 callers
Method
negation_is_subtype_of_cached
Return whether the negation of this type is a subtype of `target`, reusing `negated_cache` for type shapes whose negation must still be materialized.
crates/ty_python_semantic/src/types.rs:11159
↓ 2 callers
Function
nested
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF050.py:21
↓ 2 callers
Function
nested
()
crates/ruff_linter/resources/test/fixtures/pylint/await_outside_async.py:5
↓ 2 callers
Method
nested_string_quote_style
(&self)
crates/ruff_python_formatter/src/options.rs:155
↓ 2 callers
Function
nested_union_members
The members in which a bare type variable from the same union occurs inside another type. For example, in `T | list[T] | None` only `list[T]` has this
crates/ty_python_semantic/src/types/call/bind.rs:8406
↓ 2 callers
Method
new_node
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Constrai
crates/ty_python_semantic/src/types/constraints/variables.rs:124
↓ 2 callers
Function
newline_diagnostic
Possible diagnostic, with fix, for too many newlines in cell or source file
crates/ruff_linter/src/rules/pycodestyle/rules/too_many_newlines_at_end_of_file.rs:103
↓ 2 callers
Method
next
(&mut self)
crates/ruff_unicode_names2_generator/src/util.rs:33
↓ 2 callers
Method
next
(&mut self)
crates/ruff_unicode_names2_generator/src/trie.rs:77
↓ 2 callers
Method
next
(&mut self)
crates/ruff_python_ast/src/identifier.rs:220
↓ 2 callers
Method
next
(&mut self)
crates/ty_python_core/src/use_def.rs:1561
↓ 2 callers
Method
next
(&mut self)
crates/mdtest/src/parser.rs:183
↓ 2 callers
Method
next
(&mut self)
crates/ty_python_semantic/src/types/mro.rs:706
↓ 2 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:147
↓ 2 callers
Method
next_non_trivia_token
Returns the next non-trivia token without adding it to the token vector.
crates/ruff_python_parser/src/token_source.rs:186
↓ 2 callers
Method
next_non_variadic
(&mut self)
crates/ruff_python_ast/src/nodes.rs:3587
↓ 2 callers
Method
next_siblings
(&self)
crates/ruff_python_ast/src/traversal.rs:73
↓ 2 callers
Method
next_source
Move to the next parameter in the `source` parameter iterator, [`None`] if the iterator is exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3184
↓ 2 callers
Method
next_token
(&mut self)
crates/ruff_python_ast/src/identifier.rs:175
↓ 2 callers
Method
no_instance_fallback
Only look up the attribute on the meta-type. If false - Look up the attribute on the meta-type, but fall back to attributes on the instance if the me
crates/ty_python_semantic/src/types.rs:1407
↓ 2 callers
Method
node
Returns the underlying node.
crates/ruff_python_formatter/src/comments/node_key.rs:22
↓ 2 callers
Method
node
Returns the covering node found.
crates/ruff_python_ast/src/find_node.rs:72
↓ 2 callers
Method
node_support_id
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1588
↓ 2 callers
Function
nominal_intersection_bound
Recognize a single nominal positive and nominal exclusions, without alias, type-variable, or enum-literal operands. These classes can still inherit sp
crates/ty_python_semantic/src/types/relation.rs:269
↓ 2 callers
Function
non_alias_assignment
( db: &'db dyn Db, definition: Definition<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:174
↓ 2 callers
Function
non_default_follows_default
Returns `true` if a type variable without a default follows a type variable with a default. In a PEP 695 type parameter list this is a syntax error:
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:391
↓ 2 callers
Function
non_lowercase_variable_in_function
N806
crates/ruff_linter/src/rules/pep8_naming/rules/non_lowercase_variable_in_function.rs:55
↓ 2 callers
Function
non_object_protocol_member_count
( db: &'db dyn Db, interface: ProtocolInterface<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:3595
↓ 2 callers
Function
non_recursive_protocol_interface
( db: &'db dyn Db, interface: ProtocolInterface<'db>, protocol: ProtocolClass<'db>, receiver_t
crates/ty_python_semantic/src/types/instance.rs:1450
↓ 2 callers
Method
nonlocal
Given a `name` that has been declared `nonlocal`, return the [`ScopeId`] and [`BindingId`] to which it refers. Unlike `global` declarations, for whic
crates/ruff_python_semantic/src/model.rs:1817
↓ 2 callers
Function
noop
Return a no-op edit for the given name.
crates/ruff_linter/src/rules/pylint/rules/unnecessary_dict_index_lookup.rs:162
↓ 2 callers
Function
noop
Return a no-op edit for the given name.
crates/ruff_linter/src/rules/pylint/rules/unnecessary_list_index_lookup.rs:177
← previous
next →
6,501–6,600 of 31,766, ranked by callers