MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions27,349 in github.com/astral-sh/ruff

↓ 13 callersMethodreturn_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:8686
↓ 13 callersMethodroot
Returns the path to the test directory root.
crates/ruff/tests/cli/main.rs:179
↓ 13 callersMethodset_search_paths
(&mut self, search_paths: SearchPaths)
crates/ty_module_resolver/src/db.rs:69
↓ 13 callersMethodshow_fix_diff
Whether to show a diff for an available fix after the main diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:1544
↓ 13 callersMethodsnapshot
Generate a [`Snapshot`] of the current semantic model.
crates/ruff_python_semantic/src/model.rs:2053
↓ 13 callersMethodsource_code
Return the notebook content. This is the concatenation of all Python code cells.
crates/ruff_notebook/src/notebook.rs:373
↓ 13 callersFunctionspace
()
crates/ruff_formatter/src/builders.rs:658
↓ 13 callersMethodspan
Create a span with the range of the given expression in the file being currently type checked. If you're creating a diagnostic with snippets in files
crates/ty_python_semantic/src/types/context.rs:88
↓ 13 callersFunctionsuffixed_err
Return a `TOMLDecodeError` where error message is suffixed with coordinates in source.
crates/ruff_benchmark/resources/tomllib/_parser.py:652
↓ 13 callersMethodtarget
(self, db: &'db dyn Db, parsed: &'ast ParsedModuleRef)
crates/ty_python_core/src/unpack.rs:54
↓ 13 callersMethodto_zero_indexed
Return the zero-indexed primitive value for this [`OneIndexed`]
crates/ruff_source_file/src/line_index.rs:604
↓ 13 callersMethodtry_into_module
Attempts to convert the [`Parsed<Mod>`] into a [`Parsed<ModModule>`]. This method checks if the `syntax` field of the output is a [`Mod::Module`]. If
crates/ruff_python_parser/src/lib.rs:494
↓ 13 callersMethodtry_iterate
Given the type of an object that is iterated over in some way, return a tuple spec describing the type of objects that are yielded by that iteration.
crates/ty_python_semantic/src/types/iteration.rs:86
↓ 13 callersMethodtuple
(tuple: Option<TupleType<'db>>)
crates/ty_python_semantic/src/types/instance.rs:91
↓ 13 callersFunctionundefined
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:1064
↓ 13 callersMethodwith_extra_file
(&mut self, file_name: &str, content: &str)
crates/ty_ide/src/inlay_hints.rs:871
↓ 13 callersMethodwith_max_recursion_depth
(mut self, depth: u16)
crates/ruff_python_parser/src/parser/options.rs:63
↓ 12 callersMethodadd_atom
(&mut self, predicate: ScopedPredicateId)
crates/ty_python_core/src/narrowing_constraints.rs:236
↓ 12 callersMethodadd_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:669
↓ 12 callersMethodancestor_scopes
Returns the scopes enclosing `node`, starting with the scope containing the node itself. Like [`Self::scope`], this handles nodes inside string annot
crates/ty_python_semantic/src/semantic_model.rs:341
↓ 12 callersMethodannotation
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1450
↓ 12 callersMethodany_rule_enabled
(&self, rules: &[Rule])
crates/ruff_linter/src/checkers/ast/mod.rs:558
↓ 12 callersMethodapply_optional_specialization
Applies an optional specialization to this specialization.
crates/ty_python_semantic/src/types/generics.rs:1355
↓ 12 callersMethodas_expr_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1139
↓ 12 callersMethodas_literal_value_kind
(self)
crates/ty_python_semantic/src/types.rs:1633
↓ 12 callersMethodas_slice
Returns a slice of all the [`FStringPart`]s contained in this value.
crates/ruff_python_ast/src/nodes.rs:518
↓ 12 callersMethodas_str
(self)
crates/ruff_linter/src/rules/refurb/rules/sorted_min_max.rs:215
↓ 12 callersMethodas_symbol
Returns `Some` if the reference is a `Symbol`, otherwise `None`.
crates/ty_python_core/src/place.rs:113
↓ 12 callersMethodchecked_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:100
↓ 12 callersMethodclass_specialization
If this type is a class instance, returns the class and its specialization.
crates/ty_python_semantic/src/types.rs:1405
↓ 12 callersMethodcmp
(&self, rhs: &CompletionRanker<'_>)
crates/ty_ide/src/completion.rs:3166
↓ 12 callersMethodcollect_vec
Walks the project paths and collects the paths of all files that are included in the project.
crates/ty_project/src/walk.rs:146
↓ 12 callersMethodcolor
Whether to enable colors or not.
crates/ruff_db/src/diagnostic/mod.rs:1476
↓ 12 callersMethodcontent_range
The range of the string literal's contents. This excludes any prefixes, opening quotes or closing quotes.
crates/ruff_python_ast/src/nodes.rs:1734
↓ 12 callersMethodcreate
Creates a new, empty virtual environment.
scripts/ty_benchmark/src/benchmark/venv.py:39
↓ 12 callersFunctioncreate_syntax_error_diagnostics
Create Ruff-style syntax error diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:3033
↓ 12 callersMethoddebug
Returns a nice debug representation that prints the source code for every comment (and not just the range).
crates/ruff_python_formatter/src/comments/mod.rs:165
↓ 12 callersMethoddiagnostic_source
(&self, resolver: &dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1198
↓ 12 callersFunctiondirectory_listing
( db: &'db dyn Db, path: &SystemPath, )
crates/ruff_db/src/files/directory.rs:94
↓ 12 callersMethodentries
(&mut self, entries: I)
crates/ruff_python_formatter/src/builders.rs:188
↓ 12 callersMethodentries
(&mut self, items: I)
crates/ruff_db/src/display.rs:38
↓ 12 callersMethodenum_class_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/literal.rs:404
↓ 12 callersMethodenum_complement
Return the compact enum-complement view of this intersection, if it has one.
crates/ty_python_semantic/src/types/set_theoretic.rs:718
↓ 12 callersFunctionerror
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT022.py:15
↓ 12 callersMethodexpect_place
(&self, place_expr: &PlaceExpr)
crates/ty_python_semantic/src/types/narrow.rs:2633
↓ 12 callersMethodexpect_ty_file
Returns the [`File`] attached to this [`Span`]. Panics if the file is a [`UnifiedFile::Ruff`] instead of a [`UnifiedFile::Ty`].
crates/ruff_db/src/diagnostic/mod.rs:1270
↓ 12 callersMethodfile
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:319
↓ 12 callersFunctionformat
(root: &dyn Format<SimpleFormatContext>)
crates/ruff_formatter/src/printer/mod.rs:1678
↓ 12 callersFunctionformat_module_source
( source: &str, options: PyFormatOptions, )
crates/ruff_python_formatter/src/lib.rs:136
↓ 12 callersFunctionget_assertions
(source: &str)
crates/mdtest/src/assertion.rs:528
↓ 12 callersMethodget_default
Returns the most appropriate type of this argument when there is no specific declared type.
crates/ty_python_semantic/src/types/call/arguments.rs:67
↓ 12 callersMethodget_span
Returns the `Span` associated with this annotation.
crates/ruff_db/src/diagnostic/mod.rs:882
↓ 12 callersMethodid
Returns the identifier for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:202
↓ 12 callersFunctioninfer_expression_types
Infer all types for an [`Expression`] (including sub-expressions). Use rarely; only for cases where we'd otherwise risk double-inferring an expression
crates/ty_python_semantic/src/types/infer.rs:356
↓ 12 callersMethodinterface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:920
↓ 12 callersMethodinto_iter
(self)
crates/ruff_python_ast/src/nodes.rs:219
↓ 12 callersFunctioninto_vec
(assertions: InlineFileAssertions<'_>)
crates/mdtest/src/assertion.rs:536
↓ 12 callersMethodis_async
(self)
crates/ty_python_core/src/lib.rs:1026
↓ 12 callersFunctionis_dict
Test whether the given binding can be considered a dictionary. For this, we check what value might be associated with it through it's initialization,
crates/ruff_python_semantic/src/analyze/typing.rs:1035
↓ 12 callersMethodis_instance_of
Return `true` if `self` is a nominal instance of the given known class.
crates/ty_python_semantic/src/types/instance.rs:141
↓ 12 callersMethodis_module
(&self)
crates/ruff_python_ast/src/generated.rs:48
↓ 12 callersMethodis_read_only
(&self)
crates/ty_python_semantic/src/types/class.rs:2486
↓ 12 callersMethodis_same_typevar_as
Returns whether two bound typevars represent the same occurrence, regardless of e.g. differences in their bounds or constraints due to materialization
crates/ty_python_semantic/src/types/typevar.rs:993
↓ 12 callersFunctionis_stub
Returns `true` if a function has an empty body, and is therefore a stub. A function body is considered to be empty if it contains only `pass` stateme
crates/ruff_python_semantic/src/analyze/function_type.rs:165
↓ 12 callersMethoditer
Returns an iterator over every symbol along with its ID.
crates/ty_ide/src/symbols.rs:145
↓ 12 callersMethodline_starts
Returns the [byte offsets](TextSize) for every line
crates/ruff_source_file/src/line_index.rs:533
↓ 12 callersMethodliterals
Returns an iterator over the [`StringLiteral`] parts contained in this value. Note that this doesn't recurse into the f-string parts. For example, `
crates/ruff_python_ast/src/nodes.rs:553
↓ 12 callersMethodmap
( self, db: &'db dyn Db, transform_fn: impl FnMut(&Type<'db>) -> Type<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:1573
↓ 12 callersFunctionmatch_call_mut
( expression: &'a mut Expression<'b>, )
crates/ruff_linter/src/cst/matchers.rs:69
↓ 12 callersFunctionmatch_expression
Given the source code for an expression, return the parsed [`Expression`]. If the expression is not guaranteed to be valid as a standalone expression
crates/ruff_linter/src/cst/matchers.rs:223
↓ 12 callersMethodmatch_parameters
Match parameters for this constructor method and downstream constructors.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:68
↓ 12 callersMethodmaterialize
Applies the constraints between the place's last materialized node and `target`. The place's node must be an ancestor of `target`. After materializat
crates/ty_python_core/src/use_def.rs:1426
↓ 12 callersMethodminimum
Returns the minimum length of this tuple.
crates/ty_python_semantic/src/types/tuple.rs:68
↓ 12 callersMethodname
The absolute name of the module (e.g. `foo.bar`)
crates/ty_module_resolver/src/module.rs:43
↓ 12 callersMethodname
(&self)
crates/ruff_benchmark/src/lib.rs:79
↓ 12 callersMethodopen_text_document
Send a `textDocument/didOpen` notification
crates/ruff_server/tests/e2e/main.rs:699
↓ 12 callersMethodor
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:137
↓ 12 callersMethodor_fall_back_to
Fallback (wholly or partially) to `fallback` to create a new [`LookupResult`].
crates/ty_python_semantic/src/place.rs:414
↓ 12 callersMethodoverloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:771
↓ 12 callersMethodparameter_documentation
Extract parameter documentation from popular docstring formats. Returns a map of parameter names to their documentation.
crates/ty_ide/src/docstring.rs:60
↓ 12 callersMethodparent
(&'a self)
crates/ty_module_resolver/src/path.rs:845
↓ 12 callersMethodpop
(&mut self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:135
↓ 12 callersMethodprefix
(self)
crates/ruff_python_ast/src/nodes.rs:994
↓ 12 callersMethodprimary_annotation
Returns a shared borrow of the "primary" annotation of this diagnostic if one exists. When there are multiple primary annotations, then the first one
crates/ruff_db/src/diagnostic/mod.rs:263
↓ 12 callersMethodpush
(&mut self, line_number: OneIndexed, messages: Vec<Failure>)
crates/mdtest/src/matcher.rs:39
↓ 12 callersMethodrange
(&self)
crates/ruff_python_formatter/src/lib.rs:109
↓ 12 callersMethodreachability_constraints
(&self)
crates/ty_python_core/src/use_def.rs:857
↓ 12 callersMethodrecursive_type_normalized
Normalize recursive types for cycle recovery when there's no previous value. See [`Type::recursive_type_normalized`] for more details.
crates/ty_python_semantic/src/types/typevar.rs:1691
↓ 12 callersFunctionresolve
Resolve the relevant settings strategy and defaults for the current invocation.
crates/ruff/src/resolve.rs:20
↓ 12 callersMethodresolved_client_capabilities
Returns the resolved client capabilities that were captured during initialization.
crates/ty_server/src/session.rs:1383
↓ 12 callersMethodresolved_client_capabilities
(&self)
crates/ruff_server/src/session.rs:188
↓ 12 callersMethodrules
Returns rules matching the selector, taking into account rule groups like preview and deprecated.
crates/ruff_linter/src/rule_selector.rs:276
↓ 12 callersMethodrun
(self)
crates/ty_site_packages/src/lib.rs:2406
↓ 12 callersMethodscope_id
The scope in which the reference is defined.
crates/ruff_python_semantic/src/reference.rs:36
↓ 12 callersMethodsend
(&mut self, message: Message)
crates/ruff_server/tests/e2e/main.rs:316
↓ 12 callersMethodset_parent
Set the offset of the diagnostic's parent statement.
crates/ruff_db/src/diagnostic/mod.rs:398
↓ 12 callersMethodseverity
Returns the severity of this diagnostic. Note that this may be different than the severity of sub-diagnostics.
crates/ruff_db/src/diagnostic/mod.rs:254
↓ 12 callersMethodsite_packages
Add a file to site-packages (simulating a third-party dependency). The path should be relative to site-packages root (e.g., "numpy/__init__.py").
crates/ty_ide/src/lib.rs:740
↓ 12 callersMethodstart
(&self)
crates/ruff_source_file/src/newlines.rs:211
↓ 12 callersMethodtake
Takes a snapshot of the current state of the matched overload bindings. # Panics Panics if the indexes of the matched overloads are not valid for th
crates/ty_python_semantic/src/types/call/bind.rs:6687
← previousnext →1,001–1,100 of 27,349, ranked by callers