MCPcopy Create free account

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

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

↓ 2 callersFunctioncreate_lsp_notebook
( file_path: &Path, open_uri_path: PathBuf, )
crates/ruff_server/tests/e2e/notebook.rs:408
↓ 2 callersFunctioncreate_name
Create and return a [`Name`] from the given expression, [`None`] if it is an invalid expression for a `__all__` element.
crates/ty_python_semantic/src/dunder_all.rs:450
↓ 2 callersFunctioncreate_panic_diagnostic
Create a `Diagnostic` from a panic.
crates/ruff_linter/src/message/mod.rs:32
↓ 2 callersMethodcreate_printer
(&self)
crates/ruff_formatter/src/lib.rs:334
↓ 2 callersMethodcreate_result
( &mut self, items: Vec<WorkspaceDocumentDiagnosticReport>, )
crates/ty_server/src/server/api/requests/workspace_diagnostic.rs:570
↓ 2 callersFunctioncreate_stack
( checker: &'a Checker, function_def: &'a ast::StmtFunctionDef, )
crates/ruff_linter/src/rules/flake8_return/rules/function.rs:729
↓ 2 callersFunctioncreate_walker_builder
(db: &dyn Db, paths: I)
crates/ty_project/src/walk.rs:326
↓ 2 callersMethodcrosses_scope_declaration
Returns whether this resolution required crossing a `global` or `nonlocal` declaration.
crates/ty_python_semantic/src/place/definitions.rs:166
↓ 2 callersFunctioncurly_escape
(text: &str)
crates/ruff_linter/src/rules/pyupgrade/helpers.rs:8
↓ 2 callersMethodcurrent_assignment
(&self)
crates/ty_python_core/src/builder.rs:2642
↓ 2 callersFunctioncurrent_directory
()
crates/ty/src/lib.rs:956
↓ 2 callersMethodcurrent_directory
(&self)
crates/ruff_db/src/system/os.rs:137
↓ 2 callersMethodcurrent_flags
Returns the flags for the current token.
crates/ruff_python_parser/src/token_source.rs:60
↓ 2 callersMethodcurrent_range
Returns the range of the current token.
crates/ruff_python_parser/src/token_source.rs:55
↓ 2 callersMethodcurrent_scope_info
(&self)
crates/ty_python_core/src/builder.rs:382
↓ 2 callersMethodcurrent_token_id
(&self)
crates/ruff_python_parser/src/parser/mod.rs:403
↓ 2 callersMethodcursor_name
Returns the file name, relative to this project's root directory, that contains the cursor directive that we are evaluating.
crates/ty_completion_eval/src/main.rs:342
↓ 2 callersMethodcwd
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:187
↓ 2 callersMethodcycle_normalized
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, previous: Self,
crates/ty_python_semantic/src/types/protocol_class.rs:835
↓ 2 callersMethodcycle_normalized
( mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, previous_inference
crates/ty_python_semantic/src/types/infer.rs:1080
↓ 2 callersMethodd
(cls)
crates/ruff_linter/resources/test/fixtures/pyflakes/future_annotations.py:30
↓ 2 callersFunctiondangling_comments
(comments: &[SourceComment])
crates/ruff_python_formatter/src/comments/format.rs:203
↓ 2 callersMethoddb
(&self)
crates/ty_python_semantic/src/types/unpacker.rs:71
↓ 2 callersFunctiondebug
()
crates/ruff_index/src/idx.rs:55
↓ 2 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
↓ 2 callersFunctiondebug_assert_no_newlines
(text: &str)
crates/ruff_formatter/src/builders.rs:408
↓ 2 callersMethoddeclared
(self)
crates/ty_python_semantic/src/types/infer.rs:1208
↓ 2 callersFunctiondeclared_instance_attribute_names
( db: &'db dyn Db, class_scope: ScopeId<'db>, )
crates/ty_python_semantic/src/types/overrides.rs:314
↓ 2 callersMethoddecorated_signatures
Returns the effective signatures of this overload after applying decorators.
crates/ty_python_semantic/src/types/function.rs:579
↓ 2 callersFunctiondecorator
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET504.py:212
↓ 2 callersFunctiondecorator_runtime_semantics
( decorator_list: &[Decorator], semantic: &SemanticModel, settings: &LinterSettings, )
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:186
↓ 2 callersMethoddecrement_call_like_count
(self)
crates/ruff_python_formatter/src/expression/mod.rs:925
↓ 2 callersMethoddecrement_indent
(mut self)
crates/ruff_formatter/src/printer/call_stack.rs:59
↓ 2 callersFunctiondedent
Removes common leading whitespace from each line. This function will look at each non-empty line and determine the maximum amount of whitespace that
crates/ruff_python_trivia/src/textwrap.rs:154
↓ 2 callersMethoddedent_one
Dedent one level to eventually reach `new_indentation`. Returns `Err` if the `new_indentation` is greater than the new current indentation level.
crates/ruff_python_parser/src/lexer/indentation.rs:104
↓ 2 callersFunctiondedent_to
Reduce a block's indentation to match the provided indentation. This function looks at the first line in the block to determine the current indentati
crates/ruff_python_trivia/src/textwrap.rs:205
↓ 2 callersMethoddefault
()
crates/ruff_linter/src/rules/isort/settings.rs:99
↓ 2 callersMethoddefault
()
crates/ruff_linter/src/rules/flake8_self/settings.rs:27
↓ 2 callersMethoddefault_fstring_flags
TODO(dylan) add similar method for t-strings Return the default f-string flags a generated `FString` node should use, given where we are in the AST.
crates/ruff_linter/src/checkers/ast/mod.rs:405
↓ 2 callersFunctiondefault_function
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF009_attrs.py:13
↓ 2 callersMethoddefault_type
Infer the default-value type only when its value is needed, such as for display or a dataclass field specifier. Callable compatibility only needs [`Se
crates/ty_python_semantic/src/types/signatures.rs:6492
↓ 2 callersMethoddefault_type_impl
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, visitor: &TypeVarDefau
crates/ty_python_semantic/src/types/typevar.rs:415
↓ 2 callersMethoddefer_decorator_call
(&mut self, decorator: &ast::Decorator, input_ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:5834
↓ 2 callersMethoddeferred_decorator_input_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:1920
↓ 2 callersMethoddefinition
(self)
crates/ty_python_core/src/use_def/place_state.rs:122
↓ 2 callersMethoddefinition
(self)
crates/ty_python_semantic/src/place.rs:141
↓ 2 callersMethoddefinition
Return the definition associated with this signature, if any.
crates/ty_python_semantic/src/types/signatures.rs:1518
↓ 2 callersFunctiondefinition_for_name
Get the primary definition kind for a name expression within a specific file. Returns the first definition kind that is reachable for this name in its
crates/ty_python_semantic/src/types/ide_support.rs:65
↓ 2 callersFunctiondefinitions_for_bin_op
Returns the definitions of the binary operation along with its callable type.
crates/ty_python_semantic/src/types/ide_support.rs:1420
↓ 2 callersFunctiondefinitions_for_builtin
Resolves a symbol in an implicit builtins scope.
crates/ty_python_semantic/src/types/definition_resolution.rs:295
↓ 2 callersFunctiondefinitions_for_imported_symbol
Find the definitions for a symbol imported via `from x import y as z` statement. This function handles the case where the cursor is on the original sy
crates/ty_python_semantic/src/types/ide_support.rs:910
↓ 2 callersFunctiondefinitions_for_unary_op
Returns the definitions for an unary operator along with their callable types.
crates/ty_python_semantic/src/types/ide_support.rs:1448
↓ 2 callersMethoddefinitions_reaching
(&self, target: Definition<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:539
↓ 2 callersMethoddefinitions_with_usage
Definitions relevant to usage analysis, including standalone declarations. The early declaration part of a combined definition is omitted: its later
crates/ty_python_core/src/use_def.rs:1079
↓ 2 callersMethoddelete_binding
(&mut self, place: ScopedPlaceId)
crates/ty_python_core/src/builder.rs:1560
↓ 2 callersFunctiondependencies
()
crates/ruff/tests/analyze_graph.rs:30
↓ 2 callersMethoddependencies
(&self)
crates/ty_test/src/config.rs:81
↓ 2 callersMethoddependencies
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/variance/equations.rs:221
↓ 2 callersMethoddependency_metadata
( self, db: &dyn Db, )
crates/ty_project/src/lib.rs:285
↓ 2 callersMethoddependency_metadata
( &self, )
crates/ty_project/src/uv/metadata/dependencies.rs:17
↓ 2 callersMethoddependency_metadata
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:203
↓ 2 callersFunctiondepends_arguments
(expr: &'a Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:420
↓ 2 callersMethoddeprecated
(since: &'static str, reason: &'static str)
crates/ty_python_semantic/src/lint.rs:214
↓ 2 callersMethoddeprecated_decorator_functions
Return deprecations that need to be reported when applying a decorator. Direct function implementations are checked at references, while overloads and
crates/ty_python_semantic/src/types/call/bind.rs:1021
↓ 2 callersMethoddeprecated_functions
A method can be deprecated even when it is missing on some union members or its signature rejects the implicit call.
crates/ty_python_semantic/src/types/call.rs:492
↓ 2 callersMethoddescendants
(&self)
crates/ty_python_core/src/scope.rs:166
↓ 2 callersMethoddescendent_scopes
Returns an iterator over the descendent scopes of `scope`.
crates/ty_python_core/src/lib.rs:652
↓ 2 callersFunctiondescriptor_setter
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, descriptor_ty: Type<'db>, )
crates/ty_python_semantic/src/types/attribute_write.rs:1138
↓ 2 callersMethoddescriptor_type
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1084
↓ 2 callersMethoddescriptor_write_alternatives
Yield each possible descriptor type so writes can be checked one alternative at a time. For example, if an attribute has type `IntDescriptor | StrDes
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:853
↓ 2 callersFunctiondetect_blind_exception
( semantic: &ruff_python_semantic::SemanticModel<'_>, func: &Expr, arguments: &Arguments, )
crates/ruff_linter/src/rules/flake8_bugbear/rules/assert_raises_exception.rs:61
↓ 2 callersFunctiondetermine_self_class
Walk the MRO of this class and return the last class just before the specified known base. This determines the owner and upper bound of `Self` on synt
crates/ty_python_semantic/src/types.rs:13074
↓ 2 callersMethoddiagnose_single_length_tuple
( &self, length: TupleLength, node: &ast::Expr, node_type: Type<'db>,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1001
↓ 2 callersFunctiondiagnostic_signature
Create a signature for a diagnostic based on file, code, and message (ignoring position).
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:447
↓ 2 callersFunctiondiagnostic_touches_vendored_file
(db: &dyn Db, diagnostic: &Diagnostic)
crates/ty_ide/src/lib.rs:478
↓ 2 callersMethoddiagnostics
(&self)
crates/ty_project/src/lib.rs:1070
↓ 2 callersMethoddiagnostics
(&self)
crates/ty_python_semantic/src/types/diagnostic.rs:1724
↓ 2 callersFunctiondict_items
( call_expr: &'a Expr, tuple_expr: &'a Expr, )
crates/ruff_linter/src/rules/pylint/rules/unnecessary_dict_index_lookup.rs:114
↓ 2 callersMethoddict_value_type
Returns the value type if this `TypedDict` is a subtype of `dict[str, VT]`. This requires mutable explicit extra items and optional, mutable declared
crates/ty_python_semantic/src/types/typed_dict.rs:506
↓ 2 callersMethoddict_value_type_if
Like [`Self::dict_value_type`], but uses the caller's equivalence or mutual-assignability check so recursive comparisons can share their cycle guards.
crates/ty_python_semantic/src/types/typed_dict.rs:518
↓ 2 callersFunctiondid_you_mean
Suggest a name from `existing_names` that is similar to `wrong_name`.
crates/ty_python_semantic/src/diagnostic/mod.rs:16
↓ 2 callersMethoddiff
(&self)
crates/ruff_annotate_snippets/src/renderer/mod.rs:336
↓ 2 callersFunctiondiff_diagnostics
Return diagnostics in `new` that aren't in `old`.
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:463
↓ 2 callersMethoddiffers_for_members_required_by
Compare the original and materialized forms of members required by `required`. An unrelated materialized member must not prevent a protocol from reta
crates/ty_python_semantic/src/types/protocol_class.rs:551
↓ 2 callersMethoddigest
(self)
crates/ruff_linter/resources/test/fixtures/refurb/FURB181.py:53
↓ 2 callersFunctiondirectory_watcher
Creates a new watcher observing file system changes. The watcher debounces events, but guarantees to send all changes eventually (even if the file sy
crates/ty_project/src/watch/watcher.rs:16
↓ 2 callersMethoddisable
Disables `lint` if it was previously enabled.
crates/ty_python_semantic/src/lint.rs:675
↓ 2 callersMethoddisable
(&mut self, rule: Rule)
crates/ruff_linter/src/settings/rule_table.rs:73
↓ 2 callersFunctiondisable_io_rules
Disables IO based rules because they are a source of flakiness
crates/ruff_benchmark/benches/linter.rs:115
↓ 2 callersMethoddisallow_signature_name
(&self)
crates/ty_python_semantic/src/types/display.rs:215
↓ 2 callersMethoddiscard_dict_key_assignments_for
(&mut self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:599
↓ 2 callersMethoddiscards_dict_key_assignments
(&self)
crates/ty_python_semantic/src/types/infer.rs:1899
↓ 2 callersMethoddisplay
( &'env self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/arguments.rs:852
↓ 2 callersMethoddisplay_contents
(self, contents: &str)
crates/ruff_python_ast/src/nodes.rs:1034
↓ 2 callersMethoddisplay_minimum
(self)
crates/ty_python_semantic/src/types/tuple.rs:107
↓ 2 callersMethoddisplay_short
Renders the specialization as it would appear in a subscript expression, e.g. `[int, str]`.
crates/ty_python_semantic/src/types/display.rs:2354
↓ 2 callersMethoddo_bump
Bumps the token source to the next non-trivia token without adding the current token to the token vector. It does add the trivia tokens to the token v
crates/ruff_python_parser/src/token_source.rs:173
↓ 2 callersFunctiondo_nothing
(a)
crates/ruff_linter/resources/test/fixtures/ruff/RUF027_1.py:1
↓ 2 callersMethoddo_thing
(self)
crates/ruff_linter/resources/test/fixtures/pyflakes/F841_0.py:140
↓ 2 callersMethoddocstring
Returns a non-None value only if the formatter is running on a code snippet within a docstring. The quote character returned corresponds to the quoti
crates/ruff_python_formatter/src/context.rs:98
← previousnext →5,301–5,400 of 31,562, ranked by callers