Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
↓ 5 callers
Function
parentheses_iterator
Returns an iterator over the ranges of the optional parentheses surrounding an expression. E.g. for `((f()))` with `f()` as expression, the iterator
crates/ruff_python_ast/src/token/parentheses.rs:13
↓ 5 callers
Method
parenthesized
Returns the indexed parenthesized expression ranges.
crates/ruff_python_trivia/src/comment_ranges.rs:37
↓ 5 callers
Method
parse_match_pattern
Parses an `or_pattern` or an `as_pattern`. See: <https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-pattern>
crates/ruff_python_parser/src/parser/pattern.rs:91
↓ 5 callers
Function
parsed_string_annotation
( source: &str, string: &StringLiteral, )
crates/ruff_db/src/parsed.rs:73
↓ 5 callers
Method
parser_version
Return the [`PythonVersion`] to use for syntax checking and future-import classification. This defaults to [`PythonVersion::latest`] when `target_ver
crates/ruff_linter/src/checkers/ast/mod.rs:651
↓ 5 callers
Method
path
(&self)
crates/ruff_server/src/session/index/ruff_settings.rs:29
↓ 5 callers
Method
path_metadata
(&self, path: &SystemPath)
crates/ruff_db/src/system/os.rs:72
↓ 5 callers
Method
pending_candidate_solution
Create a pending candidate solution for the current path. This method is fallible because a path to the `true` terminal might still be unsatisfiable,
crates/ty_python_semantic/src/types/constraints/solutions.rs:1547
↓ 5 callers
Method
places
(&self)
crates/ty_python_semantic/src/types/narrow.rs:3499
↓ 5 callers
Method
pop_scope
Returns the `NestedGlobalOrNonlocalDeclarations` that are still visible to the enclosing scope, including those contributed by `global` and `nonlocal`
crates/ty_python_core/src/builder.rs:892
↓ 5 callers
Method
position
(&self, node: AnyNodeRef<'_>)
crates/ruff_python_formatter/src/comments/mod.rs:527
↓ 5 callers
Method
possible_key
(&self, node: impl Into<AnyNodeRef<'a>>)
crates/ruff_python_formatter/src/comments/mod.rs:272
↓ 5 callers
Method
preceded_by_continuations
If the node starting at the given [`TextSize`] is preceded by at least one continuation line (i.e., a line ending in a backslash), return the starting
crates/ruff_python_index/src/indexer.rs:176
↓ 5 callers
Method
preceded_by_multi_statement_line
Return `true` if a [`Stmt`] appears to be preceded by other statements in a multi-statement line.
crates/ruff_python_index/src/indexer.rs:210
↓ 5 callers
Method
prefix
Returns the module name prefix, or `None` before the first component.
crates/ty_module_resolver/src/resolve/search.rs:388
↓ 5 callers
Method
prepare_calls
(&self)
crates/ty_ide/src/call_hierarchy.rs:200
↓ 5 callers
Method
program
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:34
↓ 5 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/display.rs:687
↓ 5 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/cyclic.rs:668
↓ 5 callers
Method
program_environment
(&self)
crates/ty_python_semantic/src/types/typevar.rs:993
↓ 5 callers
Method
public_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/place.rs:196
↓ 5 callers
Function
publish_diagnostics_for_document
( snapshot: &DocumentSnapshot, client: &Client, )
crates/ruff_server/src/server/api/diagnostics.rs:24
↓ 5 callers
Method
push
(&mut self, section_id: SectionId)
crates/mdtest/src/parser.rs:468
↓ 5 callers
Method
push_continuation
(&mut self, line: &'a str)
crates/ty_ide/src/docstring/document.rs:196
↓ 5 callers
Method
putc
Sets `chr` with `style` for given `line`, `col`. If `line` does not exist in our buffer, adds empty lines up to the given and fills the last line with
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:76
↓ 5 callers
Function
pytest_global_plugin_files
Returns the installed core pytest plugin files in registration order.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:582
↓ 5 callers
Method
qualified_name
Returns the qualified name of this class.
crates/ty_python_semantic/src/types/class.rs:992
↓ 5 callers
Method
qualifiers
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2129
↓ 5 callers
Method
range
(&self)
crates/ruff_python_formatter/src/string/normalize.rs:646
↓ 5 callers
Method
range
Returns a tuple with the token's `(start, end)` locations
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:287
↓ 5 callers
Method
rank
(&self, index: usize)
crates/ty_python_core/src/rank.rs:89
↓ 5 callers
Method
raw_type
Returns the raw stored type of the place. Any public-type adjustment is applied lazily when converting to `LookupResult`.
crates/ty_python_semantic/src/place.rs:302
↓ 5 callers
Method
read_directory
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:376
↓ 5 callers
Method
readlines
(self)
crates/ruff_linter/resources/test/fixtures/refurb/FURB129.py:71
↓ 5 callers
Method
record
(visit: &mut dyn Visit)
crates/ruff_options_metadata/src/lib.rs:41
↓ 5 callers
Method
record_combined_definition
Record some or all of a definition that both declares a type and binds a value. Annotated assignments can declare before their RHS and bind afterward
crates/ty_python_core/src/use_def.rs:2830
↓ 5 callers
Method
record_exception_checkpoint_if
(&mut self, can_raise: bool)
crates/ty_python_core/src/builder.rs:2482
↓ 5 callers
Method
record_negated_reachability_constraint
Record the negation of a given reachability constraint.
crates/ty_python_core/src/builder.rs:2622
↓ 5 callers
Method
relative_path
Return the file's path relative to the current working directory.
crates/ruff_db/src/diagnostic/mod.rs:1161
↓ 5 callers
Function
relativize_path
Convert an absolute path to be relative to the current working directory.
crates/ruff_linter/src/fs.rs:46
↓ 5 callers
Method
remove
(self)
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE794.py:6
↓ 5 callers
Method
remove_inferable_typevar_artifacts_from_solution
Remove inferable type variables introduced by transitivity within the target's binding context while preserving intentional relationships to other gen
crates/ty_python_semantic/src/types/generics.rs:3365
↓ 5 callers
Method
render
Render a diagnostic [`Report`]
crates/ruff_annotate_snippets/src/renderer/mod.rs:202
↓ 5 callers
Method
render_diagnostics
Render the given diagnostics into a `String`. See `render` for rendering a single diagnostic. (This will set the "printed" flag on `Diagnostic`.)
crates/ruff_db/src/diagnostic/render.rs:2716
↓ 5 callers
Function
render_html
(result: Result, command: RuffCommand, title: str)
python/ruff-ecosystem/ruff_ecosystem/html.py:28
↓ 5 callers
Function
render_inline_text
Escapes underscores and HTML-sensitive characters in prose outside inline code spans. For example, `__init__` becomes `\_\_init\_\_`, while `` `__ini
crates/ty_ide/src/docstring/markdown/general/inline.rs:537
↓ 5 callers
Method
repeat_specialization
Returns a specialization of this generic context where each typevar is mapped to the same type.
crates/ty_python_semantic/src/types/generics.rs:928
↓ 5 callers
Method
report_progress
(&self, progress: &LazyWorkDoneProgress)
crates/ty_server/src/server/script_progress.rs:99
↓ 5 callers
Method
required_applicability
(&self)
crates/ruff_linter/src/settings/types.rs:162
↓ 5 callers
Method
reserve_exact
Reserves capacity for at least `additional` more bindings.
crates/ruff_python_semantic/src/binding.rs:469
↓ 5 callers
Method
resize
(&mut self, new_len: usize, value: T)
crates/ruff_index/src/vec.rs:79
↓ 5 callers
Method
resolve
Resolve a set of globs, anchored at a given root.
crates/ruff/src/commands/analyze_graph.rs:253
↓ 5 callers
Function
resolve_imported_module_path
Given an imported module (based on its relative import level and module name), return the fully-qualified module path.
crates/ruff_python_ast/src/helpers.rs:1087
↓ 5 callers
Function
resolve_module_confident
( db: &'db ProjectDatabase, module_name: &ModuleName, )
crates/ty/tests/file_watching.rs:46
↓ 5 callers
Function
resolve_solution
Resolves only dependencies with selected, acyclic solutions. The result has the same order as `solution`; references outside `inferable` retain their
crates/ty_python_semantic/src/types/constraints/resolution.rs:34
↓ 5 callers
Function
resolver_environment
(db: &dyn Db)
crates/ty_ide/src/will_rename.rs:1376
↓ 5 callers
Method
retained_constraint_index
(&self, id: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:366
↓ 5 callers
Method
root_settings
(&self)
crates/ruff_workspace/src/resolver.rs:83
↓ 5 callers
Method
rule
(self)
crates/ty_python_semantic/src/types/overrides.rs:1569
↓ 5 callers
Function
run
( command: list[str], *, environment: dict[str, str], allowed_exit_codes: tuple[int, ...] = (0
scripts/build_ruff_pgo.py:549
↓ 5 callers
Function
run
(argv: Sequence[str])
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30_isort.py:51
↓ 5 callers
Function
run_corpus_tests
(pattern: &str)
crates/ty_python_semantic/tests/corpus.rs:76
↓ 5 callers
Function
run_uv
Runs uv in the test's project directory with its configured executable and environment.
crates/ty/tests/file_watching.rs:4409
↓ 5 callers
Method
same_divergent_marker
Returns `true` if both types reference the same recursive query, or both represent pending narrowing, regardless of materialization state.
crates/ty_python_semantic/src/types.rs:2502
↓ 5 callers
Method
saturating_add
(self, rhs: usize)
crates/ruff_source_file/src/line_index.rs:611
↓ 5 callers
Method
scope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/named_tuple.rs:206
↓ 5 callers
Method
scope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:177
↓ 5 callers
Method
scope_ids
(&self)
crates/ty_python_core/src/lib.rs:497
↓ 5 callers
Method
script_files
Returns all scripts in the project, including explicitly opened scripts. Scripts are identified solely by the presence of a PEP 723 script metadata b
crates/ty_project/src/lib.rs:832
↓ 5 callers
Method
secondary
Add a secondary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironm
crates/ruff_db/src/diagnostic/render.rs:2831
↓ 5 callers
Method
serialize
(&self, serializer: S)
crates/ruff_linter/src/codes.rs:78
↓ 5 callers
Method
set
(self, key: Key, flag: int, *, recursive: bool)
crates/ruff_benchmark/resources/tomllib/_parser.py:164
↓ 5 callers
Method
set_check_mode
Set the check mode for the project.
crates/ty_project/src/db.rs:269
↓ 5 callers
Method
set_included_paths
(self, db: &mut dyn Db, paths: Vec<SystemPathBuf>)
crates/ty_project/src/lib.rs:621
↓ 5 callers
Method
set_invalid_type_annotation
(&mut self)
crates/ty_python_semantic/src/types/display.rs:420
↓ 5 callers
Method
set_return_type
(&mut self, return_ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:9611
↓ 5 callers
Method
set_style
Set `style` for `line`, `col` if: 1. That line and column exist in `StyledBuffer` 2. `overwrite` is `true` or existing style is `Style::NoStyle` or `S
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:158
↓ 5 callers
Function
settings_toml
Return the path to the `pyproject.toml` or `ruff.toml` file in a given directory.
crates/ruff_workspace/src/pyproject.rs:84
↓ 5 callers
Method
severity
(&self)
crates/ty_wasm/src/lib.rs:948
↓ 5 callers
Method
shadows_any
Returns `true` if `self` shadows any global, nonlocal, or local symbol, keyword, or builtin.
crates/ruff_linter/src/renamer.rs:434
↓ 5 callers
Function
shadows_builtin
( name: &str, source_type: PySourceType, ignorelist: &[String], python_version: PythonVersion,
crates/ruff_linter/src/rules/flake8_builtins/helpers.rs:5
↓ 5 callers
Method
shrink_to_fit
(&mut self, members: &IndexVec<ScopedMemberId, Member>)
crates/ty_python_core/src/member.rs:525
↓ 5 callers
Function
singleton_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, singleton: ast::Singleton, )
crates/ty_python_semantic/src/types/match_pattern.rs:66
↓ 5 callers
Method
source_overload_index
Returns the overload's source position in the defining function's overload list.
crates/ty_python_semantic/src/types/call/bind.rs:9393
↓ 5 callers
Method
specialization_of
If the type is a specialized instance of the given class, returns the specialization.
crates/ty_python_semantic/src/types.rs:2871
↓ 5 callers
Function
specialization_variance
( db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:2180
↓ 5 callers
Function
start_of_file
()
crates/ruff_python_importer/src/insertion.rs:404
↓ 5 callers
Method
statement
(self)
crates/ruff_python_formatter/src/statement/suite.rs:902
↓ 5 callers
Method
static_member
Access an attribute of this type without invoking the descriptor protocol. This method corresponds to `inspect.getattr_static(<object of type 'self'>,
crates/ty_python_semantic/src/types.rs:5054
↓ 5 callers
Method
store_type_expression_flags
Store metadata for a type expression.
crates/ty_python_semantic/src/types/infer/builder.rs:1114
↓ 5 callers
Method
sub
Adds a sub-diagnostic constructed with this diagnostic's environment.
crates/ruff_db/src/diagnostic/render.rs:2873
↓ 5 callers
Method
summary_line
Summary line without the trailing newline characters
crates/ruff_linter/src/docstrings/sections.rs:374
↓ 5 callers
Function
symbol_definition
Returns the definition to use as the secondary annotation for an overridden symbol.
crates/ty_python_semantic/src/types/overrides.rs:1877
↓ 5 callers
Method
system_virtual_path_to_document
( &self, path: &SystemVirtualPath, )
crates/ty_server/src/system.rs:158
↓ 5 callers
Method
target
(&self)
crates/ty_ide/src/inlay_hints.rs:330
↓ 5 callers
Method
target_range
Returns the [`TextRange`] of the definition target. A definition target would mainly be the node representing the place being defined i.e., [`ast::Ex
crates/ty_python_core/src/definition.rs:1032
↓ 5 callers
Function
this
r""" 'hey ho'
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:85
↓ 5 callers
Method
to_program_settings
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_project/src/metadata.rs:581
↓ 5 callers
Function
to_snake_case
Converts CamelCase to snake_case
crates/ruff_python_ast/generate.py:73
↓ 5 callers
Method
top
(&mut self)
crates/mdtest/src/parser.rs:482
← previous
next →
2,901–3,000 of 31,766, ranked by callers