MCPcopy Create free account

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

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

↓ 3 callersMethodmark_nonlocal
(&mut self)
crates/ty_python_core/src/symbol.rs:139
↓ 3 callersMethodmark_place_bound
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1393
↓ 3 callersMethodmark_place_declared
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1398
↓ 3 callersMethodmark_support_used
(&mut self, _storage: &mut ConstraintSetStorage<'_>, support: SupportId)
crates/ty_python_semantic/src/types/constraints/owned.rs:79
↓ 3 callersFunctionmask
(kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:33
↓ 3 callersFunctionmatch_function_def
( statement: &'a mut Statement<'b>, )
crates/ruff_linter/src/cst/matchers.rs:179
↓ 3 callersFunctionmatch_head
Return the [`ast::ExprName`] at the head of the expression, if any.
crates/ruff_linter/src/rules/airflow/helpers.rs:207
↓ 3 callersFunctionmatch_open_mode
Match open mode to see if it is supported.
crates/ruff_linter/src/rules/refurb/helpers.rs:408
↓ 3 callersMethodmatches
(&self, candidate: &str)
crates/ruff_linter/src/settings/types.rs:684
↓ 3 callersFunctionmatches_password_name
(string: &str)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:18
↓ 3 callersMethodmaterialize
Apply a generator's materialization with the variance of each operation.
crates/ty_python_semantic/src/types.rs:2418
↓ 3 callersMethodmaterialize_reachability
( &self, pending: &'a mut PendingPlaceState, target: PendingReachabilityId, re
crates/ty_python_core/src/use_def.rs:1863
↓ 3 callersMethodmaterialized
(self, kind: MaterializationKind)
crates/ty_python_semantic/src/types.rs:11975
↓ 3 callersMethodmay_be_false
(self)
crates/ty_python_core/src/lib.rs:1009
↓ 3 callersMethodmay_have_unbounded_specialization
Whether revisiting this constructor can keep changing its type arguments.
crates/ty_python_semantic/src/types/cyclic.rs:140
↓ 3 callersFunctionmaybe_anonymized
(renderer: &Renderer, line_num: usize, max_line_num_len: usize)
crates/ruff_annotate_snippets/src/renderer/render.rs:2289
↓ 3 callersFunctionmdtest_rule_selection
(rules: Option<&Rules>, required_rule: Option<&str>)
crates/ty_test/src/db.rs:375
↓ 3 callersMethodmeasure_mode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:46
↓ 3 callersMethodmember
(&self, id: ScopedMemberId)
crates/ty_python_core/src/place.rs:282
↓ 3 callersFunctionmember_contract
Resolve an owner's declaration as seen through the receiver being checked. Keep the owner's generic specialization, but bind `Self` and descriptor ac
crates/ty_python_semantic/src/types/overrides/attributes.rs:138
↓ 3 callersMethodmember_count
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/protocol_class.rs:503
↓ 3 callersMethodmember_name
For example, given `import foo`, returns `"foo"`.
crates/ruff_python_semantic/src/binding.rs:763
↓ 3 callersMethodmerge
Merges the quotes metadata of different literals. ## Raw and triple quoted strings Merging raw and triple quoted strings is only correct if all liter
crates/ruff_python_formatter/src/string/normalize.rs:370
↓ 3 callersMethodmerge
(&mut self, other: Self)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:484
↓ 3 callersFunctionmerge_constraints_and
Merge constraints with AND semantics (intersection/conjunction). When we have `constraint1 & constraint2`, we need to distribute AND over the OR in t
crates/ty_python_semantic/src/types/narrow.rs:1432
↓ 3 callersMethodmetaclass_instance_type
Return a type representing "the set of all instances of the metaclass of this class".
crates/ty_python_semantic/src/types/class.rs:864
↓ 3 callersFunctionmethod_override_types
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, subclass_type: Type<'db>, superclass_type: T
crates/ty_python_semantic/src/types/overrides.rs:1608
↓ 3 callersMethodmethod_shadowing_contract
Return a type that represents the "contract" that a callable must satisfy when attempting to shadow a method on an instance. For example: ```python c
crates/ty_python_semantic/src/types/callable.rs:128
↓ 3 callersMethodmiddle_token
(self)
crates/ruff_python_parser/src/string.rs:58
↓ 3 callersMethodmodify_with_manual_index
A private function for overriding how we update the line index by default.
crates/ruff_server/src/edit/text_document.rs:149
↓ 3 callersMethodmodule
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1437
↓ 3 callersMethodmodule_dependency_kind
(mut self, kind: ModuleDependencyKind)
crates/ty_ide/src/completion.rs:638
↓ 3 callersMethodmodule_type_from_name
(&self, module_name: &ModuleName)
crates/ty_python_semantic/src/types/infer/builder.rs:5724
↓ 3 callersMethodmultiline_ranges
Returns the byte offset ranges of multiline strings.
crates/ruff_python_index/src/indexer.rs:116
↓ 3 callersMethodname
(&self)
crates/ruff_dev/src/generate_ty_options.rs:125
↓ 3 callersMethodname
(&self)
crates/mdtest/src/parser.rs:143
↓ 3 callersMethodname_matches
(&self, expr: &Expr)
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:88
↓ 3 callersMethodnarrow_targets
If the expected type is a union, returns the target elements that it can be narrowed to.
crates/ty_python_semantic/src/types/infer/type_context.rs:138
↓ 3 callersMethodnarrowing_constraints
(&self)
crates/ty_python_core/src/use_def.rs:1616
↓ 3 callersFunctionnecessary_match_pattern_type
Return a type that contains every value that can match `pattern`. For example, given: ```python def f(x: list[object]): match x: case [int(real=0)]:
crates/ty_python_semantic/src/types/narrow.rs:1574
↓ 3 callersMethodneeds_self_mapping
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, parameters: &[Paramet
crates/ty_python_semantic/src/types/signatures.rs:2336
↓ 3 callersMethodnegate
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:3453
↓ 3 callersFunctionnested_class_instance_override
Return a receiver annotation that redeclares an inherited nested class as instance storage. Class objects use receiver annotations declared on their m
crates/ty_python_semantic/src/types/attribute_write.rs:570
↓ 3 callersFunctionnested_workspace_server
Creates a test server for the following temporary workspace: ```text <temp_dir>/ ├── .ruff.toml # exclude or extend-exclude = ["sub"] ├─
crates/ruff_server/tests/e2e/workspace.rs:247
↓ 3 callersMethodnew
(file: File, range: TextRange)
crates/ruff_db/src/files.rs:679
↓ 3 callersMethodnext
(&mut self)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:726
↓ 3 callersMethodnext
(&mut self)
crates/ty_module_resolver/src/resolve.rs:1215
↓ 3 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/verbatim.rs:576
↓ 3 callersMethodnext
(&mut self)
crates/ty_python_core/src/member.rs:807
↓ 3 callersMethodnext
(&mut self)
crates/ruff_unicode_names2/src/lib.rs:138
↓ 3 callersMethodnext
(&mut self)
crates/ruff_linter/src/docstrings/sections.rs:273
↓ 3 callersFunctionnext_auto_value
Compute the next auto-assigned value based on the previous member's value. Used for dict-form and tuple/list-form functional enums where `auto()` val
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:192
↓ 3 callersMethodnext_back
(&mut self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:256
↓ 3 callersMethodnext_byte
(&mut self)
crates/ruff_python_parser/src/string.rs:137
↓ 3 callersMethodnext_char
(&mut self)
crates/ruff_python_parser/src/string.rs:145
↓ 3 callersMethodnext_definition_id
(&self)
crates/ty_python_core/src/use_def.rs:2355
↓ 3 callersMethodnext_target
Move to the next parameter in the `target` parameter iterator, [`None`] if the iterator is exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3191
↓ 3 callersMethodnode
Returns an interior projected node by ID.
crates/ty_python_semantic/src/reachability.rs:1101
↓ 3 callersMethodnode_index
(&self)
crates/ruff_python_ast/src/generated.rs:37
↓ 3 callersMethodnode_is_satisfiable_on_path
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/solutions.rs:471
↓ 3 callersFunctionnon_posonly_non_variadic_parameters
Returns an iterator over the non-positional-only, non-variadic parameters of a function.
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:210
↓ 3 callersFunctionnormalize_newlines
(contents: &str)
crates/ruff_python_ast/src/comparable.rs:808
↓ 3 callersFunctionnormalize_word
Normalize a word by removing all non-alphanumeric characters and converting it to lowercase.
crates/ruff_linter/src/rules/pydocstyle/helpers.rs:35
↓ 3 callersMethodnormalized_elements
Coalesce adjacent literals so that part boundaries do not affect comparison. For example, `f"{foo!r} one" " and two " f" and three {bar!s}"` decompose
crates/ruff_python_ast/src/comparable.rs:646
↓ 3 callersFunctionnot_broken
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B901.py:16
↓ 3 callersFunctionnot_found
()
crates/ruff_db/src/system/memory_fs.rs:468
↓ 3 callersMethodnotebook
(&self)
crates/ty_server/src/document/text_document.rs:89
↓ 3 callersMethodnum_blocks
Number of basic blocks, or nodes, in the graph
crates/ruff_python_semantic/src/cfg/graph.rs:36
↓ 3 callersFunctionobject_member_names
(db: &'db dyn Db, program: Program<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:3579
↓ 3 callersFunctionobject_type_form
(db: &dyn Db)
crates/ty_python_semantic/src/types.rs:2435
↓ 3 callersMethodoffset
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:158
↓ 3 callersMethodoffset
(&self)
crates/ruff_linter/src/suppression.rs:1373
↓ 3 callersMethodopenDocument
( name: string, content: string, handle: FileHandle | null, )
playground/ty/src/Playground.tsx:691
↓ 3 callersMethodoptions
(&self)
crates/ruff_formatter/src/printer/mod.rs:1555
↓ 3 callersMethodoutgoing
Returns the [`Edges`] going out of the basic block at the given index
crates/ruff_python_semantic/src/cfg/graph.rs:51
↓ 3 callersMethodoverload_return_type_or_unknown
Returns the union of all overload return types, or `Unknown` if there are no overloads.
crates/ty_python_semantic/src/types/signatures.rs:199
↓ 3 callersMethodown_class_member
Look up a class-level member defined directly on this class (not inherited). This only checks synthesized members and field properties, without falli
crates/ty_python_semantic/src/types/class/named_tuple.rs:359
↓ 3 callersMethodowned_elements
(self)
crates/ty_python_semantic/src/types/tuple.rs:991
↓ 3 callersMethodpackage
The [`Path`] to the package containing the current file.
crates/ruff_linter/src/checkers/ast/mod.rs:565
↓ 3 callersMethodparameter
(self)
crates/ty_python_core/src/definition.rs:596
↓ 3 callersFunctionparameters_have_defaults
(parameters: &ast::Parameters)
crates/ty_python_semantic/src/types/infer/builder/function.rs:73
↓ 3 callersFunctionparamspec_signature
( db: &'db TestDb, parameter: Type<'db>, local_typevar: Option<BoundTypeVarInstance<'d
crates/ty_python_semantic/src/types/constraints/sequents.rs:2250
↓ 3 callersMethodparent_scope_id
Returns the id of the parent scope.
crates/ty_python_core/src/lib.rs:546
↓ 3 callersMethodparents
Iterate over the "root" expressions of the place (e.g. `x.y.z`, `x.y`, `x` for `x.y.z[0]`). Note, this iterator may skip some parents if they are not
crates/ty_python_core/src/place.rs:220
↓ 3 callersMethodparse
Parses a match arm such as `(Pycodestyle, "E112") => rules::pycodestyle::rules::logical_lines::NoIndentedBlock,`
crates/ruff_macros/src/map_codes.rs:521
↓ 3 callersFunctionparse_cells_unchecked
Parses each `range` of `source` as an independent module and concatenates the results into a single [`Parsed<ModModule>`] whose nodes keep their offse
crates/ruff_python_parser/src/lib.rs:318
↓ 3 callersMethodparse_comment
(&mut self)
crates/ruff_linter/src/suppression.rs:1226
↓ 3 callersMethodparse_escaped_char
Parse an escaped character, returning the new character.
crates/ruff_python_parser/src/string.rs:235
↓ 3 callersMethodparse_expression_with_bitwise_or_precedence
Parses an expression with a minimum precedence of bitwise `or`. This methods actually parses the expression using the `expression` rule of the [Pytho
crates/ruff_python_parser/src/parser/expression.rs:434
↓ 3 callersMethodparse_function_definition
Parses a function definition. The given `start` offset is the start of either of the following: - `def` token - `async` token if it's an asynchronous
crates/ruff_python_parser/src/parser/statement.rs:2011
↓ 3 callersMethodparse_identifier_with_context
(&mut self, context: ExpressionContext)
crates/ruff_python_parser/src/parser/expression.rs:505
↓ 3 callersFunctionparse_key
(src: str, pos: Pos)
crates/ruff_benchmark/resources/tomllib/_parser.py:373
↓ 3 callersMethodparse_match_pattern_lhs
Parses a pattern. See: <https://docs.python.org/3/reference/compound_stmts.html#grammar-token-python-grammar-closed_pattern>
crates/ruff_python_parser/src/parser/pattern.rs:143
↓ 3 callersMethodparse_name
Parses a name. For an invalid name, the `id` field will be an empty string and the `ctx` field will be [`ExprContext::Invalid`]. See: <https://docs.
crates/ruff_python_parser/src/parser/expression.rs:468
↓ 3 callersMethodparse_simple_expression
Parses every Python expression except unparenthesized tuples, named expressions, and `if` expression. This is a combination of the `disjunction`, `st
crates/ruff_python_parser/src/parser/expression.rs:238
↓ 3 callersMethodparse_subscription_of_annotated_special_form
Infer the contents of `Annotated[T, metadata, ...]` for value, type, and annotation expressions. The first argument supplies the type and any annotati
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:2528
↓ 3 callersMethodparse_tuple_expression
Parses multiple items separated by a comma into a tuple expression. Uses the `parse_func` to parse each item in the tuple.
crates/ruff_python_parser/src/parser/expression.rs:2366
↓ 3 callersMethodpatch_config
Temporarily patch the Ruff configuration file in the given directory.
python/ruff-ecosystem/ruff_ecosystem/projects.py:187
↓ 3 callersFunctionpattern_fallthrough_type
Return the part of `subject_ty` that can reach a later alternative after `kind` fails. Value patterns use Python equality. Reusing the equality const
crates/ty_python_semantic/src/types/match_pattern.rs:911
↓ 3 callersFunctionpattern_to_expr
Convert the given [`Pattern`] to an [`Expr`]. This is used to convert an invalid use of pattern to their equivalent expression to preserve the struct
crates/ruff_python_parser/src/parser/recovery.rs:28
← previousnext →4,401–4,500 of 31,766, ranked by callers