MCPcopy Create free account

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

Functions27,807 in github.com/astral-sh/ruff

↓ 33 callersMethodgeneric_context
Returns the generic context if this is a generic class.
crates/ty_python_semantic/src/types/class.rs:672
↓ 33 callersMethodindexer
The [`Indexer`] for the current file, which contains the offsets of all comments and more.
crates/ruff_linter/src/checkers/ast/mod.rs:514
↓ 33 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/call/bind.rs:4415
↓ 33 callersMethoditer
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 33 callersMethoditer_non_variadic_params
Returns an iterator over all non-variadic parameters included in this [`Parameters`] node. The variadic parameters (`.vararg` and `.kwarg`) can never
crates/ruff_python_ast/src/nodes.rs:3132
↓ 33 callersMethodnext
(&self)
crates/ty_python_semantic/src/types/typevar.rs:795
↓ 33 callersMethodorigin
()
crates/ty_python_semantic/src/types/constraints.rs:6657
↓ 33 callersMethodparent
(&self)
crates/ty_python_core/src/scope.rs:139
↓ 33 callersMethodpush
(&mut self, segment: &'a str)
crates/ruff_python_ast/src/name.rs:462
↓ 33 callersMethodtrim_start
Trims the indent of `rhs` by `self`. Returns `None` if `self` is not a prefix of `rhs` or either `self` or `rhs` use mixed indentation.
crates/ruff_python_formatter/src/string/docstring.rs:1749
↓ 32 callersMethodborrow
(&self)
crates/ruff_index/src/vec.rs:111
↓ 32 callersMethodcheck_type_pair
Return a constraint set indicating the conditions under which `self.relation` holds between `source` and `target`.
crates/ty_python_semantic/src/types/relation.rs:1098
↓ 32 callersMethoddocument_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ty_server/tests/e2e/main.rs:922
↓ 32 callersMethodinto_boxed_slice
(self)
crates/ty_python_core/src/definition.rs:283
↓ 32 callersMethodis_none_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2466
↓ 32 callersMethodis_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callersMethodline_ending
(&self)
crates/ruff_source_file/src/newlines.rs:241
↓ 32 callersMethodmodule_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:10889
↓ 32 callersMethodor_default
(&self)
crates/ty_project/src/metadata/options.rs:2311
↓ 32 callersFunctionparse
( short_title: &'s str, source: &'s str, )
crates/ty_test/src/lib.rs:569
↓ 32 callersFunctionparse_expression
Parses a single Python expression. This convenience function can be used to parse a single expression without having to specify the Mode or the locat
crates/ruff_python_parser/src/lib.rs:135
↓ 32 callersMethodresolve_name
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if any.
crates/ruff_python_semantic/src/model.rs:1132
↓ 32 callersFunctionsetup_rayon
()
crates/ruff_benchmark/benches/ty.rs:128
↓ 32 callersFunctionsorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 32 callersFunctiontest_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:217
↓ 32 callersMethodto_scope_id
(self, db: &dyn Db, file: File)
crates/ty_python_core/src/scope.rs:100
↓ 32 callersMethoduniversal_newlines
(&self)
crates/ruff_source_file/src/newlines.rs:13
↓ 32 callersMethodwrite_file_all
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`. Enclosing directorie
crates/ruff_db/src/system/memory_fs.rs:229
↓ 32 callersMethodwrite_str
(&mut self, val: &str)
crates/ty_python_semantic/src/types/display.rs:356
↓ 31 callersMethodas_ref
(&self)
crates/ruff_db/src/system/path.rs:641
↓ 31 callersMethodcount
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:578
↓ 31 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:374
↓ 31 callersMethodfunction
(self)
crates/ty_python_semantic/src/types/enums.rs:88
↓ 31 callersMethodget
Returns the [`OverloadLiteral`] representing this matching overload.
crates/ty_python_semantic/src/types/call/bind.rs:8339
↓ 31 callersMethodinto_boxed_slice
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:11791
↓ 31 callersFunctionline_index
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:206
↓ 31 callersMethodmember
(self, db: &'db dyn Db, name: &str)
crates/ty_python_semantic/src/types.rs:3836
↓ 31 callersMethodonly_binding
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if it's the only binding to that name in its scope.
crates/ruff_python_semantic/src/model.rs:1138
↓ 31 callersMethodresolve_builtin_symbol
If `expr` is a reference to a builtins symbol, return the name of that symbol. Else, return `None`. This method returns `true` both for "builtin bind
crates/ruff_python_semantic/src/model.rs:380
↓ 31 callersMethodsystem_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:231
↓ 31 callersMethodwith_diagnostic_mode
(mut self, diagnostic_mode: DiagnosticMode)
crates/ty_server/src/session/options.rs:102
↓ 30 callersFunctionassert_fail
(result: Result<Vec<Diagnostic>, FailuresByLine>, messages: &[(usize, &[&str])])
crates/mdtest/src/matcher.rs:594
↓ 30 callersFunctionempty
()
crates/ty_ide/src/completion.rs:3289
↓ 30 callersFunctionf
()
crates/ty_python_semantic/resources/corpus/10_if_false.py:22
↓ 30 callersFunctionfilter_result_id
Redact result_id values since they are hash-based and non-deterministic
crates/ty_server/tests/e2e/pull_diagnostics.rs:831
↓ 30 callersFunctionglobal_scope
(db: &dyn Db, file: File)
crates/ty_python_core/src/lib.rs:224
↓ 30 callersMethodinto_iter
(self)
crates/ty_python_core/src/frozen.rs:93
↓ 30 callersMethodis_equivalent_to
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/newtype.rs:114
↓ 30 callersMethodis_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callersMethodkind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 30 callersMethodlast_mut
(&mut self)
crates/ruff_index/src/slice.rs:54
↓ 30 callersFunctionmap_subscript
Given an [`Expr`] that can be a [`ExprSubscript`][ast::ExprSubscript] or not (like an annotation that may be generic or not), return the underlying ex
crates/ruff_python_ast/src/helpers.rs:895
↓ 30 callersMethodnever
(&self)
crates/ty_python_semantic/src/types/relation.rs:917
↓ 30 callersMethodnode
(self)
crates/ty_python_semantic/src/types/constraints.rs:2313
↓ 30 callersMethodsignature
Typed internally-visible signature for this function. This represents the annotations on the function itself, unmodified by decorators and overloads.
crates/ty_python_semantic/src/types/function.rs:492
↓ 30 callersFunctionunknown_rule_selector_test
()
crates/ruff/tests/cli/lint.rs:762
↓ 29 callersFunctionassert_parameter_documentation
(raw: &str, expected: &[(&str, &str)])
crates/ty_ide/src/docstring/document/google.rs:1660
↓ 29 callersMethodinto_iter
(self)
crates/ty_server/src/session.rs:1592
↓ 29 callersMethodis_empty
(&self)
crates/ty_site_packages/src/lib.rs:92
↓ 29 callersMethodline_start
Compute the start position of the docstring's opening line
crates/ruff_linter/src/docstrings/mod.rs:40
↓ 29 callersFunctionmap_callable
Given an [`Expr`] that can be callable or not (like a decorator, which could be used with or without explicit call syntax), return the underlying call
crates/ruff_python_ast/src/helpers.rs:883
↓ 29 callersMethodpeek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 29 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:40
↓ 29 callersMethodreference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:236
↓ 29 callersMethodset_concise_message
Set a custom message for the concise formatting of this diagnostic. This overrides the default behavior of generating a concise message from the main
crates/ruff_db/src/diagnostic/mod.rs:246
↓ 29 callersMethodsystem
(&self)
crates/ty_module_resolver/src/db.rs:102
↓ 29 callersFunctiontest_case
(content: &str)
crates/ty_python_core/src/lib.rs:1110
↓ 29 callersMethodto_comments
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:531
↓ 29 callersFunctiontoken
(text: &'static str)
crates/ruff_formatter/src/builders.rs:254
↓ 29 callersFunctiontokenize
(source: &'static str)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:45
↓ 29 callersMethodvariable
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1073
↓ 29 callersMethodwith_mocked_typeshed
Use a mock typeshed directory for this test case
crates/ty_module_resolver/src/testing.rs:188
↓ 28 callersFunctionPython
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 28 callersFunctiondefinition_expression_type
Infer the type of a (possibly deferred) sub-expression of a [`Definition`]. Supports expressions that are evaluated within a type-params sub-scope.
crates/ty_python_semantic/src/types.rs:240
↓ 28 callersMethodenter_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:15
↓ 28 callersFunctionexit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:5
↓ 28 callersMethodextend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:472
↓ 28 callersFunctionfrom_tokens
( context: &LintContext, path: &Path, locator: &Locator, comment_ranges: &CommentRanges, )
crates/ruff_linter/src/rules/flake8_executable/rules/mod.rs:21
↓ 28 callersMethodinfer_type_expression
Infer the type of a type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:39
↓ 28 callersMethodinsert
Insert the type of this argument when inferred with the provided type context.
crates/ty_python_semantic/src/types/call/arguments.rs:92
↓ 28 callersMethodis_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2651
↓ 28 callersMethodis_never_satisfied
Returns whether this constraint set never holds
crates/ty_python_semantic/src/types/constraints.rs:441
↓ 28 callersMethodknown
Create a [`NamedTupleSpec`] with the given fields.
crates/ty_python_semantic/src/types/class/named_tuple.rs:576
↓ 28 callersMethodleave_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:20
↓ 28 callersMethodnode
(self, db: &dyn Db)
crates/ty_python_core/src/scope.rs:30
↓ 28 callersMethodor_default
(self, rule_name: &'static str)
crates/ruff_linter/src/linter.rs:97
↓ 28 callersMethodpython_version
(&self)
crates/ty_python_semantic/src/db.rs:135
↓ 28 callersFunctionsetup_micro_case
(code: &str)
crates/ruff_benchmark/benches/ty.rs:223
↓ 28 callersMethodsleep
(x, cls, z)
crates/ruff_linter/resources/test/fixtures/pylint/bad_staticmethod_argument.py:36
↓ 28 callersMethodstarts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:377
↓ 28 callersMethodstore_expression_type
(&mut self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:6300
↓ 28 callersMethodtokens
Returns the token stream for `path` serialized as a string.
crates/ty_wasm/src/lib.rs:303
↓ 28 callersFunctionwalk_stmt
(checker: &Checker, body: &[Stmt], f: fn(&Stmt) -> bool)
crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs:57
↓ 27 callersMethodafter
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:64
↓ 27 callersFunctionany_over_expr
Call `func` over every `Expr` in `expr`, returning `true` if any expression returns `true`..
crates/ruff_python_ast/src/helpers.rs:258
↓ 27 callersMethodas_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2569
↓ 27 callersMethodas_static
Returns the static class definition if this is one.
crates/ty_python_semantic/src/types/class.rs:776
↓ 27 callersMethodas_str
(self)
crates/ty_site_packages/src/lib.rs:430
↓ 27 callersFunctioncreate_typevar
(db: &'db dyn Db, name: &'static str)
crates/ty_python_semantic/src/types/constraints.rs:7601
↓ 27 callersMethodcurrent_scope
(&self)
crates/ty_python_core/src/builder.rs:378
← previousnext →401–500 of 27,807, ranked by callers