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
Method
definition_matches_fixture_target
( &mut self, definition: Definition<'a>, fixture_resolution: &FixtureReferenceResoluti
crates/ty_ide/src/references.rs:838
↓ 1 callers
Method
definition_modules
Return the module(s) in which this special form could be defined
crates/ty_python_semantic/src/types/special_form.rs:735
↓ 1 callers
Function
definition_reachability
( db: &'db dyn Db, scope: ScopeId<'db>, place: ScopedPlaceId, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:531
↓ 1 callers
Method
definition_reaches
(&self, from: Definition<'db>, to: Definition<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:535
↓ 1 callers
Function
definitions
Run lint rules over all [`Definition`] nodes in the [`SemanticModel`]. This phase is expected to run after the AST has been traversed in its entirety
crates/ruff_linter/src/checkers/ast/analyze/definitions.rs:19
↓ 1 callers
Method
definitions
(&self, definition_key: impl Into<DefinitionNodeKey>)
crates/ty_python_core/src/lib.rs:690
↓ 1 callers
Function
definitions_and_overloads_for_function
Returns the definition and overload co-definitions for a function declaration. For overloaded functions this includes sibling overload declarations a
crates/ty_python_semantic/src/types/ide_support.rs:933
↓ 1 callers
Function
definitions_for_attribute
Returns source definitions for a member of an already-inferred receiver type. During type inference, a caller may already know the type of `obj` in `
crates/ty_python_semantic/src/types/definition_resolution.rs:333
↓ 1 callers
Function
definitions_for_attribute_in_class_hierarchy
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, class_literal: &ClassLiteral<'db>, attribute
crates/ty_python_semantic/src/types/definition_resolution.rs:449
↓ 1 callers
Function
definitions_for_callable
( model: &SemanticModel<'db>, call: &ast::ExprCall, )
crates/ty_ide/src/goto.rs:1421
↓ 1 callers
Method
definitions_for_dictionary_key_completion
Returns definitions that may supply `receiver`'s value for dictionary key completion. Names use [`Self::reaching_definitions()`], including any defin
crates/ty_python_semantic/src/semantic_model.rs:840
↓ 1 callers
Function
definitions_for_keyword_argument
Returns definitions for a keyword argument in a call expression. This resolves the keyword argument to the corresponding parameter(s) in the callable'
crates/ty_python_semantic/src/types/ide_support.rs:871
↓ 1 callers
Function
definitions_for_module
Helper function to resolve a module name and create a navigation target.
crates/ty_ide/src/goto.rs:1484
↓ 1 callers
Function
definitions_for_module_global
Returns the definitions that may supply a module global at the end of its scope.
crates/ty_python_semantic/src/place/definitions.rs:16
↓ 1 callers
Function
definitions_for_name
Resolves a name's source definitions in `scope` and its visible ancestors, falling back to implicit builtins if none are found. This function reads b
crates/ty_python_semantic/src/types/definition_resolution.rs:166
↓ 1 callers
Function
definitions_to_implementation_targets
( db: &dyn Db, definitions: Vec<ResolvedDefinition>, )
crates/ty_ide/src/goto_implementation.rs:170
↓ 1 callers
Function
delattr_with_constant
B043
crates/ruff_linter/src/rules/flake8_bugbear/rules/delattr_with_constant.rs:65
↓ 1 callers
Method
delayed_annotations
Return the list of delayed annotations for the given [`BindingId`].
crates/ruff_python_semantic/src/model.rs:2020
↓ 1 callers
Method
delete_associated_bindings
(&mut self, place: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1545
↓ 1 callers
Function
delete_full_slice
FURB131
crates/ruff_linter/src/rules/refurb/rules/delete_full_slice.rs:60
↓ 1 callers
Method
delimited_range
Returns the range inside a delimiter pair that bounds the given range.
crates/ty_ide/src/folding_range.rs:540
↓ 1 callers
Function
demote_diagnostics
Demotes matched diagnostics to hints and adds a note identifying the baseline.
crates/ty_project/src/baseline.rs:95
↓ 1 callers
Method
demote_subject
Mark every contribution as referring to a value extracted from the current subject.
crates/ty_python_semantic/src/types/narrow.rs:357
↓ 1 callers
Method
denoted
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/union_type_instance.rs:60
↓ 1 callers
Function
dependency_metadata
(root: &SystemPath, path: &SystemPath, dependencies: &[&str])
crates/ty_project/src/uv/environments.rs:916
↓ 1 callers
Method
dependency_metadata
(&self, file: File)
crates/ty_test/src/db.rs:182
↓ 1 callers
Function
dependents
()
crates/ruff/tests/analyze_graph.rs:100
↓ 1 callers
Method
deprecated
(mut self, deprecated: bool)
crates/ty_ide/src/completion.rs:609
↓ 1 callers
Function
deprecated_abc_decorator
UP051
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_abc_decorator.rs:76
↓ 1 callers
Function
deprecated_c_element_tree
UP023
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_c_element_tree.rs:62
↓ 1 callers
Function
deprecated_function
NPY003
crates/ruff_linter/src/rules/numpy/rules/deprecated_function.rs:60
↓ 1 callers
Function
deprecated_import
UP035
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs:758
↓ 1 callers
Function
deprecated_mock_attribute
UP026
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:264
↓ 1 callers
Function
deprecated_mock_import
UP026
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:287
↓ 1 callers
Function
deprecated_type_alias
NPY001
crates/ruff_linter/src/rules/numpy/rules/deprecated_type_alias.rs:56
↓ 1 callers
Function
deprecated_unittest_alias
UP005
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_unittest_alias.rs:83
↓ 1 callers
Method
deref
(&self)
crates/ruff_formatter/src/format_element.rs:189
↓ 1 callers
Method
deref
(&self)
crates/ruff/src/commands/completions/config.rs:83
↓ 1 callers
Function
derive_cache_key
(item: &DeriveInput)
crates/ruff_macros/src/cache_key.rs:7
↓ 1 callers
Method
description
(&self)
crates/ruff/src/args.rs:946
↓ 1 callers
Method
description
Returns the wording used for this variable kind in diagnostics.
crates/ty_python_semantic/src/types/overrides.rs:1674
↓ 1 callers
Method
description
(self)
crates/ruff_linter/src/codes.rs:174
↓ 1 callers
Function
description_block_start
Returns the byte offset where `description` first needs block-style rendering.
crates/ty_ide/src/docstring/markdown/structured.rs:344
↓ 1 callers
Method
descriptor_binding
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/bound_super.rs:300
↓ 1 callers
Function
descriptor_decorated_protocol_member
Derive the observable instance capabilities of a descriptor-decorated protocol member.
crates/ty_python_semantic/src/types/protocol_class.rs:2495
↓ 1 callers
Function
descriptor_get_result
( return_type: Type<'db>, kind: AttributeKind, error: Option<DescriptorGetCallContext<'db>>, )
crates/ty_python_semantic/src/types.rs:880
↓ 1 callers
Function
descriptor_setter_accepts_receiver
( db: &'db dyn Db, program: Program<'db>, descriptor_ty: Type<'db>, receiver_ty: Type<'db>, )
crates/ty_python_semantic/src/types/attribute_write.rs:1158
↓ 1 callers
Function
descriptor_setter_signature_domain
Derive the values accepted by one setter overload when they fit in [`Type`].
crates/ty_python_semantic/src/types/attribute_write.rs:1268
↓ 1 callers
Function
descriptor_write_domain
Return the input type accepted by every possible descriptor or instance-storage path. Union alternatives require the intersection of their accepted t
crates/ty_python_semantic/src/types/overrides/attributes.rs:360
↓ 1 callers
Function
desperately_resolve_name
Like `resolve_name` but for cases where it failed to resolve the module and we are now Getting Desperate and willing to try the ancestor directories o
crates/ty_module_resolver/src/resolve.rs:1222
↓ 1 callers
Method
dest
(&self)
crates/ruff_diagnostics/src/source_map.rs:24
↓ 1 callers
Function
destination_module_name
Derives a destination module name without requiring the destination to exist yet.
crates/ty_ide/src/will_rename.rs:1097
↓ 1 callers
Function
detectInitialTheme
()
playground/shared/src/theme.ts:24
↓ 1 callers
Function
detect_indentation
(tokens: &[Token], source: &str)
crates/ruff_python_codegen/src/stylist.rs:90
↓ 1 callers
Function
detect_insecure_crypt_calls
(checker: &Checker, call: &ast::ExprCall)
crates/ruff_linter/src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs:178
↓ 1 callers
Function
detect_insecure_hashlib_calls
( checker: &Checker, call: &ast::ExprCall, hashlib_call: HashlibCall, )
crates/ruff_linter/src/rules/flake8_bandit/rules/hashlib_insecure_hash_functions.rs:133
↓ 1 callers
Function
detect_invalid_pre_py39_decorator_node
Helper for `parse_decorators` to determine if `expr` is a [`dotted_name`] from the decorator grammar before Python 3.9. Returns `Some((error, range))
crates/ruff_python_parser/src/parser/helpers.rs:61
↓ 1 callers
Function
detect_package_root_with_cache
A wrapper around `detect_package_root` to cache filesystem lookups.
crates/ruff_workspace/src/resolver.rs:271
↓ 1 callers
Function
detect_quote
(tokens: &[Token])
crates/ruff_python_codegen/src/stylist.rs:77
↓ 1 callers
Function
detect_set_function_args
Returns function arguments that have already been set. If `offset` is inside an arguments node, this returns the list of argument names that are alre
crates/ty_ide/src/completion.rs:2224
↓ 1 callers
Function
determine_applicability
(binding: &Binding, scope: &Scope, checker: &Checker)
crates/ruff_linter/src/rules/flake8_pyi/rules/unaliased_collections_abc_set_import.rs:93
↓ 1 callers
Function
determine_git_protocol
(argv: list[str] | None = None)
scripts/update_schemastore.py:170
↓ 1 callers
Method
diagnosticAnnotationRelatedInformation
( annotation: DiagnosticAnnotation, message: string, )
playground/ty/src/Editor/Editor.tsx:1029
↓ 1 callers
Function
diagnosticDisplayMessage
(diagnostic: Diagnostic)
playground/ty/src/Editor/Editor.tsx:1064
↓ 1 callers
Function
diagnosticLocationRelatedInformation
( message: string, location: DiagnosticLocation | null, resource: editor.ITextModel["uri"], )
playground/ruff/src/Editor/SourceEditor.tsx:250
↓ 1 callers
Function
diagnosticMarkerMessage
(diagnostic: Diagnostic)
playground/ruff/src/Editor/SourceEditor.tsx:211
↓ 1 callers
Function
diagnosticRelatedInformation
( diagnostic: Diagnostic, resource: editor.ITextModel["uri"], )
playground/ruff/src/Editor/SourceEditor.tsx:225
↓ 1 callers
Method
diagnosticRelatedInformation
( diagnostic: Diagnostic, )
playground/ty/src/Editor/Editor.tsx:1004
↓ 1 callers
Function
diagnostic_display_config
(tool_name: &'static str)
crates/mdtest/src/lib.rs:317
↓ 1 callers
Function
diagnostic_edit_range
(range: TextRange, context: &LspDiagnosticContext)
crates/ruff_server/src/lint.rs:577
↓ 1 callers
Function
diagnostic_for
Return the [`Diagnostic`] for the given import type.
crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs:554
↓ 1 callers
Function
diagnostic_for_argument
Check if the `deprecated` keyword argument is being used and create a diagnostic if so along with a possible `replacement`.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:1152
↓ 1 callers
Function
diagnostic_for_argument
Check if the `deprecated` keyword argument is being used and create a diagnostic if so along with a possible `replacement`.
crates/ruff_linter/src/rules/airflow/rules/suggested_to_update_3_0.rs:120
↓ 1 callers
Method
diagnostic_kind
( self, checker: &'a Checker<'b>, argument_name: String, range: TextRange,
crates/ruff_linter/src/rules/pep8_naming/rules/invalid_first_argument_name.rs:170
↓ 1 callers
Function
diagnostic_kind_for_operator
( operator: TokenKind, range: TextRange, context: &'a LintContext<'a>, )
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/missing_whitespace_around_operator.rs:344
↓ 1 callers
Method
diagnostic_overload_indexes
Returns the distinct source overload indexes that should be shown in diagnostics. Bound method overloads preserve their source indexes after receiver
crates/ty_python_semantic/src/types/call/bind.rs:3868
↓ 1 callers
Function
diagnostic_to_json
( diagnostic: &'a Diagnostic, resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig,
crates/ruff_db/src/diagnostic/render/json.rs:51
↓ 1 callers
Function
diagnostic_to_rdjson
( diagnostic: &'a Diagnostic, resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig,
crates/ruff_db/src/diagnostic/render/rdjson.rs:62
↓ 1 callers
Method
diagnostic_type
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:1596
↓ 1 callers
Method
diagnostics
(&self)
crates/ty_python_semantic/src/fixes.rs:707
↓ 1 callers
Method
diagnostics
(&self)
crates/ty_python_semantic/src/types/infer.rs:1125
↓ 1 callers
Function
diagnostics_are_equivalent
Compare two diagnostic lists for equality, ignoring the ``source`` field.
scripts/conformance.py:276
↓ 1 callers
Function
diagnostics_to_messages
Convert various error types into a single collection of diagnostics. Also use `directives` to attach noqa offsets to lint diagnostics.
crates/ruff_linter/src/linter.rs:487
↓ 1 callers
Function
dict_get_with_none_default
SIM910
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs:256
↓ 1 callers
Function
dict_index_missing_items
PLC0206
crates/ruff_linter/src/rules/pylint/rules/dict_index_missing_items.rs:70
↓ 1 callers
Function
dict_iter_missing_items
PLE1141
crates/ruff_linter/src/rules/pylint/rules/dict_iter_missing_items.rs:70
↓ 1 callers
Method
dictionary_initializer_keys
Appends literal string keys from dictionary initializers that can reach `receiver`. Follows reaching definitions, aliases, `from` imports, and nested
crates/ty_python_semantic/src/semantic_model.rs:785
↓ 1 callers
Method
diff
Get the current diff from git. Arguments are passed to `git diff ...`
python/ruff-ecosystem/ruff_ecosystem/projects.py:536
↓ 1 callers
Method
diff
(&self)
crates/mdtest/src/matcher.rs:77
↓ 1 callers
Function
diff_diagnostics
(before: &'a [Diagnostic], after: &'a [Diagnostic])
crates/ty_python_semantic/src/fixes.rs:2105
↓ 1 callers
Function
diff_diagnostics
( before: Vec<Diagnostic>, after: Vec<Diagnostic>, settings_before: &LinterSettings, settings_
crates/ruff_linter/src/test.rs:94
↓ 1 callers
Function
diff_format
( diff: float, *, greater_is_better: bool = True, neutral: bool = False, )
scripts/conformance.py:865
↓ 1 callers
Function
diff_items
Diff two lists of struct/query items by name. Returns a list of (name, old_bytes, new_bytes) sorted by absolute diff descending.
scripts/memory_report.py:160
↓ 1 callers
Function
diff_show_only_changes
A compact diff that only shows a header and changes, but nothing unchanged. This makes viewing multiple errors easier.
crates/ruff_dev/src/format_dev.rs:601
↓ 1 callers
Function
dir_name
(linter_name: str)
scripts/add_rule.py:54
↓ 1 callers
Function
dir_name
(linter_name: str)
scripts/add_plugin.py:51
↓ 1 callers
Function
direct_logger_instantiation
LOG001
crates/ruff_linter/src/rules/flake8_logging/rules/direct_logger_instantiation.rs:63
↓ 1 callers
Function
direct_subtypes
Finds classes that directly inherit from `target_class`. ```py class Animal: ... class Dog(Animal): ... class LoudDog(Dog): ... ``` For `Animal`, th
crates/ty_python_semantic/src/types/ide_support.rs:1942
↓ 1 callers
Function
directive_errors
Check that the directive itself is valid. This function modifies `diagnostics` in-place.
crates/ruff_linter/src/rules/flake8_todos/rules/todos.rs:325
↓ 1 callers
Method
directly_imported_submodule
Identifies an imported name that resolves to a direct submodule. For example, `old` in `from pkg import old` when it resolves to `pkg/old.py`.
crates/ty_ide/src/will_rename.rs:553
← previous
next →
8,801–8,900 of 31,562, ranked by callers