Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,707 in github.com/astral-sh/ruff
⨍
Functions
28,707
◇
Types & classes
6,694
↳
Endpoints
82
↓ 9 callers
Method
as_str
(self)
crates/ty/src/python_version.rs:25
↓ 9 callers
Function
bind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/google.rs:339
↓ 9 callers
Method
bindings_iterator
( &'map self, bindings: &'map [LiveBinding], boundness_analysis: BoundnessAnalysis,
crates/ty_python_core/src/use_def.rs:1187
↓ 9 callers
Method
bool
Resolves the boolean value of the type and falls back to [`Truthiness::Ambiguous`] if the type doesn't implement `__bool__` correctly. This method sh
crates/ty_python_semantic/src/types/bool.rs:20
↓ 9 callers
Method
callable
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:264
↓ 9 callers
Method
callable_type
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:1370
↓ 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:860
↓ 9 callers
Method
check
Checks all open files
crates/ty_wasm/src/lib.rs:289
↓ 9 callers
Function
check_path
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, stylist: &Stylist, ind
crates/ruff_linter/src/linter.rs:119
↓ 9 callers
Method
clear
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3327
↓ 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:1824
↓ 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
current_scope_info_mut
(&mut self)
crates/ty_python_core/src/builder.rs:368
↓ 9 callers
Function
default_aliases
(preview: PreviewMode)
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:74
↓ 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:137
↓ 9 callers
Method
enum_complement
Return the compact enum-complement view of this intersection, if it has one.
crates/ty_python_semantic/src/types/set_theoretic.rs:796
↓ 9 callers
Method
err
(self)
crates/ty_site_packages/src/lib.rs:2422
↓ 9 callers
Method
error
Return the underlying [`ParseError`].
crates/ruff_linter/src/logging.rs:228
↓ 9 callers
Method
errors
Returns a list of syntax errors found during parsing.
crates/ruff_python_parser/src/lib.rs:406
↓ 9 callers
Method
evaluate
Evaluate a comparison recursively, treating `left` as the operand being constrained. For example, proving that every constraint of `EQUAL_VALUES` com
crates/ty_python_semantic/src/types/equality.rs:492
↓ 9 callers
Function
extract_class_literal
Extract a `ClassLiteral` from a `Type`, handling various type forms.
crates/ty_python_semantic/src/types/ide_support.rs:2947
↓ 9 callers
Function
extract_directives
( tokens: &Tokens, flags: Flags, locator: &Locator, indexer: &Indexer, )
crates/ruff_linter/src/directives.rs:55
↓ 9 callers
Method
fields
Returns a list of all annotated attributes defined in this class, or any of its superclasses. See [`StaticClassLiteral::own_fields`] for more details
crates/ty_python_semantic/src/types/class/static_literal.rs:2321
↓ 9 callers
Method
file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:64
↓ 9 callers
Method
file
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:518
↓ 9 callers
Function
file_time_now
()
crates/ruff_db/src/system.rs:363
↓ 9 callers
Method
files
(&self)
crates/ty_module_resolver/src/db.rs:109
↓ 9 callers
Function
find_binding_value
(binding: &Binding, semantic: &'a SemanticModel)
crates/ruff_python_semantic/src/analyze/typing.rs:1243
↓ 9 callers
Method
freshness
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:997
↓ 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:485
↓ 9 callers
Method
get
(&self)
crates/ruff_linter/src/line_width.rs:182
↓ 9 callers
Method
get_positional
Return positional parameter at given index, or `None` if `index` is out of range. Does not return variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:4885
↓ 9 callers
Function
get_redirect_target
Returns the redirect target for the given code.
crates/ruff_linter/src/rule_redirects.rs:5
↓ 9 callers
Method
goto_declaration
Apply the "goto declaration" interpretation to these definitions.
crates/ty_ide/src/goto.rs:286
↓ 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
Method
has_typevar_or_typevar_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:78
↓ 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
in_async_context
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:841
↓ 9 callers
Method
in_string_annotation
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:903
↓ 9 callers
Method
indentation
(&self)
crates/ruff_python_codegen/src/stylist.rs:21
↓ 9 callers
Method
index
(&self)
crates/ruff_source_file/src/lib.rs:169
↓ 9 callers
Method
infer_body
(&mut self, suite: &[ast::Stmt])
crates/ty_python_semantic/src/types/infer/builder.rs:1970
↓ 9 callers
Method
infer_collection_literal
Infer the type of a collection literal expression.
crates/ty_python_semantic/src/types/infer/builder.rs:7183
↓ 9 callers
Method
intersect_types
(&self, left: Type<'db>, right: Type<'db>)
crates/ty_python_semantic/src/types/narrow.rs:3157
↓ 9 callers
Method
into_enum_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:324
↓ 9 callers
Method
into_generic_alias
(self)
crates/ty_python_semantic/src/types/class.rs:1126
↓ 9 callers
Method
into_inner
(self)
crates/ruff_ranged_value/src/lib.rs:179
↓ 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:570
↓ 9 callers
Method
into_type_var
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:175
↓ 9 callers
Method
is_bound
(self)
crates/ty_python_core/src/place.rs:132
↓ 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:367
↓ 9 callers
Method
is_empty
(&self)
crates/ruff_linter/src/settings/types.rs:826
↓ 9 callers
Method
is_final
Returns whether this class is final.
crates/ty_python_semantic/src/types/class.rs:830
↓ 9 callers
Method
is_inferable
(self, db: &'db dyn Db, inferable: TypeVarSet<'db>)
crates/ty_python_semantic/src/types/typevar.rs:1742
↓ 9 callers
Method
is_local
Is the symbol defined in this scope, vs referring to some enclosing scope? There are three common cases where a name refers to an enclosing scope: 1
crates/ty_python_core/src/symbol.rs:117
↓ 9 callers
Method
is_match
(&self, path: &Path)
crates/ruff_linter/src/settings/types.rs:996
↓ 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_statement
(self)
crates/ruff_python_ast/src/generated.rs:7305
↓ 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:353
↓ 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
is_vendored_path
(&self)
crates/ruff_db/src/files/path.rs:58
↓ 9 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1378
↓ 9 callers
Method
kind
(&self)
crates/ruff_formatter/src/format_element/tag.rs:129
↓ 9 callers
Function
lex_source
(source: &str)
crates/ruff_python_parser/src/lexer.rs:1710
↓ 9 callers
Method
line_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:162
↓ 9 callers
Method
line_index
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:54
↓ 9 callers
Method
line_range
Returns the [`TextRange`] of the `line` with the given index. The start points to the first character's [byte offset](TextSize), the end up to, and in
crates/ruff_source_file/src/line_index.rs:312
↓ 9 callers
Method
lint_file_with_cache
( &self, path: &str, cache: &Cache, )
crates/ruff/src/cache.rs:1059
↓ 9 callers
Function
log
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB163.py:36
↓ 9 callers
Method
materialize
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, kind: MaterializationK
crates/ty_python_semantic/src/types/class_base.rs:423
↓ 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: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:821
↓ 9 callers
Method
name
(&self)
crates/ruff_linter/src/registry.rs:362
↓ 9 callers
Function
normalized
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1379
↓ 9 callers
Method
notebook_or_file_path
(&self)
crates/ty_server/src/session.rs:1421
↓ 9 callers
Method
open_file
(&mut self, path: &str, contents: &str)
crates/ty_wasm/src/lib.rs:194
↓ 9 callers
Method
own_class_member
Returns the inferred type of the class member named `name`. Only bound members or those marked as `ClassVars` are considered. You must provide the `i
crates/ty_python_semantic/src/types/class.rs:1786
↓ 9 callers
Method
partition
(self)
crates/ruff/src/args.rs:89
↓ 9 callers
Method
path
The full path that this entry represents.
crates/ruff_db/src/system/walk_directory.rs:172
↓ 9 callers
Method
path
(&self, _file: File)
crates/ruff_linter/src/message/mod.rs:135
↓ 9 callers
Method
peek
Returns the next token kind without consuming it.
crates/ruff_python_parser/src/parser/mod.rs:417
↓ 9 callers
Method
position_encoding
(&self)
crates/ty_server/src/session.rs:1321
↓ 9 callers
Function
program_file
(db: &TestDb, file: File)
crates/ty_python_semantic/src/types/infer/tests.rs:22
↓ 9 callers
Method
program_file
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/ide_support.rs:2139
↓ 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
puts
Sets `string` with `style` for given `line`, starting from `col`. If `line` does not exist in our buffer, adds empty lines up to the given and fills t
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:87
↓ 9 callers
Method
query
Loads this constraint set into a new builder, invokes a callback with that builder, and returns the result. This is more efficient than [`ConstraintS
crates/ty_python_semantic/src/types/constraints.rs:305
↓ 9 callers
Method
quote_style
(&self)
crates/ruff_python_formatter/src/options.rs:127
↓ 9 callers
Method
range
(&self)
crates/ruff_python_ast/src/nodes.rs:165
← previous
next →
1,401–1,500 of 28,707, ranked by callers