MCPcopy Create free account

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

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

↓ 2 callersMethodfoo
(self)
crates/ruff_linter/resources/test/fixtures/pylint/no_self_use.py:68
↓ 2 callersMethodfor_each_member_candidate
Visits protocol member candidates in MRO order after applying declaration precedence. Consumers discard shadowed names before applying the accompanyi
crates/ty_python_semantic/src/types/protocol_class.rs:147
↓ 2 callersMethodfor_each_unique_constraint
Invokes a closure for each unique BDD node that appears anywhere in a BDD. This treats the BDD as a DAG and does not revisit shared subgraphs. Use th
crates/ty_python_semantic/src/types/constraints.rs:2875
↓ 2 callersFunctionfor_loop_writes
FURB122
crates/ruff_linter/src/rules/refurb/rules/for_loop_writes.rs:139
↓ 2 callersMethodforce_exclude
(&self)
crates/ty_project/src/walk.rs:43
↓ 2 callersFunctionforeign_key_id_type
Return a relation field's stored ID type, used by both `<field>_id` and `pk`.
crates/ty_python_semantic/src/types/dedicated/django.rs:344
↓ 2 callersFunctionformat
Run the given ruff binary against the specified path.
python/ruff-ecosystem/ruff_ecosystem/format.py:241
↓ 2 callersMethodformat
(&self)
crates/ruff_python_formatter/src/module/mod.rs:24
↓ 2 callersMethodformat
(&self)
crates/ruff_python_formatter/src/statement/suite.rs:782
↓ 2 callersMethodformat
(&self)
crates/ruff_python_formatter/src/type_param/mod.rs:27
↓ 2 callersMethodformat
Given a code example, format them and return the formatted code as a sequence of owned docstring lines. This may mutate the code example in place if
crates/ruff_python_formatter/src/string/docstring.rs:491
↓ 2 callersMethodformat
Execute the format command on the given source.
crates/ruff_server/src/format.rs:304
↓ 2 callersFunctionformatSubDiagnosticAnnotation
( subDiagnostic: SubDiagnostic, annotation: DiagnosticAnnotation, includeSubDiagnosticMessage = annotati
playground/ty/src/Editor/Diagnostics.tsx:287
↓ 2 callersFunctionformatSubDiagnosticSeverity
(severity: SubDiagnosticSeverity)
playground/ty/src/Editor/Diagnostics.tsx:301
↓ 2 callersFunctionformat_bytes
Format bytes as a human-readable size.
scripts/memory_report.py:88
↓ 2 callersFunctionformat_code_blocks
( source: &str, path: Option<&Path>, settings: &FormatterSettings, )
crates/ruff_markdown/src/lib.rs:64
↓ 2 callersFunctionformat_dev_project
( files: &[PathBuf], stability_check: bool, write: bool, preview: bool, )
crates/ruff_dev/src/format_dev.rs:450
↓ 2 callersFunctionformat_elif_else_clause
Extracted so we can implement `FormatElifElseClause` but also pass in `last_node` from `FormatStmtIf`
crates/ruff_python_formatter/src/statement/stmt_if.rs:59
↓ 2 callersFunctionformat_mocks
( aliases: Vec<Option<AsName>>, is_lazy: bool, indent: &str, stylist: &Stylist, )
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_mock_import.rs:131
↓ 2 callersFunctionformat_origin
(origin: &Origin<'_>, anonymized_line_numbers: bool)
crates/ruff_annotate_snippets/src/renderer/render.rs:536
↓ 2 callersFunctionformat_path
( path: &Path, settings: &FormatterSettings, source_type: SourceType, mode: FormatMode, ra
crates/ruff/src/commands/format.rs:252
↓ 2 callersMethodformat_request
Send a `textDocument/formatting` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:829
↓ 2 callersFunctionformat_source
Format a [`SourceKind`], returning the transformed [`SourceKind`], or `None` if the source was unchanged.
crates/ruff/src/commands/format.rs:348
↓ 2 callersFunctionformat_suite
(level: SuiteKind)
crates/ruff_python_formatter/src/statement/suite.rs:994
↓ 2 callersFunctionformat_text_document
( text_document: &TextDocument, query: &DocumentQuery, encoding: PositionEncoding, is_notebook
crates/ruff_server/src/server/api/requests/format.rs:94
↓ 2 callersMethodforwarded_assignment_owner
Returns the owner of an assignment redirected by `global` or `nonlocal`. `global` assignments target the module symbol, while `nonlocal` assignments
crates/ty_python_semantic/src/types/infer/builder.rs:1785
↓ 2 callersFunctionforwarding_alias_definition
Find the definition referenced by `A` in a forwarding assignment such as `B = A` or `B = module.A`. For `B = A`, use the semantic index's bindings an
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:275
↓ 2 callersMethodfree_typevars
Returns the free type variables in this type and whether any lazy attributes were skipped.
crates/ty_python_semantic/src/types/typevar.rs:1994
↓ 2 callersMethodfreeze
Permanently freezes the most heavily read inputs that are immutable during a one-shot check. This is intentionally not exhaustive. It includes the pr
crates/ty_project/src/db.rs:143
↓ 2 callersFunctionfresh_binding_name
Return a fresh binding name derived from `base` that does not shadow an existing non-builtin symbol in the current semantic scope.
crates/ruff_linter/src/fix/edits.rs:417
↓ 2 callersMethodfreshen_bound_typevars
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, delta: u32, )
crates/ty_python_semantic/src/types/signatures.rs:1228
↓ 2 callersFunctionfreshening_delta
Returns a freshening delta if a binder would collide with an occurrence in `types`.
crates/ty_python_semantic/src/types/typevar.rs:979
↓ 2 callersMethodfrom_json
Load a memory report from a JSON file.
scripts/memory_report.py:60
↓ 2 callersFunctionfrom_negative_i32
(index: i32)
crates/ty_python_semantic/src/subscript.rs:32
↓ 2 callersMethodfrom_pair
Construct a diff from before and after.
python/ruff-ecosystem/ruff_ecosystem/types.py:61
↓ 2 callersMethodfull_block_range
Returns a folding range for a full block, preserving the first line of the block header.
crates/ty_ide/src/folding_range.rs:508
↓ 2 callersMethodfull_module_name
Appends a component name to this search's module name prefix.
crates/ty_module_resolver/src/resolve/search.rs:383
↓ 2 callersFunctionfull_object_ty_annotation
(ty: Type<'_>)
crates/ty_python_semantic/src/types/typed_dict.rs:2348
↓ 2 callersMethodfull_path
Returns the full path using unix file-path convention.
crates/mdtest/src/parser.rs:420
↓ 2 callersMethodfull_range
(&self)
crates/ruff_source_file/src/newlines.rs:229
↓ 2 callersFunctionfunc
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/import.py:40
↓ 2 callersFunctionfunc
Do something. Args: x: the value with a hanging indent Returns: the value
crates/ruff_linter/resources/test/fixtures/pydocstyle/D413.py:12
↓ 2 callersFunctionfunc
(pos, password)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S106.py:1
↓ 2 callersFunctionfunc2
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:8
↓ 2 callersMethodfunc2
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:66
↓ 2 callersMethodfunc3
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:96
↓ 2 callersMethodfunc_arg
(self)
crates/ruff_linter/src/rules/ruff/rules/legacy_form_pytest_raises.rs:115
↓ 2 callersMethodfunction
Returns the underlying Python function, when the bound callable has a function definition.
crates/ty_python_semantic/src/types/method.rs:184
↓ 2 callersMethodfunction
(&'db self, selector: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1209
↓ 2 callersFunctionfunction_body_kind
Classify the body of this function: - [`FunctionBodyKind::Stub`] if it is a stub function (i.e., only contains `pass` or `...` - [`FunctionBodyKind::A
crates/ty_python_semantic/src/types/function.rs:2209
↓ 2 callersFunctionfunction_context
(db: &'db TestDb, name: &str)
crates/ty_python_semantic/src/types/generics.rs:5677
↓ 2 callersMethodfunction_name
(self)
crates/ty_python_semantic/src/types/infer/builder/dynamic_class.rs:30
↓ 2 callersFunctionfunction_returning_generator
(r)
crates/ruff_linter/resources/test/fixtures/pylint/len_as_condition.py:161
↓ 2 callersMethodfunction_scope
Finds and returns the [`Scope`] corresponding to a given [`ast::StmtFunctionDef`]. This method searches all scopes created by a function definition,
crates/ruff_python_semantic/src/model.rs:2412
↓ 2 callersFunctionfunction_uses_loop_variable
B023
crates/ruff_linter/src/rules/flake8_bugbear/rules/function_uses_loop_variable.rs:285
↓ 2 callersFunctionfunctional_typed_dict_field
( declared_ty: Type<'_>, qualifiers: TypeQualifiers, total: bool, )
crates/ty_python_semantic/src/types/typed_dict.rs:190
↓ 2 callersMethodg
(self)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:276
↓ 2 callersFunctiongenerateMonacoTokens
( semantic: SemanticToken[], model: editor.ITextModel, )
playground/ty/src/Editor/Editor.tsx:1086
↓ 2 callersMethodgenerate_constraint
Generate a constraint from the type of a `classinfo` argument to `isinstance` or `issubclass`. The `classinfo` argument can be a class literal, a tup
crates/ty_python_semantic/src/types/narrow.rs:526
↓ 2 callersFunctiongenerate_diagnostics
(snapshot: &DocumentSnapshot)
crates/ruff_server/src/server/api/diagnostics.rs:8
↓ 2 callersFunctiongenerate_method_call
Format a code snippet to call `name.method()`.
crates/ruff_linter/src/rules/refurb/helpers.rs:15
↓ 2 callersFunctiongenerate_semantic_tokens
Common logic for generating semantic tokens, either for full document or a specific range. If no range is provided, the entire file is processed.
crates/ty_server/src/server/api/semantic_tokens.rs:12
↓ 2 callersFunctiongenerate_suppression_edit
( directive: Option<ExistingDirective<'a>>, offset: TextSize, noqa_codes: FxHashSet<&'a str>,
crates/ruff_linter/src/noqa.rs:1122
↓ 2 callersFunctiongenerate_union_fix
Generate a [`Fix`] for two or more type expressions, e.g. `typing.Union[int, float, complex]`.
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:122
↓ 2 callersFunctiongenerator_annotation_arguments
Returns the arguments to a generator annotation, if it exists.
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1154
↓ 2 callersFunctiongeneric_context_has_paramspec
( db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:292
↓ 2 callersMethodget
(&self)
crates/ruff_python_codegen/src/stylist.rs:65
↓ 2 callersMethodget
(self, key: str)
crates/ruff_linter/resources/test/fixtures/pylint/useless_return.py:54
↓ 2 callersMethodget
Return the [`Language`] for the given file.
crates/ruff_linter/src/settings/types.rs:507
↓ 2 callersMethodgetOrCreateVendoredModel
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:531
↓ 2 callersMethodgetPlaygroundFileForUri
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:503
↓ 2 callersMethodget_child
(&mut self, b: u8)
crates/ruff_unicode_names2_generator/src/trie.rs:18
↓ 2 callersMethodget_clear
(&self)
crates/ruff_db/src/system/command.rs:118
↓ 2 callersFunctionget_mark_decorators
( decorators: &'a [Decorator], semantic: &'a SemanticModel, )
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:12
↓ 2 callersFunctionget_minimum_supported_version
Infer the minimum supported [`PythonVersion`] from a `requires-python` specifier.
crates/ruff_workspace/src/pyproject.rs:237
↓ 2 callersMethodget_names_from_wildcard
Returns the exported symbols (along with `__all__`) from the module imported in `import_from`.
crates/ty_ide/src/symbols.rs:1162
↓ 2 callersFunctionget_or_create_file
( paths: &'a mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, normalized: &Utf8Path, )
crates/ruff_db/src/system/memory_fs.rs:513
↓ 2 callersFunctionget_output
()
crates/ruff_db/src/diagnostic/render/sarif.rs:428
↓ 2 callersFunctionget_prefix_ident
Returns an identifier for the given prefix.
crates/ruff_macros/src/rule_code_prefix.rs:121
↓ 2 callersMethodget_print_mode
(&self, group_id: GroupId)
crates/ruff_formatter/src/printer/mod.rs:936
↓ 2 callersFunctionget_project_cache_dir
Get the cache directory for a project in the cargo target directory
crates/ruff_benchmark/src/checkout.rs:50
↓ 2 callersFunctionget_result_with_options
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, options: RunOptions,
crates/mdtest/src/matcher.rs:580
↓ 2 callersFunctionget_string_literal
( meta: &ParseNestedMeta, meta_name: &str, attribute_name: &str, )
crates/ruff_macros/src/config.rs:325
↓ 2 callersFunctionget_truncated_table_data
( unicode_data: &'static str, truncate: Option<usize>, )
crates/ruff_unicode_names2_generator/src/lib.rs:393
↓ 2 callersFunctionget_type_alias
(db: &'db TestDb, name: &str)
crates/ty_python_semantic/src/types/tests.rs:879
↓ 2 callersFunctionget_undecorated_methods
(checker: &Checker, class_stmt: &Stmt, method_type: &MethodType)
crates/ruff_linter/src/rules/pylint/rules/no_method_decorator.rs:103
↓ 2 callersMethodgetitem_dunder_call
Returns the value type of a `__getitem__` dunder call on this object. Returns `None` if `__getitem__` is undefined or results in a call error.
crates/ty_python_semantic/src/types.rs:7019
↓ 2 callersMethodglobal
(&self, _name: &str)
crates/ruff_python_parser/tests/fixtures.rs:648
↓ 2 callersMethodglobal
(&self, name: &str)
crates/ruff_linter/src/checkers/ast/mod.rs:775
↓ 2 callersMethodglobal_binding
Return a binding from the global scope, materializing it first if it is a builtin.
crates/ruff_python_semantic/src/model.rs:832
↓ 2 callersFunctionglobal_type_alias
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, )
crates/ty_python_semantic/src/types/cyclic.rs:1368
↓ 2 callersMethodgoToLocation
(location: DiagnosticDetailLocation)
playground/ty/src/Editor/Editor.tsx:953
↓ 2 callersMethodgoto_definition_request
Send a `textDocument/definition` request for the document at the given path and position.
crates/ty_server/tests/e2e/main.rs:1071
↓ 2 callersMethodhandle_message
Handle the incoming message from the server. This method will store the message as follows: - Requests are stored in `self.requests` - Responses are
crates/ty_server/tests/e2e/main.rs:749
↓ 2 callersMethodhandle_message
Handle the incoming message from the server. This method will store the message as follows: - Requests are stored in `self.requests` - Responses are
crates/ruff_server/tests/e2e/main.rs:615
↓ 2 callersMethodhandle_node_load
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:2908
↓ 2 callersFunctionhandler
(echo: str = Query(""))
crates/ruff_linter/resources/test/fixtures/fastapi/FAST002_1.py:10
↓ 2 callersFunctionhasFileNamed
(fileName: string)
playground/ty/src/Editor/Files.tsx:32
↓ 2 callersMethodhas_any_return
Returns `true` if the [`Terminal`] behavior includes at least one `return` path.
crates/ruff_python_semantic/src/analyze/terminal.rs:31
↓ 2 callersMethodhas_blank_line_between
Check if there's a blank line appearing anywhere between two positions.
crates/ty_ide/src/folding_range.rs:312
← previousnext →5,701–5,800 of 31,766, ranked by callers