MCPcopy Create free account

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

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

↓ 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:3150
↓ 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:448
↓ 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 callersMethodnormalize
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:57
↓ 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_type_form
(db: &dyn Db)
crates/ty_python_semantic/src/types.rs:2436
↓ 3 callersMethodoffset
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:158
↓ 3 callersMethodoffset
(&self)
crates/ruff_linter/src/suppression.rs:1374
↓ 3 callersMethodopenDocument
( name: string, content: string, handle: FileHandle | null, )
playground/ty/src/Playground.tsx:691
↓ 3 callersMethodoptions
(&self)
crates/ty_project/src/metadata.rs:397
↓ 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:220
↓ 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:560
↓ 3 callersMethodparameter
(self)
crates/ty_python_core/src/definition.rs:596
↓ 3 callersMethodparameter_definition
(&'db self, parameter_name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3537
↓ 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:2248
↓ 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:1227
↓ 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:2534
↓ 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:151
↓ 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
↓ 3 callersMethodpeek
Returns the next non-trivia token without consuming it. Use [`peek2`] to get the next two tokens. [`peek2`]: TokenSource::peek2
crates/ruff_python_parser/src/token_source.rs:142
↓ 3 callersFunctionplace_from_declarations_impl
Implementation of [`place_from_declarations`]. ## Implementation Note This function gets called cross-module. It, therefore, shouldn't access any AST
crates/ty_python_semantic/src/place.rs:2262
↓ 3 callersFunctionplace_value_type
Uses surviving bindings' assigned values when lookup returns a declared or widened type.
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:285
↓ 3 callersMethodpop
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:5096
↓ 3 callersMethodpop_assignment
(&mut self)
crates/ty_python_core/src/builder.rs:2637
↓ 3 callersMethodpop_scope
Pop the current [`Scope`] off the stack.
crates/ruff_python_semantic/src/model.rs:1429
↓ 3 callersMethodpositional
Create a [`CallArguments`] from an iterator over non-variadic positional argument types.
crates/ty_python_semantic/src/types/call/arguments.rs:682
↓ 3 callersMethodpreceding_import
Return the import statement that precedes the given position, if any.
crates/ruff_linter/src/importer/mod.rs:534
↓ 3 callersFunctionpredicate_scope
(db: &'db dyn Db, predicate: &Predicate<'db>)
crates/ty_python_semantic/src/reachability.rs:598
↓ 3 callersFunctionprefer_collection_literal_peer_context
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:13164
↓ 3 callersMethodpreferred_quote
Return the preferred quote for a generated `StringLiteral` node, given where we are in the AST.
crates/ruff_linter/src/checkers/ast/mod.rs:385
↓ 3 callersMethodprefix_and_code
(&self)
crates/ruff_linter/src/rule_selector.rs:227
↓ 3 callersMethodpretty
(self)
scripts/publish-crates.py:68
↓ 3 callersMethodprint
Prints the passed in element as well as all its content
crates/ruff_formatter/src/printer/mod.rs:51
↓ 3 callersMethodprint_entry
Fully print an element (print the element itself and all its descendants) Unlike [`print_element`], this function ensures the entire element has been
crates/ruff_formatter/src/printer/mod.rs:785
↓ 3 callersMethodprogram_settings
(&self)
crates/ty_python_semantic/src/db.rs:168
↓ 3 callersFunctionprogram_version
Returns the version of the executing program if set.
crates/ruff_db/src/lib.rs:55
↓ 3 callersMethodprogress_target
Return the [`ProgressDrawTarget`] for this printer.
crates/ty/src/printer.rs:23
↓ 3 callersMethodproject
Projects one constraint node into the graph for this place.
crates/ty_python_semantic/src/reachability.rs:1473
↓ 3 callersMethodproject_db
Returns a reference to the project's [`ProjectDatabase`] in which the given `path` belongs. If the path is a system path, it will return the project
crates/ty_server/src/session.rs:478
↓ 3 callersFunctionproject_root
()
crates/ruff_python_parser/tests/generate_inline_tests.rs:16
↓ 3 callersMethodproject_state_for_document
Selects a project to use for analysis of the given document (identified by path). When the given document path is a system path, we select the projec
crates/ty_server/src/session.rs:530
↓ 3 callersMethodproject_sync_path
The directory whose uv project metadata needs refreshing, if any. This may be an ancestor of the previous project root if that directory was deleted.
crates/ty_project/src/db/changes.rs:32
↓ 3 callersMethodpromote_singletons
Promote a top-level singleton type (like `None`, `EllipsisType`) to `T | Unknown`.
crates/ty_python_semantic/src/types.rs:3767
↓ 3 callersFunctionprotocol_member_read_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, receiver_ty: Type<'db>, m
crates/ty_python_semantic/src/types/protocol_class.rs:2560
↓ 3 callersMethodprovides_candidate_bound
Whether this constraint provides a useful bound to the solver.
crates/ty_python_semantic/src/types/constraints/variables.rs:496
↓ 3 callersFunctionpublish_diagnostics
Publishes the diagnostics for the given document snapshot using the [publish diagnostics notification].
crates/ty_server/src/server/api/diagnostics.rs:228
↓ 3 callersFunctionpublish_settings_diagnostics
Publishes settings diagnostics for all the project at the given path using the [publish diagnostics notification]. [publish diagnostics notification]
crates/ty_server/src/server/api/diagnostics.rs:293
↓ 3 callersMethodpure_redundancy_error_context
Re-run the pure redundancy check with error context collection enabled. This should normally be called when `is_pure_redundant_with` has returned `fa
crates/ty_python_semantic/src/types/relation.rs:522
↓ 3 callersMethodpush_assignment
(&mut self, assignment: CurrentAssignment<'ast, 'db>)
crates/ty_python_core/src/builder.rs:2633
↓ 3 callersMethodpush_marker
(&mut self)
crates/ruff_formatter/src/printer/mod.rs:498
↓ 3 callersMethodpush_tag
Attaches an additional tag to this annotation.
crates/ruff_db/src/diagnostic/mod.rs:892
↓ 3 callersFunctionpy39_typeshed_test_case
(typeshed: MockedTypeshed)
crates/ty_module_resolver/src/path.rs:1266
↓ 3 callersMethodpy_source_type
(&self)
crates/ruff_linter/src/source_kind.rs:79
↓ 3 callersFunctionpytest_db_with_files
(files: &[(&'static str, &'static str)])
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1245
↓ 3 callersFunctionpytest_test_for_binding
( db: &'db dyn Db, binding: Definition<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:173
↓ 3 callersFunctionpytest_tests_in_file
( db: &'db dyn Db, file: ProgramFile<'db>, )
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:83
↓ 3 callersMethodpython_version
(&self)
crates/ty_python_core/src/builder.rs:5884
↓ 3 callersMethodpython_version
(&mut self, version: PythonVersion)
crates/ty_ide/src/lib.rs:614
↓ 3 callersMethodqueue_action
(&self, action: Action)
crates/ty_server/src/session/client.rs:256
↓ 3 callersFunctionquote_type_expression
Wrap a type expression in quotes. This function assumes that the callee already expanded expression components to the minimum acceptable range for qu
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:401
↓ 3 callersMethodrange
(&self)
crates/ruff_python_semantic/src/model.rs:3204
↓ 3 callersMethodrange
(&self)
crates/ruff_python_formatter/src/verbatim.rs:891
↓ 3 callersMethodrange
(&self)
crates/ruff_python_formatter/src/comments/map.rs:501
↓ 3 callersMethodrange
(&self)
crates/ruff_text_size/src/traits.rs:57
↓ 3 callersMethodrange
(&self, module: &ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1659
↓ 3 callersMethodrange
(&self)
crates/mdtest/src/parser.rs:234
↓ 3 callersMethodrange
(&self)
crates/ty_ide/src/goto.rs:1337
↓ 3 callersMethodrange
Returns the section's source range.
crates/ty_ide/src/docstring/document.rs:73
↓ 3 callersMethodrange
(&self)
crates/ty_ide/src/docstring/markdown/structured.rs:203
↓ 3 callersMethodrange
(&self)
crates/ruff_linter/src/docstrings/mod.rs:88
← previousnext →4,401–4,500 of 31,562, ranked by callers