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
↓ 22 callers
Method
remove
(self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:24
↓ 22 callers
Method
source
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 22 callers
Method
subclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:119
↓ 22 callers
Method
to_owned
(&self)
crates/ruff_index/src/slice.rs:197
↓ 22 callers
Method
with_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:123
↓ 21 callers
Method
add
(&mut self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:557
↓ 21 callers
Method
as_class
(&self)
crates/ty_python_core/src/scope.rs:402
↓ 21 callers
Method
build
Build the test server
crates/ruff_server/tests/e2e/main.rs:1141
↓ 21 callers
Method
codegen_stylist
(&self, stylist: &'a Stylist)
crates/ruff_linter/src/fix/codemods.rs:28
↓ 21 callers
Function
contains_effect
Return `true` if the `Expr` contains an expression that appears to include a side-effect (like a function call). Accepts a closure that determines wh
crates/ruff_python_ast/src/helpers.rs:221
↓ 21 callers
Method
content
Returns the new content for an insertion or deletion.
crates/ruff_diagnostics/src/edit.rs:61
↓ 21 callers
Method
extend
(&mut self, it: T)
crates/ty_ide/src/completion.rs:263
↓ 21 callers
Method
file
(&self)
crates/ty_python_semantic/src/lint.rs:138
↓ 21 callers
Method
get
(&self, index: usize)
crates/ruff_db/src/parsed.rs:484
↓ 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:414
↓ 21 callers
Method
interior_node_data
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1078
↓ 21 callers
Method
is_empty
Returns `true` if there are no fixes in the map.
crates/ruff/src/diagnostics.rs:136
↓ 21 callers
Method
iter
Returns an iterator over the fixes in the map, along with the file path.
crates/ruff/src/diagnostics.rs:141
↓ 21 callers
Method
iter_source_order
Returns an iterator over the patterns and keywords in source order.
crates/ruff_python_ast/src/nodes.rs:2972
↓ 21 callers
Method
keys
(&self)
crates/ty_python_core/src/frozen.rs:25
↓ 21 callers
Method
line_column
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:39
↓ 21 callers
Method
next
(&mut self)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:342
↓ 21 callers
Method
parse
Parses the content and returns its AST
crates/ruff_wasm/src/lib.rs:505
↓ 21 callers
Function
parse_suite
(source: &str)
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:196
↓ 21 callers
Method
preceding_node
Returns the comment's preceding node. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that precede
crates/ruff_python_formatter/src/comments/visitor.rs:255
↓ 21 callers
Method
push
(&mut self, value: T)
crates/ruff_formatter/src/printer/stack.rs:18
↓ 21 callers
Method
push
Pushes the given line as part of this code example.
crates/ruff_python_formatter/src/string/docstring.rs:1235
↓ 21 callers
Method
resolve
Returns the re-mapped position or `position` if no mapping exists.
crates/ruff_linter/src/noqa.rs:1281
↓ 21 callers
Method
run
Run the benchmark using `hyperfine`.
scripts/ty_benchmark/src/benchmark/__init__.py:45
↓ 21 callers
Method
send
(&mut self, message: Message)
crates/ty_server/tests/e2e/main.rs:376
↓ 21 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:227
↓ 21 callers
Method
to_lsp_range
( &self, db: &dyn Db, file: File, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:288
↓ 21 callers
Method
uri
(&self)
crates/ty_server/src/document/range.rs:78
↓ 21 callers
Method
variable
(&self)
crates/ty_python_semantic/src/types/tuple.rs:897
↓ 21 callers
Method
with_workspace
Add a workspace to the test server with the given root path.
crates/ruff_server/tests/e2e/main.rs:1031
↓ 20 callers
Method
always
(&self)
crates/ty_python_semantic/src/types/relation.rs:862
↓ 20 callers
Method
apply_specialization
( self, db: &'db dyn Db, f: impl FnOnce(GenericContext<'db>) -> Specialization<'db>,
crates/ty_python_semantic/src/types/class/static_literal.rs:413
↓ 20 callers
Method
as_nominal_instance
(self)
crates/ty_python_semantic/src/types/instance.rs:133
↓ 20 callers
Method
as_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 20 callers
Method
body
(self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:175
↓ 20 callers
Function
bool
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM210.py:12
↓ 20 callers
Method
checked_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:106
↓ 20 callers
Method
concrete_base_type
Walk the `NewTypeBase` chain to find the underlying non-newtype `Type`. There might not be one if this `NewType` is cyclical, and we fall back to `obj
crates/ty_python_semantic/src/types/newtype.rs:101
↓ 20 callers
Method
default_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:267
↓ 20 callers
Method
encoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1388
↓ 20 callers
Method
file_type
(&self)
crates/ruff_db/src/system.rs:292
↓ 20 callers
Method
finish
(&mut self)
crates/ruff_db/src/display.rs:49
↓ 20 callers
Method
fmt
(&self, expression: &Expr, f: &mut PyFormatter)
crates/ruff_python_formatter/src/expression/mod.rs:76
↓ 20 callers
Method
full_range
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition.rs:42
↓ 20 callers
Method
getLogger
(self)
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG002.py:20
↓ 20 callers
Method
has_known_class
Returns whether this is a nominal instance of a particular [`KnownClass`].
crates/ty_python_semantic/src/types/instance.rs:265
↓ 20 callers
Function
indentation
( logical_line: &LogicalLine, prev_logical_line: Option<&LogicalLine>, indent_char: char, inde
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/indentation.rs:269
↓ 20 callers
Method
inner
( builder: &mut TypeInferenceBuilder<'db, '_>, subscript: &ast::ExprSubscript,
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:1856
↓ 20 callers
Method
is_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:123
↓ 20 callers
Method
is_known
Returns whether this is a known class.
crates/ty_python_semantic/src/types/class.rs:612
↓ 20 callers
Method
is_trivia
(&self)
crates/ruff_python_ast/src/token.rs:437
↓ 20 callers
Method
iter_mut
( &mut self, )
crates/ty_python_core/src/frozen.rs:18
↓ 20 callers
Method
line_start
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:75
↓ 20 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:130
↓ 20 callers
Method
member_lookup_with_policy
Similar to [`Type::member`], but allows the caller to specify what policy should be used when looking up attributes. See [`MemberLookupPolicy`] for mo
crates/ty_python_semantic/src/types.rs:3711
↓ 20 callers
Method
push
Pushes a new [`Binding`] and returns its [`BindingId`].
crates/ruff_python_semantic/src/binding.rs:466
↓ 20 callers
Method
range
(&self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:486
↓ 20 callers
Function
remove_argument
Generic function to remove arguments or keyword arguments in function calls and class definitions. (For classes, `args` should be considered `bases`.)
crates/ruff_linter/src/fix/edits.rs:208
↓ 20 callers
Method
trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:310
↓ 20 callers
Method
visit_type
( &self, db: &'db dyn Db, ty: Type<'db>, compute: impl FnOnce() -> Type<'db>,
crates/ty_python_semantic/src/types/cyclic.rs:127
↓ 19 callers
Method
ancestor_ids
Returns an iterator over all [`NodeId`] ancestors, starting from the given [`NodeId`].
crates/ruff_python_semantic/src/nodes.rs:63
↓ 19 callers
Function
any_over_type
Return `true` if `ty`, or any of the types contained in `ty`, match the closure passed in. The function guards against infinite recursion by keeping
crates/ty_python_semantic/src/types/visitor.rs:431
↓ 19 callers
Method
as_str
(&self)
crates/ruff_db/src/diagnostic/mod.rs:956
↓ 19 callers
Method
as_str
(self)
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/private_type_parameter.rs:81
↓ 19 callers
Method
binding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:879
↓ 19 callers
Method
bindings
( &self, )
crates/ty_python_semantic/src/types/infer.rs:232
↓ 19 callers
Method
bytes
Returns an iterator over the bytes of the concatenated bytestring.
crates/ruff_python_ast/src/nodes.rs:1886
↓ 19 callers
Method
close
Closes the virtual file.
crates/ruff_db/src/files.rs:613
↓ 19 callers
Function
create_dir
Helper function to create a directory and all parent directories
crates/ruff_linter/src/rules/isort/categorize.rs:462
↓ 19 callers
Method
current_statements
Returns an [`Iterator`] over the current statement hierarchy, from the current [`Stmt`] through to any parents.
crates/ruff_python_semantic/src/model.rs:1466
↓ 19 callers
Method
extend_from_slice
(&mut self, segments: &[&'a str])
crates/ruff_python_ast/src/name.rs:414
↓ 19 callers
Method
file_name
(&self)
crates/ty_project/src/watch.rs:73
↓ 19 callers
Method
find_positional
Return the positional argument at the given index, or `None` if no such argument exists.
crates/ruff_python_ast/src/nodes.rs:3564
↓ 19 callers
Method
finish
(self)
crates/ruff_python_formatter/src/comments/visitor.rs:613
↓ 19 callers
Method
finish
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:915
↓ 19 callers
Method
following_node
Returns the node following the comment. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that follo
crates/ruff_python_formatter/src/comments/visitor.rs:313
↓ 19 callers
Method
in_stub
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:743
↓ 19 callers
Function
infer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:130
↓ 19 callers
Method
is_ascii
Returns `true` if the text only consists of ASCII characters
crates/ruff_source_file/src/line_index.rs:227
↓ 19 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
↓ 19 callers
Function
is_overload
Returns `true` if a function definition is an `@overload`.
crates/ruff_python_semantic/src/analyze/visibility.rs:30
↓ 19 callers
Method
is_unknown
(&self)
crates/ty_python_semantic/src/types.rs:1105
↓ 19 callers
Method
matches
Returns `true` if the given name matches any of the ignored patterns.
crates/ruff_linter/src/rules/pep8_naming/settings.rs:140
↓ 19 callers
Method
next
(&mut self)
crates/ruff_db/src/system/path.rs:979
↓ 19 callers
Function
parse_suite
(source: &str)
crates/ruff_linter/src/rules/pylint/helpers.rs:402
↓ 19 callers
Method
primary
Add a primary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironmen
crates/ruff_db/src/diagnostic/render.rs:2791
↓ 19 callers
Function
process
(__debug__)
crates/ruff_linter/resources/test/fixtures/semantic_errors/write_to_debug.py:3
↓ 19 callers
Method
qualified_name
Returns the [`QualifiedName`] of the imported name (e.g., given `from foo import bar as baz`, returns `["foo", "bar"]`).
crates/ruff_python_semantic/src/imports.rs:60
↓ 19 callers
Method
range
Returns the [`TextRange`] for the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:506
↓ 19 callers
Method
scope
(&self)
crates/ty_python_semantic/src/types/context.rs:78
↓ 19 callers
Method
seen_typing
(&self)
crates/ruff_python_semantic/src/model.rs:1716
↓ 19 callers
Method
shrink_to_fit
(&mut self)
crates/ruff_python_ast/src/name.rs:39
↓ 19 callers
Method
source
(&self)
crates/ruff_linter/src/rules/pep8_naming/settings.rs:63
↓ 19 callers
Method
stmt
Generate source code from a [`Stmt`].
crates/ruff_python_codegen/src/generator.rs:140
↓ 19 callers
Method
to_notebook_or_file
(&self, db: &dyn Db)
crates/ty_server/src/session.rs:1411
← previous
next →
601–700 of 27,349, ranked by callers