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
↓ 6 callers
Method
build
(self)
crates/ty_project/src/glob/exclude.rs:90
↓ 6 callers
Method
build
(self)
crates/ty_python_core/src/db.rs:159
↓ 6 callers
Method
bump_any
Bumps the current token regardless of its kind and advances to the next token. # Panics If the parser is at end of file.
crates/ruff_python_parser/src/parser/mod.rs:588
↓ 6 callers
Method
bump_revision
Bumps the revision. The revision is used to track when workspace diagnostics may have changed and need to be re-run. It's okay if a bump doesn't nece
crates/ty_server/src/session.rs:414
↓ 6 callers
Method
cache_key
(&self)
crates/ty_project/src/uv/service.rs:180
↓ 6 callers
Method
call
(param)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/fmtonoff5.py:52
↓ 6 callers
Method
cancel
(&mut self, request_id: &RequestId)
crates/ty_server/tests/e2e/main.rs:784
↓ 6 callers
Method
cell_offsets
Return the [`CellOffsets`] for the concatenated source code corresponding the Jupyter notebook.
crates/ruff_notebook/src/notebook.rs:399
↓ 6 callers
Method
charge_type
Charges the set-theoretic terms that a type constructor may flatten or inspect. Aliases are included so a large union cannot evade the limit by being
crates/ty_python_semantic/src/types/constraints/projection.rs:73
↓ 6 callers
Function
check
()
crates/ty_wasm/tests/api.rs:7
↓ 6 callers
Function
check_file
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/lib.rs:235
↓ 6 callers
Method
check_types_impl
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, constraints: &Con
crates/ty_python_semantic/src/types/call/bind.rs:1405
↓ 6 callers
Method
clear_salsa_events
Clears the emitted salsa events.
crates/ruff_db/src/lib.rs:181
↓ 6 callers
Method
clone
(self, checkout_dir: Path)
scripts/ty_benchmark/src/benchmark/projects.py:43
↓ 6 callers
Method
cmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/constraints/paths.rs:187
↓ 6 callers
Method
codes_as_str
Return the suppressed codes as strings
crates/ruff_linter/src/suppression.rs:79
↓ 6 callers
Method
combine
(self, other: Self)
crates/ty_combine/src/lib.rs:82
↓ 6 callers
Function
command
()
crates/ruff/tests/analyze_graph.rs:15
↓ 6 callers
Method
comments_in_range
Returns the comments who are within the range
crates/ruff_python_trivia/src/comment_ranges.rs:94
↓ 6 callers
Function
completion
( db: &'db dyn Db, settings: &CompletionSettings, capabilities: CompletionCapabilities, file:
crates/ty_ide/src/completion.rs:36
↓ 6 callers
Method
compose_thunk
(self, other: F)
crates/ty_python_semantic/src/types/variance.rs:154
↓ 6 callers
Method
constructed_instance_type
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:77
↓ 6 callers
Method
contents
(&self)
crates/ty_server/src/document/text_document.rs:77
↓ 6 callers
Method
context
Set the number of contextual lines to include for each snippet in diagnostic rendering.
crates/ruff_db/src/diagnostic/render.rs:2560
↓ 6 callers
Function
create_diagnostics
( filename: &str, source: &str, edit: impl IntoIterator<Item = Edit>, )
crates/ruff_linter/src/fix/mod.rs:184
↓ 6 callers
Function
create_notebook_diagnostics
Create Ruff-style diagnostics for testing the various output formats for a notebook.
crates/ruff_db/src/diagnostic/render.rs:3140
↓ 6 callers
Method
current_scope_id
(&self)
crates/ty_python_core/src/builder.rs:398
↓ 6 callers
Method
current_token_text
(&self)
crates/ruff_python_parser/src/parser/mod.rs:497
↓ 6 callers
Function
custom_enum_method
Returns the enum method defined in `scope`, including opaque bindings.
crates/ty_python_semantic/src/types/enums.rs:1507
↓ 6 callers
Function
dataclass_kind
Return the kind of dataclass this class definition is (stdlib or `attrs`), or `None` if the class is not a dataclass.
crates/ruff_linter/src/rules/ruff/helpers.rs:106
↓ 6 callers
Method
declarations_id
(self)
crates/ty_python_core/src/use_def.rs:342
↓ 6 callers
Method
declared
(self)
crates/ty_python_semantic/src/types/infer.rs:1208
↓ 6 callers
Method
dedent
(&mut self)
crates/ruff_python_parser/src/lexer/indentation.rs:121
↓ 6 callers
Method
defer_annotations
Are we currently inferring types in file with deferred types? This is true for stub files, for files with `__future__.annotations`, and by default for
crates/ty_python_semantic/src/types/infer/builder.rs:1039
↓ 6 callers
Method
definition
Returns where this type is defined. It's the foundation for the editor's "Go to type definition" feature where the user clicks on a value and it take
crates/ty_python_semantic/src/types.rs:10914
↓ 6 callers
Method
definition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/cyclic.rs:299
↓ 6 callers
Method
definition_span
Returns a [`Span`] pointing to the definition of this class. For static classes, this is the class header (name and arguments). For dynamic classes,
crates/ty_python_semantic/src/types/class.rs:2577
↓ 6 callers
Function
definitions_for_name
Returns definitions for IDE navigation, expanding numeric annotations to their accepted classes.
crates/ty_python_semantic/src/types/ide_support.rs:83
↓ 6 callers
Method
deprecated_functions
Returns the deprecated functions invoked by each union alternative, including downstream constructor methods. An intersection only reports deprecation
crates/ty_python_semantic/src/types/call/bind.rs:988
↓ 6 callers
Function
deserialize
(deserializer: D)
crates/ty_project/src/uv/metadata/string_interner.rs:37
↓ 6 callers
Method
dispose
()
playground/ty/src/Editor/Editor.tsx:556
↓ 6 callers
Method
eat_if
Eats the next character if `predicate` returns `true`.
crates/ruff_python_trivia/src/cursor.rs:152
↓ 6 callers
Method
emit
(&mut self, text: &dyn Debug)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:176
↓ 6 callers
Function
empty
()
crates/ty_python_core/src/lib.rs:1305
↓ 6 callers
Method
entries
Adds the contents of an iterator of entries to the join output.
crates/ruff_formatter/src/builders.rs:2491
↓ 6 callers
Function
enumerate_argument_types
( arguments: &'a CallArguments<'a, 'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:5963
↓ 6 callers
Method
env_remove
Removes an environment variable from the command.
crates/ruff_db/src/system/command.rs:61
↓ 6 callers
Method
escape_for_display
(mut self)
crates/ruff_python_literal/src/escape.rs:84
↓ 6 callers
Method
evaluate
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, id: ScopedPredicateId
crates/ty_python_semantic/src/reachability.rs:851
↓ 6 callers
Method
evaluate_expr_compare_op
( &self, lhs_ty: Type<'db>, rhs_ty: Type<'db>, op: ast::CmpOp, is_posi
crates/ty_python_semantic/src/types/narrow.rs:3919
↓ 6 callers
Function
evaluate_reachability_with_cache
Evaluates a reachability constraint, optionally using an inference-local cache.
crates/ty_python_semantic/src/reachability.rs:2263
↓ 6 callers
Function
exact
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, typevar: BoundTypeVarInstance<'db>,
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:39
↓ 6 callers
Function
expect_formatted
(result: FormatResult)
crates/ruff_server/src/format.rs:389
↓ 6 callers
Method
expect_union
(self)
crates/ty_python_semantic/src/types.rs:3279
↓ 6 callers
Method
explicit_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:162
↓ 6 callers
Method
extend_cycle_recovery
(&mut self, other: Option<Type<'db>>)
crates/ty_python_semantic/src/types/infer/builder.rs:632
↓ 6 callers
Method
extend_definition
( &mut self, definition: Definition<'db>, inference: &DefinitionInference<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:651
↓ 6 callers
Method
extend_expression_types
Replacing an expression's type also replaces any truthiness override. A newly inferred comparison may no longer need an override, so extending the spa
crates/ty_python_semantic/src/types/infer/builder.rs:798
↓ 6 callers
Function
extract_result_ids_from_response
(response: &WorkspaceDiagnosticReport)
crates/ty_server/tests/e2e/pull_diagnostics.rs:1634
↓ 6 callers
Method
file_expression_type
Get the type of an expression from any scope in the same file. If the expression is in the current scope, and we are inferring the entire scope, just
crates/ty_python_semantic/src/types/infer/builder.rs:1149
↓ 6 callers
Function
file_renames
(paths: &[(&str, &str)])
crates/ty_ide/src/will_rename.rs:2438
↓ 6 callers
Function
file_to_uri
Returns a [`Uri`] for the given [`File`].
crates/ty_server/src/system.rs:26
↓ 6 callers
Function
find_best_suggestion
( options: O, typo: &str, hide_underscored_suggestions: HideUnderscoredSuggestions, )
crates/ty_python_semantic/src/diagnostic/levenshtein.rs:27
↓ 6 callers
Method
first_help_text
Returns the message of the first sub-diagnostic with a `Help` severity. Note that this is used as the fix title/suggestion for some of Ruff's output
crates/ruff_db/src/diagnostic/mod.rs:483
↓ 6 callers
Function
fix_all
Applies all fixes for the given fix mode. `check_file` is a separate parameter so that tests can easily mock out a file's diagnostics.
crates/ty_python_semantic/src/fixes.rs:80
↓ 6 callers
Function
fixture_bindings_for_parameter
( db: &'db dyn Db, parameter: Definition<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:131
↓ 6 callers
Function
fixture_exposures_for_definition
Returns the available pytest fixture exposures contributed by `definition`. A decorated function contributes an exposure directly: ```python # fixtu
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:307
↓ 6 callers
Method
flow_snapshot
(&self)
crates/ty_python_core/src/builder.rs:1329
↓ 6 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT031.py:37
↓ 6 callers
Method
for_inheritance
Return the metaclass guaranteed by class declarations, without the typeshed fallback.
crates/ty_python_semantic/src/types/class.rs:3562
↓ 6 callers
Function
full
()
crates/ty_python_semantic/src/types/signatures.rs:6779
↓ 6 callers
Method
future_annotations_or_stub
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:921
↓ 6 callers
Method
get
Get a resolved glob.
crates/ruff/src/commands/analyze_graph.rs:304
↓ 6 callers
Method
get
(&self, directive: MdtestDirective)
crates/mdtest/src/parser.rs:1101
↓ 6 callers
Method
get_default
Returns the most appropriate type of this argument when there is no specific declared type.
crates/ty_python_semantic/src/types/call/arguments.rs:472
↓ 6 callers
Method
has
Returns `true` if this set has an option that resolves to `name`. The name can be separated by `.` to find a nested option. ## Examples ### Test fo
crates/ruff_options_metadata/src/lib.rs:199
↓ 6 callers
Method
has_aliases
Returns `true` if any direct element of this union is a type alias.
crates/ty_python_semantic/src/types/set_theoretic.rs:231
↓ 6 callers
Method
has_cyclic_mro
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class_base.rs:474
↓ 6 callers
Method
has_dangling
Returns `true` if node has any [dangling comments](self#dangling-comments).
crates/ruff_python_formatter/src/comments/mod.rs:308
↓ 6 callers
Method
has_generated_slots
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/slots.rs:266
↓ 6 callers
Method
has_implicit_receiver
Returns true if this overload has an implicit `self` or `cls` receiver parameter.
crates/ty_python_semantic/src/types/function.rs:382
↓ 6 callers
Method
has_known_fields
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/named_tuple.rs:485
↓ 6 callers
Method
has_relation_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:872
↓ 6 callers
Method
has_relation_to_with_typevar_evaluation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:894
↓ 6 callers
Method
has_unspecialized_type_var
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:142
↓ 6 callers
Method
header_span
Returns a [`Span`] pointing to the definition of this class. For static classes, this is the class header (name and arguments). For dynamic classes,
crates/ty_python_semantic/src/types/class.rs:1000
↓ 6 callers
Method
hover
(&self)
crates/ty_ide/src/hover.rs:7556
↓ 6 callers
Function
imported_symbol
Infers the public type of an imported symbol. If `requires_explicit_reexport` is [`None`], it will be inferred from the file's source type. For stub
crates/ty_python_semantic/src/place.rs:539
↓ 6 callers
Method
in_boolean_test
Return `true` if the model is in boolean test.
crates/ruff_python_semantic/src/model.rs:2280
↓ 6 callers
Method
in_init_module
Returns whether the file under analysis is an `__init__.py` file.
crates/ruff_linter/src/checkers/ast/mod.rs:558
↓ 6 callers
Method
in_pep_257_docstring
Return `true` if the model is in a docstring as described in [PEP 257]. [PEP 257]: https://peps.python.org/pep-0257/#what-is-a-docstring
crates/ruff_python_semantic/src/model.rs:2303
↓ 6 callers
Method
in_runtime_evaluated_annotation
Return `true` if the context is in a runtime-evaluated type annotation.
crates/ruff_python_semantic/src/model.rs:2130
↓ 6 callers
Method
infer_optional_expression
( &mut self, expression: Option<&ast::Expr>, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6781
↓ 6 callers
Function
infer_unpack_types
(db: &'db dyn Db, unpack: Unpack<'db>)
crates/ty_python_semantic/src/types/infer.rs:894
↓ 6 callers
Method
inferred_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:746
↓ 6 callers
Method
insert
Insert a resolved glob.
crates/ruff/src/commands/analyze_graph.rs:299
↓ 6 callers
Method
insert
Insert the type of this argument when inferred with the provided type context.
crates/ty_python_semantic/src/types/call/arguments.rs:507
↓ 6 callers
Method
intern_bindings
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:376
↓ 6 callers
Method
interpolations
Returns an iterator over all the [`InterpolatedElement`] nodes contained in this f-string.
crates/ruff_python_ast/src/nodes.rs:1427
↓ 6 callers
Method
into_code
Access the resulting code, consuming the result
crates/ruff_formatter/src/lib.rs:419
← previous
next →
2,301–2,400 of 31,766, ranked by callers