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
↓ 24 callers
Method
default_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:406
↓ 24 callers
Method
eat_while
(&mut self, mut predicate: impl FnMut(char) -> bool)
crates/ruff_python_trivia/src/cursor.rs:163
↓ 24 callers
Method
extend
(&mut self, it: T)
crates/ty_ide/src/completion.rs:296
↓ 24 callers
Method
files
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:117
↓ 24 callers
Method
is_end_of_line
(self)
crates/ruff_python_trivia/src/comments.rs:101
↓ 24 callers
Method
is_file
(self)
crates/ruff_db/src/system.rs:334
↓ 24 callers
Method
is_unknown
(&self)
crates/ty_python_semantic/src/types.rs:2556
↓ 24 callers
Method
isolate
(mut self, isolation: IsolationLevel)
crates/ruff_diagnostics/src/fix.rs:169
↓ 24 callers
Method
known
Create a [`NamedTupleSpec`] with the given fields.
crates/ty_python_semantic/src/types/class/named_tuple.rs:587
↓ 24 callers
Method
line_start
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:63
↓ 24 callers
Method
matching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4624
↓ 24 callers
Method
name
(&self)
crates/ty_python_semantic/src/lint.rs:94
↓ 24 callers
Method
openness
Returns whether this `TypedDict` is implicitly open, closed, or has explicit extra items. A class-based `TypedDict` inherits the first explicit polic
crates/ty_python_semantic/src/types/typed_dict.rs:271
↓ 24 callers
Method
options
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callers
Method
path
(&self)
crates/ruff_db/src/system.rs:362
↓ 24 callers
Method
prefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1225
↓ 24 callers
Method
program_file
(&self)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1204
↓ 24 callers
Method
push
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:503
↓ 24 callers
Method
range
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3075
↓ 24 callers
Method
references
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:487
↓ 24 callers
Method
scope
Returns the scope in which this dynamic `TypedDict` was created.
crates/ty_python_semantic/src/types/class/typed_dict.rs:941
↓ 24 callers
Method
skip_keywords
When set, keywords from completions are skipped. This is useful in tests to reduce noise for scope based completions. Not enabled by default. Note t
crates/ty_ide/src/completion.rs:11646
↓ 24 callers
Method
source
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callers
Method
take_salsa_events
Takes the salsa events.
crates/ty_python_semantic/src/db.rs:119
↓ 24 callers
Method
to_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/callable.rs:1156
↓ 24 callers
Method
write_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 23 callers
Function
absolute
(path: &str)
crates/ty_project/src/uv/metadata/dependencies.rs:353
↓ 23 callers
Method
add_python_cell
(&mut self, content: &str)
crates/ty_server/tests/e2e/notebook.rs:810
↓ 23 callers
Method
apply_optional_specialization
( self, db: &'db dyn Db, specialization: Option<Specialization<'db>>, )
crates/ty_python_semantic/src/types/class/static_literal.rs:647
↓ 23 callers
Method
as_function
(&self)
crates/ty_python_core/src/scope.rs:426
↓ 23 callers
Method
as_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 23 callers
Method
as_typevar
(self)
crates/ty_python_semantic/src/types/typevar.rs:43
↓ 23 callers
Method
build
(self)
crates/ty_python_semantic/src/db.rs:290
↓ 23 callers
Method
context
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 23 callers
Method
file_name
(&self)
crates/ruff_db/src/system/path.rs:279
↓ 23 callers
Function
foo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callers
Method
func
(self)
crates/ruff_linter/resources/test/fixtures/pyflakes/F811_26.py:2
↓ 23 callers
Method
get
(&self, name: &str)
crates/ruff_db/src/system/command.rs:122
↓ 23 callers
Method
info
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callers
Method
interior_node_data
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1510
↓ 23 callers
Method
is_ascii
Returns `true` if the text only consists of ASCII characters
crates/ruff_source_file/src/line_index.rs:227
↓ 23 callers
Method
is_match
(&self, banned_module: &str)
crates/ruff_linter/src/rules/flake8_tidy_imports/matchers.rs:10
↓ 23 callers
Function
is_python_whitespace
Returns `true` for [whitespace](https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens) characters.
crates/ruff_python_trivia/src/whitespace.rs:84
↓ 23 callers
Method
is_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:327
↓ 23 callers
Method
is_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2318
↓ 23 callers
Method
leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:299
↓ 23 callers
Method
load
Loads a reference to the parsed module. Note that holding on to the reference will prevent garbage collection of the AST. This method will reparse th
crates/ruff_db/src/parsed.rs:139
↓ 23 callers
Method
match_typing_qualified_name
Return `true` if the call path is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:296
↓ 23 callers
Method
paramspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1083
↓ 23 callers
Function
resolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:65
↓ 23 callers
Method
source
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 23 callers
Method
sub
Adds a "sub" diagnostic to this diagnostic. This is useful when a sub diagnostic has its own annotations attached to it. For the simpler case of a su
crates/ruff_db/src/diagnostic/mod.rs:199
↓ 23 callers
Method
suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1236
↓ 23 callers
Function
test_contents
A convenient wrapper around [`check_path`], that additionally asserts that fixes converge after a fixed number of iterations.
crates/ruff_linter/src/test.rs:244
↓ 23 callers
Method
to_meta_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/instance.rs:432
↓ 23 callers
Method
uri
(&self)
crates/ty_server/src/document/notebook.rs:65
↓ 22 callers
Method
add_primary_tag
Adds a tag on the primary annotation for this diagnostic. This tag is associated with the primary annotation created for every `Diagnostic` that uses
crates/ruff_linter/src/checkers/ast/mod.rs:3864
↓ 22 callers
Method
annotation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:1381
↓ 22 callers
Method
as_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:2149
↓ 22 callers
Method
bases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
↓ 22 callers
Method
class_specialization
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1306
↓ 22 callers
Method
contains
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:165
↓ 22 callers
Method
encoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1553
↓ 22 callers
Method
get
(&self, index: usize)
crates/ty_python_core/src/frozen.rs:29
↓ 22 callers
Method
is_disjoint_from
Return true if `self & other` should simplify to `Never`: if the intersection of the two types could never be inhabited by any possible runtime value.
crates/ty_python_semantic/src/types/relation.rs:1105
↓ 22 callers
Method
is_file
(self)
crates/ty_project/src/watch.rs:191
↓ 22 callers
Function
is_identifier
Returns `true` if a string is a valid Python identifier (e.g., variable name).
crates/ruff_python_stdlib/src/identifiers.rs:7
↓ 22 callers
Method
is_known
Returns whether this is a known class.
crates/ty_python_semantic/src/types/class.rs:785
↓ 22 callers
Method
is_lint_enabled
(&self, lint: &'static LintMetadata)
crates/ty_python_semantic/src/types/context.rs:300
↓ 22 callers
Method
iter_all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:999
↓ 22 callers
Method
iter_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1478
↓ 22 callers
Method
len
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/render.rs:2503
↓ 22 callers
Method
next
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:575
↓ 22 callers
Function
pad
Add leading or trailing whitespace to a snippet, if it's immediately preceded or followed by an identifier or keyword.
crates/ruff_linter/src/fix/edits.rs:619
↓ 22 callers
Function
parse_unchecked
Parse the given Python source code using the specified [`ParseOptions`]. This is same as the [`parse`] function except that it doesn't check for any
crates/ruff_python_parser/src/lib.rs:289
↓ 22 callers
Function
predicate
(index: usize)
crates/ty_python_core/src/narrowing_constraints.rs:457
↓ 22 callers
Method
python_file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:74
↓ 22 callers
Method
query
(&self)
crates/ruff_server/src/session.rs:249
↓ 22 callers
Method
report_context
If error context collection is enabled, returns the current error context tree. You will typically use [`push`][ErrorContextTree::push] to add additio
crates/ty_python_semantic/src/types/relation.rs:1838
↓ 22 callers
Function
setup_micro_case
(code: &str)
crates/ruff_benchmark/benches/ty_shared/mod.rs:35
↓ 22 callers
Method
skip_auto_import
When set, symbols that aren't in scope but available in the environment will NOT be included. Auto-import is enabled by default. So one must opt into
crates/ty_ide/src/completion.rs:11609
↓ 22 callers
Method
source
(&self)
crates/ruff_linter/src/rules/pep8_naming/settings.rs:63
↓ 22 callers
Method
to_lsp_range
( &self, db: &dyn Db, file: File, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:306
↓ 22 callers
Method
try_call_dunder
Look up a dunder method on the meta-type of `self` and call it. Returns an `Err` if the dunder method can't be called, or the given arguments are not
crates/ty_python_semantic/src/types.rs:8417
↓ 22 callers
Method
try_to_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1449
↓ 22 callers
Method
with_preview_mode
(mut self)
crates/ruff_linter/src/settings/mod.rs:862
↓ 21 callers
Method
as_symbol
Returns `Some` if the reference is a `Symbol`, otherwise `None`.
crates/ty_python_core/src/place.rs:112
↓ 21 callers
Function
assert_function_query_was_not_run
( db: &Db, query: Q, input: I, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:6
↓ 21 callers
Method
codegen_stylist
(&self, stylist: &'a Stylist)
crates/ruff_linter/src/fix/codemods.rs:28
↓ 21 callers
Method
default_specialization
Returns the default specialization for this class. For static classes, this applies default type arguments. For dynamic classes, this returns a non-g
crates/ty_python_semantic/src/types/class.rs:793
↓ 21 callers
Method
format
Set the output format to use in diagnostic rendering.
crates/ruff_db/src/diagnostic/render.rs:2550
↓ 21 callers
Method
has_known_class
Returns whether this is a nominal instance of a particular [`KnownClass`].
crates/ty_python_semantic/src/types/instance.rs:277
↓ 21 callers
Function
indentation_at_offset
Extract the leading indentation from a line.
crates/ruff_python_trivia/src/whitespace.rs:49
↓ 21 callers
Method
index
(&self, index: usize)
crates/ty_python_semantic/src/types/signatures.rs:5998
↓ 21 callers
Function
infer_same_file_expression_type
Infers the type of an `expression` that is guaranteed to be in the same file as the calling query. This is a small helper around [`infer_expression_t
crates/ty_python_semantic/src/types/infer.rs:698
↓ 21 callers
Method
into_iter
(self)
crates/ty_project/src/lib.rs:1089
↓ 21 callers
Method
is_directory
(&self, resolver: &ResolverContext)
crates/ty_module_resolver/src/path.rs:72
↓ 21 callers
Method
is_trivia
(&self)
crates/ruff_python_ast/src/token.rs:452
↓ 21 callers
Method
kind
(&self)
crates/ty_python_core/src/builder.rs:6131
← previous
next →
701–800 of 31,562, ranked by callers