MCPcopy Create free account

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

Functions31,562 in github.com/astral-sh/ruff

↓ 5 callersMethodis_unparenthesized_starred_expr
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3045
↓ 5 callersFunctionis_valid_default_value_with_annotation
( default: &Expr, allow_container: bool, locator: &Locator, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:293
↓ 5 callersMethodis_yes
Returns `true` if the parenthesized value is `Yes`.
crates/ruff_python_parser/src/parser/mod.rs:1156
↓ 5 callersMethodis_yes
(self)
crates/ty_python_semantic/src/types/constraints.rs:3750
↓ 5 callersMethoditer
(&self)
crates/ruff_python_ast/src/comparable.rs:388
↓ 5 callersMethoditer
Returns an iterator over the starting rows of each cell (1-based). This yields one entry per Python cell (skipping over Markdown cell).
crates/ruff_notebook/src/index.rs:43
↓ 5 callersMethoditer
(&self)
crates/ty_ide/src/hover.rs:353
↓ 5 callersMethoditer
(&self)
crates/ruff_linter/src/linter.rs:77
↓ 5 callersMethoditer_callable_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1054
↓ 5 callersMethoditer_constructor_items_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:1071
↓ 5 callersFunctioniter_parent_enum_classes
Iterates over parent enum classes in the MRO, skipping known enum infrastructure classes but including `IntEnum`, `Flag`, and `IntFlag` which declare
crates/ty_python_semantic/src/types/enums.rs:1373
↓ 5 callersMethodkeyword_variadic
Return the keywords parameter (`**kwargs`), if any, and its index, or `None`.
crates/ty_python_semantic/src/types/signatures.rs:5812
↓ 5 callersMethodkind
(&self)
crates/ruff_python_parser/src/typing.rs:26
↓ 5 callersMethodkind
Returns the section kind.
crates/ty_ide/src/docstring/document.rs:68
↓ 5 callersMethodkind
(&self)
crates/ty_python_semantic/src/types/signatures.rs:5238
↓ 5 callersMethodlen
The number of characters this line ending occupies in bytes.
crates/ruff_annotate_snippets/src/renderer/source_map.rs:714
↓ 5 callersMethodlen
(&self)
crates/ty_module_resolver/src/typeshed.rs:314
↓ 5 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:3679
↓ 5 callersMethodline_start
(&self, offset: TextSize)
crates/ruff_source_file/src/line_ranges.rs:339
↓ 5 callersMethodline_str
Returns the text of the `offset`'s line. See [`LineRanges::line_str`].
crates/ruff_linter/src/locator.rs:132
↓ 5 callersMethodlint_registry
(&self)
crates/ty_project/src/db.rs:627
↓ 5 callersMethodliteral_fallback_instance
Returns the fallback instance type that a literal is an instance of, or `None` if the type is not a literal.
crates/ty_python_semantic/src/types.rs:3703
↓ 5 callersMethodmap
(self, operation: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types/recursive.rs:753
↓ 5 callersMethodmap
(self, db: &'db dyn Db, mut f: impl FnMut(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/method.rs:86
↓ 5 callersMethodmap
(self, mut f: impl FnMut(CallableType<'db>) -> CallableType<'db>)
crates/ty_python_semantic/src/types/callable.rs:1161
↓ 5 callersMethodmap_with_boundness_and_qualifiers
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, mut transform_fn: impl
crates/ty_python_semantic/src/types/typevar.rs:2203
↓ 5 callersFunctionmapping_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:80
↓ 5 callersFunctionmatch_call
Match that the given expression is `func(x, y, z, ...)`.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:377
↓ 5 callersMethodmatched_subject_type
Return the type established when `pattern` matches `subject_ty`. This analysis is independent of binding inference. In particular, every `or`-pattern
crates/ty_python_semantic/src/types/narrow.rs:2327
↓ 5 callersFunctionmax_parallelism
()
crates/ruff_db/src/lib.rs:105
↓ 5 callersMethodmaximum
Returns the maximum length of this tuple, if any.
crates/ty_python_semantic/src/types/tuple.rs:73
↓ 5 callersFunctionmay_exist_at_runtime
(db: &'db dyn Db, definition: Definition<'db>)
crates/ty_python_semantic/src/types.rs:302
↓ 5 callersMethodmay_match
Returns whether `source` may contain the configured identifier or keyword. Identifier matchers conservatively return `true` if the source changes und
crates/ruff_python_trivia/src/name_matcher.rs:48
↓ 5 callersMethodmay_share_type_identity
Returns `false` if `self` and `other` cannot have the same [`TypeIdentity`]. A `true` result is only a candidate match and must be confirmed with [`T
crates/ty_python_semantic/src/types/cyclic.rs:66
↓ 5 callersMethodmerge
(self, other: Self)
crates/ruff_python_ast/src/helpers.rs:65
↓ 5 callersMethodmerge
(&self, types: &[Type<'db>])
crates/ty_python_semantic/src/types/call/ambiguous.rs:59
↓ 5 callersMethodmessage
(&self)
crates/ty_ide/src/hints.rs:17
↓ 5 callersFunctionmethod
Check a method for unused arguments.
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:320
↓ 5 callersMethodmissing_node_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:343
↓ 5 callersMethodmost_flat
Returns the least expanded variant # Panics When the number of variants is less than two.
crates/ruff_formatter/src/format_element.rs:376
↓ 5 callersMethodmro_no_object_fallback
Exclude attributes defined on `object` when looking up attributes.
crates/ty_python_semantic/src/types.rs:1413
↓ 5 callersMethodname
Name of the parameter (if it has one).
crates/ty_python_semantic/src/types/signatures.rs:6455
↓ 5 callersMethodname
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:567
↓ 5 callersMethodnarrow
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, base_type: Type<'db>,
crates/ty_python_semantic/src/types/narrow.rs:5730
↓ 5 callersFunctionnearest_enclosing_function
Returns the type of the nearest enclosing function for the given scope. This function walks up the ancestor scopes starting from the given scope, and
crates/ty_python_semantic/src/types/infer.rs:968
↓ 5 callersMethodnext
(self, end_position: TextSize)
crates/ruff_python_formatter/src/builders.rs:109
↓ 5 callersMethodnext
Move to the next parameter in both the `source` and `target` parameter iterators, [`None`] if both iterators are exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3116
↓ 5 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:430
↓ 5 callersMethodnominal_origin_instance
Returns the nominal instance of a protocol's origin without asserting nominal subtyping.
crates/ty_python_semantic/src/types/instance.rs:1751
↓ 5 callersMethodnotebook_document
Returns the LSP [`NotebookDocument`] corresponding to `File` or `None` if the file isn't open in the editor or if it isn't a notebook.
crates/ty_server/src/db.rs:16
↓ 5 callersMethodnotebook_index
(&self, file: &UnifiedFile)
crates/ruff_db/src/diagnostic/render.rs:756
↓ 5 callersFunctionnotebook_path
Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory.
crates/ruff_notebook/src/notebook.rs:518
↓ 5 callersMethodoffset
(&self)
crates/ruff_python_parser/src/lexer.rs:1390
↓ 5 callersMethodopen
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:226
↓ 5 callersFunctionoptional_parentheses
Wraps an expression in parentheses only if it still does not fit after expanding all expressions that start or end with a parentheses (`()`, `[]`, `{}
crates/ruff_python_formatter/src/expression/parentheses.rs:201
↓ 5 callersMethodoptions_in_precedence_order
Returns project or script option layers from highest to lowest precedence. `options` is the raw project or script configuration, and `uv_options` is
crates/ty_project/src/metadata.rs:482
↓ 5 callersMethodordering
Defines the ordering of the variables in a constraint set BDD. If we only care about _correctness_, we can choose any ordering that we want, as long
crates/ty_python_semantic/src/types/constraints.rs:2208
↓ 5 callersMethodoverlaps_with
Returns whether this support contains any type variables in common with `other`.
crates/ty_python_semantic/src/types/constraints/support.rs:109
↓ 5 callersMethodown_tuple_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types/instance.rs:337
↓ 5 callersFunctionpad_end
Like [`pad_expression`], but only pads the end of the expression.
crates/ruff_linter/src/rules/flake8_comprehensions/fixes.rs:375
↓ 5 callersMethodparameter_types
Returns the bound types for each parameter, in parameter source order, or `None` if no argument was matched to that parameter.
crates/ty_python_semantic/src/types/call/bind.rs:9429
↓ 5 callersMethodparameters
The identities of this definition's formal parameters, in declaration order.
crates/ty_python_semantic/src/types/cyclic.rs:328
↓ 5 callersFunctionparentheses_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 callersMethodparenthesized
Returns the indexed parenthesized expression ranges.
crates/ruff_python_trivia/src/comment_ranges.rs:37
↓ 5 callersMethodparse_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 callersFunctionparsed_string_annotation
( source: &str, string: &StringLiteral, )
crates/ruff_db/src/parsed.rs:73
↓ 5 callersMethodpath_metadata
(&self, path: &SystemPath)
crates/ruff_db/src/system/os.rs:72
↓ 5 callersFunctionplace_by_id
( db: &'db dyn Db, scope: ScopeId<'db>, place_id: ScopedPlaceId, requires_explicit_reexport: R
crates/ty_python_semantic/src/place.rs:1302
↓ 5 callersMethodplaces
(&self)
crates/ty_python_semantic/src/types/narrow.rs:3497
↓ 5 callersMethodpop_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 callersMethodposition
(&self, node: AnyNodeRef<'_>)
crates/ruff_python_formatter/src/comments/mod.rs:527
↓ 5 callersMethodpossible_key
(&self, node: impl Into<AnyNodeRef<'a>>)
crates/ruff_python_formatter/src/comments/mod.rs:272
↓ 5 callersMethodpreceded_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 callersMethodpreceded_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 callersMethodprefix
Returns the module name prefix, or `None` before the first component.
crates/ty_module_resolver/src/resolve/search.rs:389
↓ 5 callersMethodprepare_calls
(&self)
crates/ty_ide/src/call_hierarchy.rs:200
↓ 5 callersMethodprogram
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:34
↓ 5 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/display.rs:687
↓ 5 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/cyclic.rs:656
↓ 5 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/typevar.rs:988
↓ 5 callersFunctionpublish_diagnostics_for_document
( snapshot: &DocumentSnapshot, client: &Client, )
crates/ruff_server/src/server/api/diagnostics.rs:24
↓ 5 callersMethodpush
(&mut self, section_id: SectionId)
crates/mdtest/src/parser.rs:468
↓ 5 callersMethodpush_continuation
(&mut self, line: &'a str)
crates/ty_ide/src/docstring/document.rs:196
↓ 5 callersMethodputc
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 callersMethodqualified_name
Returns the qualified name of this class.
crates/ty_python_semantic/src/types/class.rs:973
↓ 5 callersMethodqualifiers
(&self)
crates/ty_python_semantic/src/place.rs:895
↓ 5 callersMethodqualifiers
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:2071
↓ 5 callersMethodrange
(&self)
crates/ruff_python_formatter/src/string/normalize.rs:646
↓ 5 callersMethodrange
Returns a tuple with the token's `(start, end)` locations
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:287
↓ 5 callersMethodrank
(&self, index: usize)
crates/ty_python_core/src/rank.rs:89
↓ 5 callersMethodraw_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:298
↓ 5 callersMethodread_directory
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/memory_fs.rs:376
↓ 5 callersMethodreadlines
(self)
crates/ruff_linter/resources/test/fixtures/refurb/FURB129.py:71
↓ 5 callersMethodrecord
(visit: &mut dyn Visit)
crates/ruff_options_metadata/src/lib.rs:41
↓ 5 callersMethodrecord_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 callersMethodrecord_exception_checkpoint_if
(&mut self, can_raise: bool)
crates/ty_python_core/src/builder.rs:2482
↓ 5 callersMethodrecord_negated_reachability_constraint
Record the negation of a given reachability constraint.
crates/ty_python_core/src/builder.rs:2622
↓ 5 callersMethodrelative_path
Return the file's path relative to the current working directory.
crates/ruff_db/src/diagnostic/mod.rs:1190
↓ 5 callersFunctionrelativize_path
Convert an absolute path to be relative to the current working directory.
crates/ruff_linter/src/fs.rs:46
↓ 5 callersMethodremove
(self)
crates/ruff_linter/resources/test/fixtures/flake8_pie/PIE794.py:6
← previousnext →2,801–2,900 of 31,562, ranked by callers