Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
27,349 in github.com/astral-sh/ruff
⨍
Functions
27,349
◇
Types & classes
6,530
↳
Endpoints
82
↓ 9 callers
Method
as_slice
(&self)
crates/ty_python_core/src/use_def/place_state.rs:178
↓ 9 callers
Method
as_str
Returns the underlying package name.
crates/ty_project/src/metadata/pyproject.rs:221
↓ 9 callers
Method
as_str
(self)
crates/ty/src/python_version.rs:25
↓ 9 callers
Method
assignability_error_context
Re-run the assignability check with error context collection enabled. This should normally be called when `is_assignable_to` has returned `false` and
crates/ty_python_semantic/src/types/relation.rs:374
↓ 9 callers
Method
bind_self_typevars
Bind `Self` type variables in this type to a concrete self type. Uses MRO-based matching: a `Self` typevar is only bound if its owner class is in the
crates/ty_python_semantic/src/types.rs:1153
↓ 9 callers
Method
bindings_iterator
( &'map self, bindings: &'map [LiveBinding], boundness_analysis: BoundnessAnalysis,
crates/ty_python_core/src/use_def.rs:1180
↓ 9 callers
Method
callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:183
↓ 9 callers
Method
change_workspace_folders
Send a `workspace/didChangeWorkspaceFolders` notification with the given added/removed workspace folders. The paths provided should be paths to the ro
crates/ty_server/tests/e2e/main.rs:873
↓ 9 callers
Method
chars
Return the remaining input as a string slice.
crates/ruff_python_trivia/src/cursor.rs:30
↓ 9 callers
Method
check
Checks all open files
crates/ty_wasm/src/lib.rs:293
↓ 9 callers
Function
check_path
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, stylist: &Stylist, ind
crates/ruff_linter/src/linter.rs:119
↓ 9 callers
Function
class_member
Infer the public type of a class member/symbol (its type as seen from outside its scope) in the given `scope`.
crates/ty_python_semantic/src/types/member.rs:56
↓ 9 callers
Method
cmp
(&self, other: &Self)
crates/ruff_python_ast/src/node_index.rs:207
↓ 9 callers
Method
cmp
(&self, other: &Self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:63
↓ 9 callers
Function
code_actions_at
( server: &TestServer, diagnostics: DocumentDiagnosticReport, file: &SystemPath, range: Range,
crates/ty_server/tests/e2e/code_actions.rs:6
↓ 9 callers
Function
comment_indentation_after
Determine the indentation level of an own-line comment, defined as the minimum indentation of all comments between the preceding node and the comment,
crates/ruff_python_ast/src/helpers.rs:1838
↓ 9 callers
Method
completions
Returns the underlying completions if the convenience assertions aren't sufficiently expressive.
crates/ty_ide/src/completion.rs:10953
↓ 9 callers
Method
components
(&self)
crates/ruff_db/src/system/path.rs:239
↓ 9 callers
Method
config
(mut self, config: &'a Path)
crates/ruff/tests/integration_test.rs:45
↓ 9 callers
Method
cover
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:249
↓ 9 callers
Method
dataclass_transformer_params
(self)
crates/ty_python_semantic/src/types/class.rs:236
↓ 9 callers
Function
default_aliases
(preview: PreviewMode)
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:74
↓ 9 callers
Method
definition
(&self)
crates/ty_python_semantic/src/types/ide_support.rs:1338
↓ 9 callers
Method
definition
Returns the [`Definition`] of this function. ## Warning This uses the semantic index to find the definition of the function. This means that if the
crates/ty_python_semantic/src/types/function.rs:424
↓ 9 callers
Function
deserialize
()
crates/ruff_workspace/src/pyproject.rs:301
↓ 9 callers
Method
edits
Return a slice of the [`Edit`] elements in the [`Fix`], sorted by [`Edit::start`] in ascending order.
crates/ruff_diagnostics/src/fix.rs:148
↓ 9 callers
Method
errors
Returns a list of syntax errors found during parsing.
crates/ruff_python_parser/src/lib.rs:406
↓ 9 callers
Function
extract_directives
( tokens: &Tokens, flags: Flags, locator: &Locator, indexer: &Indexer, )
crates/ruff_linter/src/directives.rs:55
↓ 9 callers
Method
files
(&self)
crates/ty_module_resolver/src/db.rs:106
↓ 9 callers
Function
find_binding_value
(binding: &Binding, semantic: &'a SemanticModel)
crates/ruff_python_semantic/src/analyze/typing.rs:1226
↓ 9 callers
Method
generate
(self)
crates/ruff_python_codegen/src/generator.rs:238
↓ 9 callers
Method
get
(&self, index: InternedBindingsId)
crates/ty_python_core/src/use_def.rs:474
↓ 9 callers
Method
get
(&self)
crates/ruff_linter/src/line_width.rs:186
↓ 9 callers
Method
get_message
Returns the message attached to this annotation, if one exists.
crates/ruff_db/src/diagnostic/mod.rs:877
↓ 9 callers
Method
goto_declaration
Apply the "goto declaration" interpretation to these definitions.
crates/ty_ide/src/goto.rs:280
↓ 9 callers
Method
has
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:261
↓ 9 callers
Method
has_comments
Returns `true` if a statement or expression includes at least one comment.
crates/ruff_python_trivia/src/comment_ranges.rs:109
↓ 9 callers
Function
has_unknown_keywords_or_starred_expr
( arguments: &Arguments, allowed: &[&str], )
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:199
↓ 9 callers
Method
hash
(&self, state: &mut H)
crates/ruff_cache/tests/cache_key.rs:55
↓ 9 callers
Method
header_range
Returns the range of the class's "header". For static classes, this is the class name and any arguments passed to the `class` statement. For dynamic
crates/ty_python_semantic/src/types/class.rs:714
↓ 9 callers
Method
identity_specialization
Returns a specialization of this class where each typevar is mapped to itself.
crates/ty_python_semantic/src/types/class/static_literal.rs:470
↓ 9 callers
Method
import
Create a new `ImportRequest` from a module and member. If not present in the scope, the symbol should be imported using the "import" statement.
crates/ruff_linter/src/importer/mod.rs:616
↓ 9 callers
Method
in_async_context
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:841
↓ 9 callers
Method
indentation
(&self)
crates/ruff_python_codegen/src/stylist.rs:21
↓ 9 callers
Method
index
(self)
crates/ty_python_semantic/src/types/constraints.rs:3303
↓ 9 callers
Method
infer_body
(&mut self, suite: &[ast::Stmt])
crates/ty_python_semantic/src/types/infer/builder.rs:1814
↓ 9 callers
Method
infer_collection_literal
Infer the type of a collection literal expression.
crates/ty_python_semantic/src/types/infer/builder.rs:6228
↓ 9 callers
Function
infer_complete_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:291
↓ 9 callers
Method
intersect_types
(&self, left: Type<'db>, right: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:2584
↓ 9 callers
Method
intersects
Return true if `self` and `other` contain at least one shared `definition`. A symbol can resolve to multiple definitions (for example, overload group
crates/ty_ide/src/goto.rs:410
↓ 9 callers
Method
into_enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:302
↓ 9 callers
Method
into_iter
(self)
crates/ruff_python_semantic/src/definition.rs:306
↓ 9 callers
Method
into_iter
(self)
crates/ruff/src/commands/completions/config.rs:18
↓ 9 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/signatures.rs:459
↓ 9 callers
Method
is_always_true
(self)
crates/ty_python_core/src/lib.rs:958
↓ 9 callers
Method
is_bound
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:8710
↓ 9 callers
Method
is_builtin
If the first segment is empty, the `CallPath` represents a "builtin binding". A builtin binding is the binding that a symbol has if it was part of Py
crates/ruff_python_ast/src/name.rs:304
↓ 9 callers
Method
is_eager
(&self)
crates/ty_python_core/src/scope.rs:161
↓ 9 callers
Method
is_final
Returns whether this class is final.
crates/ty_python_semantic/src/types/class.rs:730
↓ 9 callers
Function
is_human_readable_names_enabled
https://github.com/astral-sh/ruff/pull/25614
crates/ruff_linter/src/preview.rs:365
↓ 9 callers
Method
is_inferable
(self, db: &'db dyn Db, inferable: InferableTypeVars<'db>)
crates/ty_python_semantic/src/types/generics.rs:278
↓ 9 callers
Method
is_match
(&self, path: &Path)
crates/ruff_linter/src/settings/types.rs:1000
↓ 9 callers
Method
is_multiline
(self)
crates/ruff_python_formatter/src/other/interpolated_string.rs:24
↓ 9 callers
Method
is_nonlocal
Return `true` if this [`Binding`] represents a `nonlocal`. A [`Binding`] is a `nonlocal` if it's declared by a `nonlocal` statement, or shadows a [`Bi
crates/ruff_python_semantic/src/binding.rs:78
↓ 9 callers
Method
is_nonlocal
Is the symbol `nonlocal` its containing scope?
crates/ty_python_core/src/symbol.rs:85
↓ 9 callers
Method
is_statement
(self)
crates/ruff_python_ast/src/generated.rs:7311
↓ 9 callers
Method
is_staticmethod
Returns true if this overload is decorated with `@staticmethod`, or if it is implicitly a staticmethod.
crates/ty_python_semantic/src/types/function.rs:335
↓ 9 callers
Method
is_unused
Returns `true` if the given expression is an unused variable, or consists solely of references to other unused variables. This method is conservative
crates/ruff_python_semantic/src/model.rs:1955
↓ 9 callers
Method
is_used
Return `true` if this [`Binding`] is used. This method is the opposite of [`Binding::is_unused`].
crates/ruff_python_semantic/src/binding.rs:48
↓ 9 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1327
↓ 9 callers
Method
iter_enumerated
( &self, )
crates/ty_python_core/src/use_def.rs:712
↓ 9 callers
Method
kind
(&self)
crates/ruff_formatter/src/format_element/tag.rs:129
↓ 9 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/signatures.rs:3786
↓ 9 callers
Function
lex_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1689
↓ 9 callers
Method
lint_file_with_cache
( &self, path: &str, cache: &Cache, )
crates/ruff/src/cache.rs:1060
↓ 9 callers
Function
log
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB163.py:36
↓ 9 callers
Function
module
Run lint rules over a module.
crates/ruff_linter/src/checkers/ast/analyze/module.rs:8
↓ 9 callers
Method
name
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:238
↓ 9 callers
Method
notebook_or_file_path
(&self)
crates/ty_server/src/session.rs:1422
↓ 9 callers
Method
now
()
crates/ruff_db/src/file_revision.rs:20
↓ 9 callers
Method
own_fields
( self, db: &'db dyn Db, specialization: Option<Specialization<'db>>, field_po
crates/ty_python_semantic/src/types/class/static_literal.rs:2091
↓ 9 callers
Method
partition
(self)
crates/ruff/src/args.rs:89
↓ 9 callers
Method
path
(&self, relative_path: &str)
crates/ty_project/src/db/ignore.rs:243
↓ 9 callers
Method
path
(&self, _file: File)
crates/ruff_linter/src/message/mod.rs:134
↓ 9 callers
Method
peek
Returns the next token kind without consuming it.
crates/ruff_python_parser/src/parser/mod.rs:357
↓ 9 callers
Method
position_encoding
(&self)
crates/ty_server/src/session.rs:1322
↓ 9 callers
Method
push_error
Helper function to push the given error, updating the current range with the error location and return the [`TokenKind::Unknown`] token.
crates/ruff_python_parser/src/lexer.rs:139
↓ 9 callers
Method
quote_style
(&self)
crates/ruff_python_formatter/src/options.rs:127
↓ 9 callers
Method
range
(&self)
crates/ty_project/src/metadata/value.rs:61
↓ 9 callers
Function
read
()
crates/ruff_db/src/system/memory_fs.rs:892
↓ 9 callers
Method
read_to_string
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:406
↓ 9 callers
Method
remove_directory
Deletes the directory at `path`. ## Errors If the directory is not empty The `path` is not a directory The `path` does not exist
crates/ruff_db/src/system/memory_fs.rs:337
↓ 9 callers
Function
remove_file
()
crates/ruff_db/src/system/memory_fs.rs:950
↓ 9 callers
Method
resolve
Resolves a stored property accessor to the value type exposed by that access.
crates/ty_python_semantic/src/types/protocol_class.rs:515
↓ 9 callers
Method
root
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:234
↓ 9 callers
Method
root
(&self)
crates/ty_server/tests/e2e/main.rs:1513
↓ 9 callers
Function
rule
Explain a `Rule` to the user.
crates/ruff/src/commands/rule.rs:101
↓ 9 callers
Method
run
(mut self)
crates/ty_server/src/server.rs:162
↓ 9 callers
Method
scope
(&self, id: FileScopeId)
crates/ty_python_core/src/lib.rs:425
↓ 9 callers
Function
search_paths
(db: &dyn Db, resolve_mode: ModuleResolveMode)
crates/ty_module_resolver/src/resolve.rs:353
← previous
next →
1,301–1,400 of 27,349, ranked by callers