Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
28,410 in github.com/astral-sh/ruff
⨍
Functions
28,410
◇
Types & classes
6,658
↳
Endpoints
82
↓ 46 callers
Method
line_position
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:141
↓ 46 callers
Method
literal
(self)
crates/ruff_python_ast/src/generated.rs:2983
↓ 46 callers
Method
name
(self)
crates/ty_python_semantic/src/types/class.rs:255
↓ 46 callers
Method
node
( self, db: &dyn Db, file: File, module: &'ast ParsedModuleRef, )
crates/ty_python_semantic/src/types/function.rs:361
↓ 46 callers
Function
parse
Parse the Markdown `source` as a test suite with given `title`. `validate_config` is invoked once for every literally-declared `toml` config block (a
crates/mdtest/src/parser.rs:25
↓ 46 callers
Method
replace
(&mut self, other: Self, set_to: bool)
crates/ty_python_semantic/src/types/infer.rs:1897
↓ 46 callers
Function
resolve_module_confident
Resolves a module name to a module, without desperate resolution available. This is appropriate for resolving a `KnownModule`, or cases where for wha
crates/ty_module_resolver/src/resolve.rs:73
↓ 45 callers
Method
append
(self, x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:15
↓ 45 callers
Method
get_mut
(&mut self, index: I)
crates/ruff_index/src/slice.rs:116
↓ 45 callers
Method
is_starred_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2614
↓ 45 callers
Method
place_table
(&self, scope_id: FileScopeId)
crates/ty_python_core/src/lib.rs:362
↓ 45 callers
Method
skip_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:793
↓ 44 callers
Method
annotated_type
Annotated type of the parameter. If no annotation was provided, this is `Unknown`.
crates/ty_python_semantic/src/types/signatures.rs:5109
↓ 44 callers
Method
build
(self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1121
↓ 44 callers
Method
format
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:483
↓ 44 callers
Method
get_or_import_symbol
Generate an [`Edit`] to reference the given symbol. Returns the [`Edit`] necessary to make the symbol available in the current scope along with the bo
crates/ruff_linter/src/importer/mod.rs:281
↓ 44 callers
Function
get_result
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, )
crates/mdtest/src/matcher.rs:569
↓ 44 callers
Method
iter_mro
Returns an iterator over the MRO.
crates/ty_python_semantic/src/types/class.rs:539
↓ 44 callers
Method
map
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind.rs:383
↓ 44 callers
Method
origin
()
crates/ty_python_semantic/src/types/constraints.rs:6703
↓ 44 callers
Method
project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:36
↓ 44 callers
Method
split_at
Returns a pair of token slices from both before and after the given [`TextSize`] offset. If the given offset is between two tokens, the "before" slic
crates/ruff_python_ast/src/token/tokens.rs:204
↓ 44 callers
Method
with_annotated_type
Set the annotated type for this parameter. This also marks the annotation as explicit (not inferred), so it will be displayed.
crates/ty_python_semantic/src/types/signatures.rs:4829
↓ 43 callers
Function
create_dir_all
( paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, normalized: &Utf8Path, )
crates/ruff_db/src/system/memory_fs.rs:479
↓ 43 callers
Function
create_typevar
(db: &'db dyn Db, name: &'static str)
crates/ty_python_semantic/src/types/constraints.rs:7685
↓ 43 callers
Method
get
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
↓ 43 callers
Method
next
(&mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:11684
↓ 42 callers
Method
expect_single_definition
( &self, definition_key: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy, )
crates/ty_python_core/src/lib.rs:621
↓ 42 callers
Method
f
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:121
↓ 42 callers
Method
module
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:766
↓ 42 callers
Method
name
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:177
↓ 42 callers
Method
path
(&self)
crates/ruff/src/commands/format.rs:859
↓ 41 callers
Method
apply_changes
(&mut self, changes: &[ChangeEvent])
crates/ty/tests/file_watching.rs:180
↓ 41 callers
Method
check
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:342
↓ 41 callers
Function
empty
()
crates/ty_python_semantic/src/types/signatures.rs:5390
↓ 41 callers
Method
extend
(&mut self, iter: T)
crates/ruff_linter/src/registry/rule_set.rs:327
↓ 41 callers
Method
is_empty
Returns true if and only if this collection is empty.
crates/ty_ide/src/symbols.rs:135
↓ 41 callers
Method
iter
Returns an iterator over all enabled lints and their severity.
crates/ty_python_semantic/src/lint.rs:589
↓ 41 callers
Method
len
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:194
↓ 41 callers
Method
path
(&self)
crates/ty_wasm/src/lib.rs:845
↓ 41 callers
Method
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:1244
↓ 41 callers
Method
with_src_files
Specify files to be created in the `src` mock directory
crates/ty_module_resolver/src/testing.rs:117
↓ 40 callers
Function
bind_docstring_snapshot_filters
()
crates/ty_ide/src/docstring.rs:156
↓ 40 callers
Method
eat
Consume the current token if it is of the given kind. Returns `true` if it matches, `false` otherwise.
crates/ruff_python_parser/src/parser/mod.rs:642
↓ 40 callers
Method
field
Returns the field declared directly on this dynamic named tuple, if any.
crates/ty_python_semantic/src/types/class/named_tuple.rs:471
↓ 40 callers
Method
iter
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:99
↓ 40 callers
Method
lines
(&self)
crates/ruff_linter/src/noqa.rs:333
↓ 40 callers
Method
with_initialization_options
Set the initial client options for the test server
crates/ty_server/tests/e2e/main.rs:1215
↓ 39 callers
Method
add
Add a file with the given path and contents to this environment.
crates/ruff_db/src/diagnostic/render.rs:2623
↓ 39 callers
Method
at
Returns `true` if the current token is of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:702
↓ 39 callers
Method
ignore_possibly_undefined
Returns the inner type, unless it is definitely undefined.
crates/ty_python_semantic/src/types/member.rs:41
↓ 39 callers
Method
iter
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3570
↓ 39 callers
Method
saturating_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:113
↓ 39 callers
Method
symbol
(&self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:221
↓ 39 callers
Method
use_def_map
(&self, scope_id: FileScopeId)
crates/ty_python_core/src/lib.rs:379
↓ 38 callers
Method
build
(&self)
crates/ty_ide/src/symbols.rs:2975
↓ 38 callers
Method
class
Return the [`KnownClass`] that inhabitants of this type are instances of at runtime
crates/ty_python_semantic/src/types/method.rs:315
↓ 38 callers
Method
contains
(&self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:28
↓ 38 callers
Function
event_for_file
(name: &str)
crates/ty/tests/file_watching.rs:256
↓ 38 callers
Method
exists
Returns `true` if the file exists.
crates/ruff_db/src/files.rs:562
↓ 38 callers
Function
format_with
Creates an object implementing `Format` that calls the passed closure to perform the formatting. # Examples ``` use ruff_formatter::prelude::*; use
crates/ruff_formatter/src/builders.rs:2317
↓ 38 callers
Method
get
Get the cached results for a single file at relative `path`. This uses `key` to determine if the results are still accurate. (i.e. if the file hasn't
crates/ruff/src/cache.rs:260
↓ 38 callers
Method
into_iter
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:92
↓ 38 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:101
↓ 38 callers
Function
lex_inline_noqa
Lexes in-line `noqa` comment, e.g. `# noqa: F401`
crates/ruff_linter/src/noqa.rs:350
↓ 38 callers
Method
negate
Returns the negation of this constraint set.
crates/ty_python_semantic/src/types/constraints.rs:560
↓ 38 callers
Method
next
(&mut self)
crates/ruff_python_ast/src/nodes.rs:244
↓ 38 callers
Method
open
(self)
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:66
↓ 38 callers
Method
source
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/symbols.rs:3009
↓ 38 callers
Method
stop_watch
(&mut self, matcher: M)
crates/ty/tests/file_watching.rs:57
↓ 38 callers
Method
sub
(mut self, sub: SubDiagnostic)
crates/ty_project/src/metadata/options.rs:2299
↓ 38 callers
Method
suite
Returns the module body contained in this parsed output as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:528
↓ 38 callers
Method
types
(&self)
crates/ty_python_semantic/src/types/constraints.rs:312
↓ 38 callers
Method
visit_source_order
(&'a self, visitor: &mut V)
crates/ruff_python_ast/src/node.rs:9
↓ 37 callers
Method
build
Return the built diagnostic.
crates/ruff_db/src/diagnostic/render.rs:2750
↓ 37 callers
Method
contains_range
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:204
↓ 37 callers
Method
current_statement
Return the current [`Stmt`].
crates/ruff_python_semantic/src/model.rs:1474
↓ 37 callers
Method
file_uri
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:771
↓ 37 callers
Method
range
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:157
↓ 37 callers
Method
specialization
Project this inference result into a closed specialization.
crates/ty_python_semantic/src/types/generics.rs:2179
↓ 36 callers
Method
is_subtype_of
Return true if this type is a subtype of type `target`. See [`TypeRelation::Subtyping`] for more details.
crates/ty_python_semantic/src/types/relation.rs:315
↓ 36 callers
Method
push
Extends `self` with `path`. If `path` is absolute, it replaces the current path. On Windows: if `path` has a root but no prefix (e.g., `\windows`),
crates/ruff_db/src/system/path.rs:566
↓ 36 callers
Method
to
(self, unit: str)
crates/ruff_benchmark/resources/pydantic/types.py:740
↓ 36 callers
Method
trim_start
Trims the indent of `rhs` by `self`. Returns `None` if `self` is not a prefix of `rhs` or either `self` or `rhs` use mixed indentation.
crates/ruff_python_formatter/src/string/docstring.rs:1749
↓ 36 callers
Function
type
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB168.py:84
↓ 36 callers
Method
write_file_all
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`. Enclosing directorie
crates/ruff_db/src/system/memory_fs.rs:229
↓ 35 callers
Method
create_directory_all
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:95
↓ 35 callers
Method
file
(self, db: &dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:480
↓ 35 callers
Method
help
Adds a "help" sub-diagnostic with the given message. See the closely related [`Diagnostic::info`] method for more details.
crates/ruff_db/src/diagnostic/mod.rs:182
↓ 35 callers
Method
into_iter
(self)
crates/ty_python_semantic/src/types/call/bind.rs:4410
↓ 35 callers
Method
is_class
(self)
crates/ty_python_core/src/scope.rs:254
↓ 35 callers
Method
is_ok
(&self)
crates/ruff_python_parser/tests/generate_inline_tests.rs:205
↓ 35 callers
Method
items
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typed_dict.rs:482
↓ 35 callers
Method
iter
(&self)
crates/ty_python_semantic/src/types/signatures.rs:206
↓ 35 callers
Function
lex_file_exemption
Lexes file-level exemption comment, e.g. `# ruff: noqa: F401`
crates/ruff_linter/src/noqa.rs:383
↓ 35 callers
Method
next
(&self)
crates/ty_python_semantic/src/types/typevar.rs:824
↓ 35 callers
Method
range
(&self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:188
↓ 35 callers
Function
setup_rayon
()
crates/ruff_benchmark/benches/ty.rs:128
↓ 35 callers
Method
to_scope_id
(self, db: &dyn Db, file: File)
crates/ty_python_core/src/scope.rs:100
↓ 34 callers
Method
as_ref
(&self)
crates/ty_site_packages/src/lib.rs:445
← previous
next →
301–400 of 28,410, ranked by callers