MCPcopy Create free account

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

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

↓ 19 callersMethodtokens
Returns all the tokens for the parsed output.
crates/ruff_python_parser/src/lib.rs:401
↓ 19 callersMethodtop_materialization
Returns the top materialization for this class.
crates/ty_python_semantic/src/types/class.rs:901
↓ 19 callersFunctiontrailing
()
crates/ruff_python_formatter/src/comments/map.rs:643
↓ 19 callersFunctionwalk_stmt
(visitor: &mut V, stmt: &'a Stmt)
crates/ruff_python_ast/src/visitor.rs:135
↓ 18 callersMethodanonymized_line_numbers
Anonymize line numbers This enables (or disables) line number anonymization. When enabled, line numbers are replaced with `LL`. # Example ```text -
crates/ruff_annotate_snippets/src/renderer/mod.rs:99
↓ 18 callersMethodappend
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__regression.py:109
↓ 18 callersMethodas_function
(&self)
crates/ty_python_core/src/scope.rs:413
↓ 18 callersMethodbinding_id
Returns the [`BindingId`] if this symbol resolves to a concrete binding.
crates/ruff_python_semantic/src/model.rs:44
↓ 18 callersMethodclass
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:233
↓ 18 callersMethodcollect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ty_server/tests/e2e/main.rs:568
↓ 18 callersMethodcontents
Return the underlying source code.
crates/ruff_linter/src/locator.rs:128
↓ 18 callersMethoddefinition
(&self, id: ScopedDefinitionId)
crates/ty_python_core/src/use_def.rs:946
↓ 18 callersMethodeat_char
(&mut self, c: char)
crates/ruff_python_trivia/src/cursor.rs:91
↓ 18 callersMethodend_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:978
↓ 18 callersMethodenter_node
(&mut self, node: T)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:205
↓ 18 callersMethodexact_tuple_instance_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types.rs:1498
↓ 18 callersMethodexit_node
(&mut self)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:213
↓ 18 callersMethodexpression_type
( &self, expression: impl Into<ExpressionNodeKey>, )
crates/ty_python_semantic/src/types/infer.rs:219
↓ 18 callersFunctionfile_to_module
(db: &dyn Db, file: File)
crates/ty_module_resolver/src/resolve.rs:293
↓ 18 callersMethodfinish
(self)
crates/ty_python_core/src/place.rs:419
↓ 18 callersMethodformat
Whether to enable concise diagnostic output or not.
crates/ruff_db/src/diagnostic/mod.rs:1471
↓ 18 callersMethodgeneric_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:259
↓ 18 callersMethodhas_leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:272
↓ 18 callersMethodinference_flags
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:10566
↓ 18 callersMethodinto_iter
(self)
crates/ty_site_packages/src/lib.rs:255
↓ 18 callersMethodis_file
(self)
crates/ruff_db/src/system.rs:305
↓ 18 callersMethodis_language_services_disabled
(&self)
crates/ty_server/src/session/settings.rs:39
↓ 18 callersMethodis_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2318
↓ 18 callersMethodis_triple_quoted
Returns `true` if the current f-string is a triple-quoted f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:75
↓ 18 callersMethodkind
(&self)
crates/ty_python_core/src/builder.rs:4980
↓ 18 callersMethodnode_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.rs:439
↓ 18 callersMethodopen
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:629
↓ 18 callersMethodp
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 callersFunctionpredicate
(index: usize)
crates/ty_python_core/src/narrowing_constraints.rs:425
↓ 18 callersMethodprefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:912
↓ 18 callersMethodpush
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:465
↓ 18 callersFunctionrender_docstring
(raw: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:819
↓ 18 callersMethodreport_diagnostic
( &self, context: &InferContext<'db, '_>, node: ast::AnyNodeRef, callable_ty:
crates/ty_python_semantic/src/types/call/bind.rs:7116
↓ 18 callersMethodsum
(iter: I)
crates/ruff_text_size/src/size.rs:216
↓ 18 callersMethodtry_call_dunder
Look up a dunder method on the meta-type of `self` and call it. Returns an `Err` if the dunder method can't be called, or the given arguments are not
crates/ty_python_semantic/src/types.rs:5451
↓ 18 callersMethodvendored
(&self)
crates/ty_module_resolver/src/resolve.rs:1748
↓ 18 callersMethodwith_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:202
↓ 18 callersMethodworkspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1398
↓ 17 callersMethodas_str
(self)
crates/ty_module_resolver/src/module.rs:357
↓ 17 callersFunctionbinding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:220
↓ 17 callersFunctioncheck_os_pathlib_single_arg_calls
We check functions that take only 1 argument, this does not apply to functions with `dir_fd` argument, because `dir_fd` is not supported by pathlib,
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:53
↓ 17 callersFunctioncreate_typevar
(db: &'db dyn Db, name: &'static str)
crates/ty_python_semantic/src/types/constraints.rs:7031
↓ 17 callersFunctiondelete_stmt
Return the [`Edit`] to use when deleting a [`Stmt`]. In some cases, this is as simple as deleting the [`TextRange`] of the [`Stmt`] itself. However,
crates/ruff_linter/src/fix/edits.rs:39
↓ 17 callersMethoddisplay
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/display.rs:605
↓ 17 callersMethoddrain
(&mut self, range: R)
crates/ruff_index/src/vec.rs:42
↓ 17 callersMethodexplicit_extra_items
Returns extra items only when they were explicitly declared. An implicitly open `TypedDict` returns `None` here because its hidden items are not dire
crates/ty_python_semantic/src/types/typed_dict.rs:93
↓ 17 callersMethodextension
(&self)
crates/ty_module_resolver/src/path.rs:838
↓ 17 callersMethodfirst_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1088
↓ 17 callersMethodformat
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callersMethodin_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:408
↓ 17 callersFunctionindentation_at_offset
Extract the leading indentation from a line.
crates/ruff_python_trivia/src/whitespace.rs:5
↓ 17 callersMethodinsert
(mut self, insert: impl Into<Name>)
crates/ty_ide/src/completion.rs:516
↓ 17 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:11065
↓ 17 callersMethodinto_iter
(self)
crates/ruff_linter/src/registry/rule_set.rs:337
↓ 17 callersMethodis_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callersMethodis_ipynb
(self)
crates/ruff_python_ast/src/lib.rs:148
↓ 17 callersMethoditer_all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:652
↓ 17 callersMethodlen
(&self)
crates/ruff_db/src/parsed.rs:477
↓ 17 callersMethodlen
Returns the number of rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; assert_eq!(RuleSet::empty().len(), 0); as
crates/ruff_linter/src/registry/rule_set.rs:181
↓ 17 callersMethodname
(self, db: &'db dyn Db, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/scope.rs:57
↓ 17 callersMethodnode
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1442
↓ 17 callersMethodnode_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callersMethodparamspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:883
↓ 17 callersMethodpop
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:6720
↓ 17 callersMethodprefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:19
↓ 17 callersMethodremove_file
(self, db: &mut dyn Db, file: File)
crates/ty_project/src/lib.rs:595
↓ 17 callersFunctionrename
Perform a rename operation on the symbol at the given position. Returns all locations that need to be updated with the new name.
crates/ty_ide/src/rename.rs:51
↓ 17 callersMethodsearch
Returns a sequence of symbols that matches the given query.
crates/ty_ide/src/symbols.rs:152
↓ 17 callersMethodshrink_to_fit
(&mut self)
crates/ty_python_semantic/src/types/diagnostic.rs:1314
↓ 17 callersFunctionsite_packages_directories_from_sys_prefix
Attempt to retrieve the `site-packages` directories associated with a given Python installation. The location of the `site-packages` directories can
crates/ty_site_packages/src/lib.rs:1597
↓ 17 callersMethodsuffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:927
↓ 17 callersMethodsystem
(&self)
crates/ruff_db/src/system/test.rs:90
↓ 17 callersMethodtry_upcast_to_callable
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:44
↓ 17 callersMethodtype_argument
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:8815
↓ 17 callersMethodvisit_body
(&mut self, body: &'db [ast::Stmt])
crates/ty_ide/src/symbols.rs:817
↓ 17 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:383
↓ 16 callersMethodadd_binding
Add a binding for the given definition. Returns the result of the `infer_value_ty` closure, which is called with the declared type as type context.
crates/ty_python_semantic/src/types/infer/builder.rs:1238
↓ 16 callersMethodadd_python_cell
(&mut self, content: &str)
crates/ty_server/tests/e2e/notebook.rs:596
↓ 16 callersMethodas_code
Access the resulting code, borrowing the result
crates/ruff_formatter/src/lib.rs:414
↓ 16 callersMethodas_function_def
Return the [`ast::StmtFunctionDef`] of the definition, if it's a function definition.
crates/ruff_python_semantic/src/definition.rs:174
↓ 16 callersMethodas_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:399
↓ 16 callersMethodas_system
(&self)
crates/ty_test/src/db.rs:330
↓ 16 callersMethodas_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1558
↓ 16 callersMethodassert_progressing
(&mut self, p: &Parser)
crates/ruff_python_parser/src/parser/progress.rs:35
↓ 16 callersMethodbuild
(self)
crates/ty_python_semantic/src/db.rs:211
↓ 16 callersFunctioncatch_unwind
Invokes a closure, capturing and returning the cause of an unwinding panic if one occurs. ### Thread safety This is implemented by installing a cust
crates/ruff_db/src/panic.rs:145
↓ 16 callersMethodcurrent_expressions
Returns an [`Iterator`] over the current expression hierarchy, from the current [`Expr`] through to any parents.
crates/ruff_python_semantic/src/model.rs:1487
↓ 16 callersMethoddefault_specialization
Returns the default specialization for this class. For static classes, this applies default type arguments. For dynamic classes, this returns a non-g
crates/ty_python_semantic/src/types/class.rs:620
↓ 16 callersMethodfiles
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:688
↓ 16 callersMethodfocus_range
Returns the [`FileRange`] of the function's name.
crates/ty_python_semantic/src/types/function.rs:404
↓ 16 callersMethodget
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:413
↓ 16 callersMethodinto_inner
(self)
crates/ty_python_semantic/src/types/callable.rs:659
↓ 16 callersMethodis_global
Returns `true` if this is the id of the global scope
crates/ruff_python_semantic/src/scope.rs:252
↓ 16 callersMethodis_global
(self)
crates/ty_python_core/src/scope.rs:94
↓ 16 callersMethodis_literal_expr
Returns `true` if the expression is a literal expression. A literal expression is either a string literal, bytes literal, integer, float, complex num
crates/ruff_python_ast/src/nodes.rs:63
← previousnext →701–800 of 27,349, ranked by callers