MCPcopy Create free account

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

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

↓ 63 callersMethodto_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/subclass_of.rs:239
↓ 62 callersMethodas_bytes
Returns the remaining input as byte slice.
crates/ruff_python_trivia/src/cursor.rs:35
↓ 62 callersMethodinsert
Inserts `rule` into the set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let mut set = RuleSet::empty(); assert!(!set.contains
crates/ruff_linter/src/registry/rule_set.rs:207
↓ 62 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/callable.rs:711
↓ 62 callersMethodpush
(&mut self, definition: Definition<'db>)
crates/ty_python_core/src/definition.rs:277
↓ 61 callersMethodappend
For given `line` inserts `string` with `style` after old content of that line, adding lines if needed
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:94
↓ 61 callersMethodrange
(&self)
crates/ty_ide/src/lib.rs:203
↓ 60 callersMethodextend
(&mut self, other: &TypeCheckDiagnostics)
crates/ty_python_semantic/src/types/context.rs:104
↓ 60 callersMethodimporter
The [`Importer`] for the current file, which enables importing of other modules.
crates/ruff_linter/src/checkers/ast/mod.rs:519
↓ 60 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:147
↓ 60 callersMethodpush
(&mut self, context: InterpolatedStringContext)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:131
↓ 60 callersMethodrange
(&self)
crates/ty_python_semantic/src/suppression/parser.rs:214
↓ 59 callersMethodfile
Returns the file containing the class definition.
crates/ty_python_semantic/src/types/class.rs:700
↓ 59 callersMethodline_start
(mut self, line_start: usize)
crates/ruff_annotate_snippets/src/snippet.rs:118
↓ 59 callersMethodlock
(mut self)
crates/ty/src/printer.rs:138
↓ 59 callersMethodsource
(&self)
crates/ruff_python_formatter/src/context.rs:57
↓ 59 callersMethodto_owned
(&self)
crates/ty_ide/src/symbols.rs:274
↓ 58 callersMethodclone
(this: &Self)
crates/ruff_server/src/session/request_queue.rs:154
↓ 58 callersMethodidentity
Get the identity of this bound typevar occurrence. This includes the source-level typevar, binding context, `ParamSpec` attribute, and freshness nonc
crates/ty_python_semantic/src/types/typevar.rs:907
↓ 57 callersMethodcount
(&self)
crates/ruff_formatter/src/format_element/tag.rs:354
↓ 57 callersMethodcurrent_token_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:374
↓ 57 callersMethodget
Returns the [id](BindingId) of the binding bound to the given name.
crates/ruff_python_semantic/src/scope.rs:73
↓ 57 callersMethodorigin
(mut self, origin: &'a str)
crates/ruff_annotate_snippets/src/snippet.rs:123
↓ 57 callersFunctionplace_table
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:84
↓ 57 callersMethodto_usize
Returns current raw `offset` as usize. # Examples ```rust # use ruff_text_size::*; assert_eq!(TextSize::from(4).to_usize(), 4); ```
crates/ruff_text_size/src/size.rs:90
↓ 56 callersMethoditer
(&self)
crates/ruff_python_semantic/src/globals.rs:55
↓ 56 callersFunctionparse
Parse the given Python source code using the specified [`ParseOptions`]. This function is the most general function to parse Python code. Based on th
crates/ruff_python_parser/src/lib.rs:281
↓ 56 callersMethodpush
(&mut self, data: T)
crates/ruff_index/src/vec.rs:62
↓ 56 callersMethodreport_diagnostic_if_enabled
Return a [`DiagnosticGuard`] for reporting a diagnostic if the corresponding rule is enabled. The guard derefs to a [`Diagnostic`], so it can be used
crates/ruff_linter/src/checkers/ast/mod.rs:449
↓ 55 callersMethodinsert
Insert a file path into the module imports.
crates/ruff_graph/src/lib.rs:63
↓ 55 callersMethodis_empty
Returns `true` if the module imports are empty.
crates/ruff_graph/src/lib.rs:73
↓ 55 callersMethodresolve_type_alias
If this type is a `Type::TypeAlias`, recursively resolves it to its underlying value type. Otherwise, returns `self` unchanged.
crates/ty_python_semantic/src/types.rs:1568
↓ 55 callersMethodsyntax
Returns the syntax node represented by this parsed output.
crates/ruff_python_parser/src/lib.rs:396
↓ 54 callersMethodlen
Returns the number of module imports.
crates/ruff_graph/src/lib.rs:78
↓ 54 callersFunctionstring_literal
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:11
↓ 53 callersMethodborrow_mut
(&mut self)
crates/ruff_index/src/vec.rs:117
↓ 53 callersMethodnode
Return the original [`ast::StmtClassDef`] node associated with this class ## Note Only call this function from queries in the same file or your query
crates/ty_python_semantic/src/types/class/static_literal.rs:403
↓ 53 callersMethodor_else
Chains the placement with the given function. Returns `self` when the placement is non-[`CommentPlacement::Default`]. Otherwise, calls the function w
crates/ruff_python_formatter/src/comments/visitor.rs:507
↓ 53 callersMethodpush_str
(&mut self, literal: &str)
crates/ty_python_semantic/src/types/infer/builder.rs:10956
↓ 53 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:644
↓ 52 callersMethodcontext
(&self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:43
↓ 52 callersMethodexpression_type
Get the already-inferred type of an expression node, or Unknown.
crates/ty_python_semantic/src/types/infer/builder.rs:769
↓ 52 callersMethodfile
(&self)
crates/ty_ide/src/lib.rs:142
↓ 52 callersMethodfirst
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the file is at the end of the file.
crates/ruff_python_trivia/src/cursor.rs:46
↓ 52 callersMethodfirst
(&self)
crates/ruff_index/src/slice.rs:44
↓ 52 callersMethodjoin
(self, other: Self)
crates/ty_python_semantic/src/types/variance.rs:22
↓ 52 callersMethodpop
(&mut self)
crates/ruff_python_ast/src/name.rs:404
↓ 52 callersMethodvariables
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/generics.rs:511
↓ 51 callersMethodkind
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:525
↓ 51 callersMethodstatement
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/model.rs:1622
↓ 51 callersMethodwith_range
(value: T, source: ValueSource, range: TextRange)
crates/ruff_ranged_value/src/lib.rs:154
↓ 50 callersMethodas_slice
(&self)
crates/ty_python_semantic/src/types/callable.rs:655
↓ 50 callersMethodentry
(&mut self, item: &dyn FmtDetailed<'db>)
crates/ty_python_semantic/src/types/display.rs:381
↓ 50 callersMethodinto_iter
(self)
crates/ty_ide/src/lib.rs:111
↓ 50 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11009
↓ 50 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11004
↓ 50 callersFunctionparse_module
Parse a full Python module usually consisting of multiple lines. This is a convenience function that can be used to parse a full Python program witho
crates/ruff_python_parser/src/lib.rs:112
↓ 50 callersMethodpeek
Returns the next [`Token`] in the iterator without consuming it.
crates/ruff_python_ast/src/token/tokens.rs:379
↓ 49 callersMethodfile
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:632
↓ 49 callersMethodget
Return the [`Language`] for the given file.
crates/ruff_linter/src/settings/types.rs:498
↓ 49 callersMethodinto_iter
(self)
crates/ruff_index/src/vec.rs:141
↓ 48 callersMethodget
Get the symbol info for the symbol identified by the given ID. Returns `None` when the given ID does not reference a symbol in this collection.
crates/ty_ide/src/symbols.rs:130
↓ 48 callersMethoditems
Bug in Clippy? Sizeof Arguments is 16
crates/ruff_formatter/src/arguments.rs:65
↓ 48 callersMethodlast
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the file is at the end of the file.
crates/ruff_python_trivia/src/cursor.rs:60
↓ 48 callersMethodlen
Returns the total number of symbols in this collection.
crates/ty_ide/src/symbols.rs:140
↓ 48 callersMethodparent
(&self)
crates/ruff_db/src/system/path.rs:168
↓ 48 callersFunctionwalk_expr
(visitor: &mut V, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:365
↓ 48 callersMethodwrite_file
( &mut self, path: impl AsRef<SystemPath>, content: &str, )
crates/ty_ide/src/lib.rs:437
↓ 47 callersMethodextend
Extend the module imports with additional file paths.
crates/ruff_graph/src/lib.rs:68
↓ 47 callersMethodparameters
Return the parameters in this signature.
crates/ty_python_semantic/src/types/signatures.rs:879
↓ 47 callersMethodremove
(&mut self, file: File)
crates/ty_project/src/files.rs:226
↓ 47 callersFunctionsetup
(setup_files: F)
crates/ty/tests/file_watching.rs:374
↓ 47 callersMethodto_specialized_instance
( self, db: &'db dyn Db, specialization: T, )
crates/ty_python_semantic/src/types/class/known.rs:1094
↓ 46 callersFunctionany
(exp)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM111.py:121
↓ 46 callersMethodbound_or_constraints
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/typevar.rs:240
↓ 46 callersFunctioncall
(checker: &Checker, func: &Expr)
crates/ruff_linter/src/rules/pandas_vet/rules/call.rs:169
↓ 46 callersMethoddangling
Returns the [dangling comments](self#dangling-comments) of `node`
crates/ruff_python_formatter/src/comments/mod.rs:299
↓ 46 callersMethodfilter
Apply arbitrary filtering to completions.
crates/ty_ide/src/completion.rs:10850
↓ 46 callersMethodidentifier
Returns the identifier of the command.
crates/ruff_server/src/server.rs:305
↓ 46 callersMethodkind
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:283
↓ 46 callersMethodline_position
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:141
↓ 46 callersFunctionresolve_module_confident
Resolves a module name to a module, without desperate resolution available. This is appropriate for resolving a `KnownModule`, or cases where for wha
crates/ty_module_resolver/src/resolve.rs:73
↓ 46 callersFunctionuse_def_map
(db: &'db dyn Db, scope: ScopeId<'db>)
crates/ty_python_core/src/lib.rs:97
↓ 45 callersMethodappend
(self, x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:15
↓ 45 callersMethodcontains
(&self, key: &K)
crates/ty_python_core/src/frozen.rs:259
↓ 45 callersMethodname
(self)
crates/ty_python_semantic/src/types/class.rs:251
↓ 45 callersMethodsignatures
Return the signatures of this bound method type. If the bound method type is overloaded, it may have multiple signatures.
crates/ty_python_semantic/src/types/method.rs:287
↓ 45 callersMethodskip_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:793
↓ 44 callersMethodas_string_literal
(self)
crates/ty_python_semantic/src/types.rs:1727
↓ 44 callersMethodformat
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:482
↓ 44 callersMethodget_or_import_symbol
Generate an [`Edit`] to reference the given symbol. Returns the [`Edit`] necessary to make the symbol available in the current scope along with the bo
crates/ruff_linter/src/importer/mod.rs:273
↓ 44 callersFunctionget_result
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, )
crates/mdtest/src/matcher.rs:576
↓ 44 callersMethodis_starred_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2614
↓ 44 callersMethoditer
Returns an iterator over the matched parameters.
crates/ty_python_semantic/src/types/call/bind.rs:5628
↓ 44 callersMethodlabel
(mut self, label: &'a str)
crates/ruff_annotate_snippets/src/snippet.rs:164
↓ 44 callersMethodnode
( self, db: &dyn Db, file: File, module: &'ast ParsedModuleRef, )
crates/ty_python_semantic/src/types/function.rs:352
↓ 44 callersFunctionparse
Parse the Markdown `source` as a test suite with given `title`. `validate_config` is invoked once for every literally-declared `toml` config block (a
crates/mdtest/src/parser.rs:25
↓ 44 callersMethodstatic_class_literal
Returns the statement-defined class literal and specialization for this class. For a non-generic class, this is the class itself. For a generic alias,
crates/ty_python_semantic/src/types/class.rs:1076
↓ 43 callersMethodget
Returns the [`OverloadLiteral`] representing this matching overload.
crates/ty_python_semantic/src/types/call/bind.rs:7820
↓ 43 callersMethodget
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
← previousnext →201–300 of 27,349, ranked by callers