MCPcopy Create free account

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

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

↓ 1 callersMethodplace_access_can_raise
Returns whether accessing a name, attribute, or subscript can raise. Only a definitely bound name in the current flow state is known to be safe. In p
crates/ty_python_core/src/builder.rs:2492
↓ 1 callersFunctionplace_comment
Manually attach comments to nodes that the default placement gets wrong.
crates/ruff_python_formatter/src/comments/placement.rs:23
↓ 1 callersMethodplace_expr_prefix_loads
Describes how to evaluate the tracked prefixes of `place_expr` in this scope.
crates/ty_python_semantic/src/place_load.rs:1256
↓ 1 callersFunctionplace_from_declarations_with_reachability_cache
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, declarations: DeclarationsIterator<'_, 'db>,
crates/ty_python_semantic/src/place.rs:864
↓ 1 callersMethodplace_id_by_instance_attribute_name
(&self, name: &str)
crates/ty_python_core/src/member.rs:579
↓ 1 callersFunctionplace_keywords
Tries to place every keyword of this length alongside the shorter keywords.
crates/ruff_python_parser/src/lexer/keywords.rs:131
↓ 1 callersMethodplace_name
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:12818
↓ 1 callersMethodplace_use
(&self, expr: ast::ExprRef<'_>)
crates/ty_python_core/src/ast_ids.rs:227
↓ 1 callersFunctionpointless_async_iterable
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B023.py:34
↓ 1 callersMethodpoll_uv_sync
Gives one project's uv environments an opportunity to make progress.
crates/ty_server/src/session.rs:289
↓ 1 callersMethodpop
(&mut self)
crates/mdtest/src/parser.rs:472
↓ 1 callersMethodpop_definition
Pop the current [`Member`] off the stack.
crates/ruff_python_semantic/src/model.rs:1441
↓ 1 callersMethodpop_loop
Pop a loop, replacing with the previous saved outer loop, if any.
crates/ty_python_core/src/builder.rs:501
↓ 1 callersMethodpop_sections_to_level
(&mut self, level: usize)
crates/mdtest/src/parser.rs:1055
↓ 1 callersMethodpop_statement
(&mut self)
crates/ty_python_core/src/builder.rs:2654
↓ 1 callersMethodpop_symbol
(&mut self)
crates/ty_ide/src/symbols.rs:1223
↓ 1 callersMethodpop_try_context
Removes the current `try` context after its handlers have been deactivated.
crates/ty_python_core/src/builder/except_handlers.rs:99
↓ 1 callersMethodpopulate_all_reexports
Populate `self.all_reexports` with indices into `self.reexport` for all symbols that are a re-export of `self.origin[origin_index]`. This includes the
crates/ty_ide/src/all_symbols.rs:477
↓ 1 callersMethodpopulate_loop_header
Build a `LoopHeader` that tracks all the variables bound in a loop, which will be visible to uses in the same loop via "loop header definitions". We c
crates/ty_python_core/src/builder.rs:1880
↓ 1 callersMethodposition
Creates a new buffer snapshot that points to the specified position.
crates/ruff_formatter/src/buffer.rs:95
↓ 1 callersMethodpositional_or_keyword_to_keyword_only
Rewrites a positional-or-keyword parameter as keyword-only while preserving its metadata.
crates/ty_python_semantic/src/types/signatures.rs:6504
↓ 1 callersMethodpositive_step
(self, step: NonZeroI32)
crates/ty_python_semantic/src/types/tuple.rs:1527
↓ 1 callersFunctionpossible_class_attribute_descriptor
Recover the concrete descriptor hidden by an uncertain metaclass-member annotation. The declared type describes the descriptor object, not the values
crates/ty_python_semantic/src/types/attribute_write.rs:723
↓ 1 callersFunctionpossibly_reversed_intersection
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, reversed: bool, left: Type<'db>, right:
crates/ty_python_semantic/src/types/constraints/sequents.rs:1400
↓ 1 callersFunctionpossibly_reversed_union
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, reversed: bool, left: Type<'db>, right:
crates/ty_python_semantic/src/types/constraints/sequents.rs:1414
↓ 1 callersFunctionpost_init_default
RUF033
crates/ruff_linter/src/rules/ruff/rules/post_init_default.rs:96
↓ 1 callersFunctionpotential_index_error
PLE0643
crates/ruff_linter/src/rules/pylint/rules/potential_index_error.rs:34
↓ 1 callersFunctionpre_process
( groups: &'a [Group<'a>], )
crates/ruff_annotate_snippets/src/renderer/render.rs:2727
↓ 1 callersMethodprecedence
Return the [`OperatorPrecedence`] of this expression
crates/ruff_python_ast/src/nodes.rs:100
↓ 1 callersMethodprecedence
Returns the [`OperatorPrecedence`] for the given operator token or [None] if the token isn't an operator token.
crates/ruff_python_parser/src/parser/expression.rs:3103
↓ 1 callersFunctionpreceding_clause_info
Returns the end offset of the clause preceding `finally` and the last statement in that clause's body (used for comment indentation checks)
crates/ruff_linter/src/rules/ruff/rules/useless_finally.rs:160
↓ 1 callersMethodpreceding_type_checking_block
Return the `TYPE_CHECKING` block that precedes the given position, if any.
crates/ruff_linter/src/importer/mod.rs:542
↓ 1 callersMethodpredicate_constraints
Returns the cached positive and negative narrowing constraints for a predicate.
crates/ty_python_semantic/src/reachability.rs:1287
↓ 1 callersFunctionpredicate_contains_special_cased_condition
( db: &'db dyn Db, scope: ScopeId<'db>, predicate: ScopedPredicateId, )
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:865
↓ 1 callersMethodpredicate_kind
(&mut self, pattern: &ast::Pattern)
crates/ty_python_core/src/builder.rs:2712
↓ 1 callersMethodpreferred_constraint
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, has_lower_bound_evide
crates/ty_python_semantic/src/types/constraints/solutions.rs:2063
↓ 1 callersFunctionpreferred_markup_kind
Returns the preferred markup kind, derived from preference list.
crates/ty_server/src/capabilities.rs:86
↓ 1 callersMethodprefers_markdown_in_completion
Returns `true` if the client prefers Markdown over plain text in completion items.
crates/ty_server/src/capabilities.rs:207
↓ 1 callersMethodprefers_markdown_in_hover
Returns `true` if the client prefers markdown in hover responses.
crates/ty_server/src/capabilities.rs:139
↓ 1 callersFunctionprefixWithRuffToml
(settings: object)
playground/ruff/src/Editor/SettingsEditor.tsx:153
↓ 1 callersMethodprefix_str
The docstring's prefixes as they exist in the original source code.
crates/ruff_linter/src/docstrings/mod.rs:66
↓ 1 callersFunctionprefix_type_params
PYI001
crates/ruff_linter/src/rules/flake8_pyi/rules/prefix_type_params.rs:64
↓ 1 callersMethodprenormalized_prefix_elements
Returns the prefix of the prenormalization of this tuple. This is used in our subtyping and equivalence checks below to handle different tuple types
crates/ty_python_semantic/src/types/tuple.rs:2127
↓ 1 callersMethodprenormalized_suffix_elements
Returns the suffix of the prenormalization of this tuple. This is used in our subtyping and equivalence checks below to handle different tuple types
crates/ty_python_semantic/src/types/tuple.rs:2163
↓ 1 callersMethodprepare
Prepares a fresh case for the selected mode. Call once before measuring a request.
crates/ruff_benchmark/benches/ty_ide.rs:349
↓ 1 callersMethodprepare
Prepares us to render the next line by buffering the separator required to delineate it from the previous line.
crates/ty_ide/src/docstring/markdown/general.rs:416
↓ 1 callersMethodprepare_for_partial_application
Prepare these overloads for constructing `functools.partial(...)`. Partial application intentionally leaves some parameters unbound, so we still want
crates/ty_python_semantic/src/types/call/bind.rs:3697
↓ 1 callersFunctionprepare_implementations_finder_for_goto_target
Select and prepare the appropriate `ImplementationsFinder` for `goto_target`.
crates/ty_ide/src/goto_implementation.rs:127
↓ 1 callersMethodprepare_line
(&mut self, first_line: bool)
crates/ty_ide/src/docstring/markdown/general.rs:295
↓ 1 callersFunctionprepare_rename
Converts an LSP rename request into our internal representation of the same.
crates/ty_server/src/server/api/requests/will_rename_files.rs:71
↓ 1 callersMethodprepare_typed_dict_constructor
Prepare a `TypedDict` constructor call before general argument inference. This gives constructor values the declared field type as context, then vali
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:566
↓ 1 callersMethodprepend_info
Adds an "info" sub-diagnostic before any existing sub-diagnostics.
crates/ruff_db/src/diagnostic/mod.rs:179
↓ 1 callersMethodpreserves_lazy_signatures
Returns `true` if this mapping should leave unevaluated function signatures unchanged.
crates/ty_python_semantic/src/types/generics.rs:2340
↓ 1 callersMethodpretty
(&'a self, db: &'a dyn Db)
crates/ty_project/src/metadata/options.rs:2384
↓ 1 callersFunctionpretty_comments
Public function for generating a printable string of the debug comments.
crates/ruff_python_formatter/src/lib.rs:209
↓ 1 callersMethodprevious_kind
Returns the last consumed non-trivia token kind.
crates/ruff_python_parser/src/token_source.rs:46
↓ 1 callersMethodprevious_line
Returns the text of the last line of the previous section or an empty string if it is the first section.
crates/ruff_linter/src/docstrings/sections.rs:395
↓ 1 callersMethodprevious_overload_in_chain
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:474
↓ 1 callersFunctionprimary_key_member
Synthesize `id` and `pk` attributes for Django models. Without an explicit primary key, both `id` and `pk` have type `int`: ```py class Book(models.M
crates/ty_python_semantic/src/types/dedicated/django.rs:263
↓ 1 callersMethodprint_best_fitting
( &mut self, variants: &'a BestFittingVariants, mode: BestFittingMode, queue:
crates/ruff_formatter/src/printer/mod.rs:549
↓ 1 callersFunctionprint_call
T201, T203
crates/ruff_linter/src/rules/flake8_print/rules/print_call.rs:125
↓ 1 callersFunctionprint_config
(**context)
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:35
↓ 1 callersFunctionprint_config_with_get_current_context
()
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:55
↓ 1 callersFunctionprint_context
Print the Airflow context and ds variable from the context.
crates/ruff_linter/resources/test/fixtures/airflow/AIR301_context.py:72
↓ 1 callersFunctionprint_diagnostic_diff
Print the difference in diagnostics before and after a change.
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:484
↓ 1 callersFunctionprint_diagnostics
Print the lint diagnostics in `diagnostics`.
crates/ruff_linter/src/test.rs:472
↓ 1 callersFunctionprint_empty_string
FURB105
crates/ruff_linter/src/rules/refurb/rules/print_empty_string.rs:80
↓ 1 callersMethodprint_fill_entries
Tries to fit as much content as possible on a single line. `Fill` is a sequence of *item*, *separator*, *item*, *separator*, *item*, ... entries. The
crates/ruff_formatter/src/printer/mod.rs:640
↓ 1 callersMethodprint_fill_item
Semantic alias for [`Self::print_entry`] for fill items.
crates/ruff_formatter/src/printer/mod.rs:762
↓ 1 callersMethodprint_fill_separator
Semantic alias for [`Self::print_entry`] for fill separators.
crates/ruff_formatter/src/printer/mod.rs:772
↓ 1 callersFunctionprint_fix_summary
( writer: &mut dyn Write, fixed: &FixMap, preview: PreviewMode, prefer_rule_codes: bool, )
crates/ruff/src/printer.rs:469
↓ 1 callersFunctionprint_interactive_warning
()
crates/ty_server/src/lib.rs:76
↓ 1 callersFunctionprint_syntax_errors
(errors: &[ParseError], path: &Path, source: &SourceKind)
crates/ruff_linter/src/test.rs:453
↓ 1 callersMethodprint_text
(&mut self, text: Text)
crates/ruff_formatter/src/printer/mod.rs:448
↓ 1 callersMethodprint_with_indent
(&self, indent: u16)
crates/ruff_formatter/src/lib.rs:329
↓ 1 callersMethodprint_with_indent
( mut self, document: &'a Document, indent: u16, )
crates/ruff_formatter/src/printer/mod.rs:58
↓ 1 callersFunctionprintf_in_gettext_func_call
INT003
crates/ruff_linter/src/rules/flake8_gettext/rules/printf_in_gettext_func_call.rs:67
↓ 1 callersFunctionprintf_string_formatting
UP031
crates/ruff_linter/src/rules/pyupgrade/rules/printf_string_formatting.rs:371
↓ 1 callersMethodpriority
Returns an integer reflecting the "priority" of this import kind relative to other import statements. Lower values indicate higher priority.
crates/ty_python_semantic/src/importer.rs:994
↓ 1 callersFunctionprivate_member_access
SLF001
crates/ruff_linter/src/rules/flake8_self/rules/private_member_access.rs:76
↓ 1 callersFunctionprivate_type_parameter
UP049
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/private_type_parameter.rs:106
↓ 1 callersFunctionprobe_package_dirs
Probe exact package directories under `prefix_dir` for a known Python version. Discovers directories in the form `{prefix_dir}/{python,pypy}X.Y[t]/{s
crates/ty_site_packages/src/lib.rs:1533
↓ 1 callersMethodprocess_call_idiom
Processes a call idiom for `__all__` and updates the set of names accordingly. Returns `true` if the call idiom is recognized and valid, `false` othe
crates/ty_python_semantic/src/dunder_all.rs:119
↓ 1 callersMethodprocess_code_block
( &mut self, lang: &'s str, code: &'s str, ignore: bool, backtick_offs
crates/mdtest/src/parser.rs:824
↓ 1 callersMethodprocess_config_block
(&mut self, code: &str)
crates/mdtest/src/parser.rs:959
↓ 1 callersFunctionprocess_data
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF052_1.py:2
↓ 1 callersMethodprocess_header
(&mut self, header_level: usize, title: &'s str)
crates/mdtest/src/parser.rs:794
↓ 1 callersMethodprocess_inline_snapshot
( &mut self, code: &'s str, offsets: BacktickOffsets, )
crates/mdtest/src/parser.rs:976
↓ 1 callersMethodprocess_mdtest_directive
( &mut self, directive: MdtestDirective, value: Option<String>, )
crates/mdtest/src/parser.rs:1025
↓ 1 callersMethodprocess_stmts
Runs the core logic for the builder.
crates/ruff_python_semantic/src/cfg/graph.rs:194
↓ 1 callersFunctionprogram_file
Returns the program to use for `file`. Scripts use their own program, and project files use the project program. For third-party files, this chooses
crates/ty_project/src/db.rs:43
↓ 1 callersFunctionprogram_file
(db: &'db TestDb, path: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1330
↓ 1 callersMethodprogram_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:183
↓ 1 callersMethodprogram_for_dependency
Returns a program whose configured search paths contain `path`. Prefers the project environment, then existing script environments. This does not req
crates/ty_project/src/db.rs:264
↓ 1 callersMethodproject_meta_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types.rs:568
↓ 1 callersMethodproject_root
(self)
crates/ty_project/src/metadata/options.rs:649
↓ 1 callersMethodproject_state
Returns a reference to the project's [`ProjectState`] in which the given `path` belongs. If the path is a system path, it will return the project dat
crates/ty_server/src/session.rs:499
↓ 1 callersMethodproject_states_mut
Returns a mutable iterator over all projects.
crates/ty_server/src/session.rs:588
↓ 1 callersMethodprojected_node
(&self, id: ScopedNarrowingConstraint)
crates/ty_python_semantic/src/reachability.rs:1633
↓ 1 callersMethodprojection_source_order
Orders projected facts by replaying the rules already discovered during this walk. Projection emits derived facts in TDD branch order. Retaining that
crates/ty_python_semantic/src/types/constraints/paths.rs:217
← previousnext →12,301–12,400 of 31,562, ranked by callers