MCPcopy Create free account

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

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

↓ 57 callersMethodexpect_single_definition
( &self, definition_key: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy, )
crates/ty_python_core/src/lib.rs:717
↓ 57 callersMethodhelp
Adds a "help" sub-diagnostic with the given message. See the closely related [`Diagnostic::info`] method for more details.
crates/ruff_db/src/diagnostic/mod.rs:190
↓ 57 callersMethodinto_iter
(self)
crates/ruff_index/src/vec.rs:141
↓ 57 callersMethoditer
(&self)
crates/ruff_python_semantic/src/globals.rs:55
↓ 57 callersMethodkeys
(&self)
crates/ruff_python_formatter/src/comments/map.rs:213
↓ 57 callersMethodmax
(self, other: Self)
crates/ty_python_semantic/src/place.rs:48
↓ 57 callersMethodname
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:9912
↓ 57 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
↓ 57 callersFunctionstring_literal
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_bandit/helpers.rs:11
↓ 56 callersMethodjoin
(slices: &[T], separator: &str)
crates/ruff_python_ast/src/name.rs:91
↓ 56 callersMethodname
(self)
crates/ty_python_semantic/src/types/class.rs:321
↓ 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:468
↓ 56 callersMethodunfold
Substitute closed types for references before exposing the body. Report whether unfolding returns exactly `Type::Recursive(self)`. An unfolded type c
crates/ty_python_semantic/src/types/recursive.rs:530
↓ 55 callersFunctionbenchmark_micro_case
(criterion: &mut Criterion, name: &str, code: &str)
crates/ruff_benchmark/benches/ty.rs:211
↓ 55 callersMethodextend
Extend the module imports with additional file paths.
crates/ruff_graph/src/lib.rs:72
↓ 55 callersMethodfile
Returns the file containing the class definition.
crates/ty_python_semantic/src/types/class.rs:860
↓ 55 callersMethodfirst
(&self)
crates/ruff_python_trivia/src/cursor.rs:52
↓ 55 callersMethodmap
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind.rs:456
↓ 55 callersMethodspecialization
(specialization: Specialization<'db>)
crates/ty_python_semantic/src/types/generics.rs:2321
↓ 55 callersFunctionwalk_expr
(visitor: &mut V, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:362
↓ 55 callersMethodwith_src_files
Specify files to be created in the `src` mock directory
crates/ty_module_resolver/src/testing.rs:132
↓ 55 callersMethodwrite_file
( &mut self, path: impl AsRef<SystemPath>, content: &str, )
crates/ty_ide/src/lib.rs:448
↓ 54 callersMethodbuild
( mut storage: ConstraintSetStorage<'_>, root: InteriorNode, source_order: SourceOrder
crates/ty_python_semantic/src/types/constraints/owned.rs:23
↓ 54 callersMethodfile
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:917
↓ 54 callersMethoditems
Bug in Clippy? Sizeof Arguments is 16
crates/ruff_formatter/src/arguments.rs:65
↓ 54 callersMethodlen
Returns the number of module imports.
crates/ruff_graph/src/lib.rs:82
↓ 54 callersMethodorigin
()
crates/ty_python_semantic/src/types/constraints/paths.rs:153
↓ 53 callersMethodas_string_literal
(self)
crates/ty_python_semantic/src/types.rs:3316
↓ 53 callersMethodfile_uri
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:852
↓ 53 callersMethodget
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3782
↓ 53 callersMethodpeek
Returns the next [`Token`] in the iterator without consuming it.
crates/ruff_python_ast/src/token/tokens.rs:378
↓ 52 callersMethodlen
Returns the total number of symbols in this collection.
crates/ty_ide/src/symbols.rs:141
↓ 52 callersMethodstatement
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/model.rs:1623
↓ 52 callersMethodstop_watch
(&mut self, matcher: M)
crates/ty/tests/file_watching.rs:120
↓ 52 callersMethoduse_def_map
(&self, scope_id: FileScopeId)
crates/ty_python_core/src/lib.rs:409
↓ 52 callersMethodwith_annotated_type
Set the annotated type for this parameter. This also marks the annotation as explicit (not inferred), so it will be displayed.
crates/ty_python_semantic/src/types/signatures.rs:6157
↓ 51 callersMethodadd
(&mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:672
↓ 51 callersMethodbound_or_constraints
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:388
↓ 51 callersMethodcurrent_token_range
(&self)
crates/ruff_python_parser/src/parser/mod.rs:397
↓ 51 callersFunctionempty
()
crates/ty_python_semantic/src/types/signatures.rs:6861
↓ 51 callersMethodis_paramspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:331
↓ 51 callersMethodis_starred_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2614
↓ 51 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
↓ 51 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/constraints.rs:1314
↓ 51 callersMethodsymbol
(&self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:266
↓ 51 callersMethodtext_len
(self)
crates/ruff_linter/src/docstrings/sections.rs:143
↓ 50 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:131
↓ 50 callersMethodis_ok
(&self)
crates/ruff_python_parser/tests/generate_inline_tests.rs:205
↓ 50 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/signatures.rs:215
↓ 50 callersMethodlines
(&self)
crates/ruff_linter/src/noqa.rs:337
↓ 49 callersMethodclass
Return the [`KnownClass`] that inhabitants of this type are instances of at runtime
crates/ty_python_semantic/src/types/method.rs:537
↓ 49 callersMethodget_mut
(&mut self, index: I)
crates/ruff_index/src/slice.rs:116
↓ 49 callersMethodis_undefined
Returns `true` if the inner place is undefined (i.e. there is no such member).
crates/ty_python_semantic/src/types/member.rs:40
↓ 49 callersMethodmessage
A text [`Element`][crate::Element] in a [`Group`][crate::Group] <div class="warning"> Text passed to this function is allowed to be styled, as such
crates/ruff_annotate_snippets/src/level.rs:124
↓ 49 callersMethodresolver_environment
(&self)
crates/ty_module_resolver/src/db.rs:73
↓ 48 callersFunctioncreate_dir_all
( paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, normalized: &Utf8Path, )
crates/ruff_db/src/system/memory_fs.rs:479
↓ 48 callersFunctioncreate_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints.rs:5198
↓ 48 callersMethodgeneric_context
Returns the generic context if this is a generic class.
crates/ty_python_semantic/src/types/class.rs:821
↓ 48 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:285
↓ 48 callersMethoditer_mro
Returns an iterator over the MRO.
crates/ty_python_semantic/src/types/class.rs:678
↓ 48 callersMethodparent
(&self)
crates/ruff_db/src/system/path.rs:182
↓ 48 callersMethodparent
(&self)
crates/ty_python_core/src/scope.rs:150
↓ 48 callersMethodposition
(&self)
crates/ruff_linter/src/noqa.rs:699
↓ 48 callersMethodsuite
Returns the module body contained in this parsed output as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:536
↓ 48 callersMethodtypevar
(self)
crates/ty_python_semantic/src/types/constraints/variables.rs:852
↓ 48 callersMethodwith_initialization_options
Set the initial client options for the test server.
crates/ty_server/tests/e2e/main.rs:1349
↓ 48 callersFunctionwrite
Writes a new baseline containing lint diagnostics with a primary source range in the project. Returns the number of entries written and the diagnosti
crates/ty_project/src/baseline.rs:163
↓ 47 callersMethodappend
(self, x)
crates/ruff_linter/resources/test/fixtures/refurb/FURB113.py:15
↓ 47 callersFunctioncall
(checker: &Checker, func: &Expr)
crates/ruff_linter/src/rules/pandas_vet/rules/call.rs:170
↓ 47 callersMethodidentifier
Returns the identifier of the command.
crates/ruff_server/src/server.rs:341
↓ 47 callersMethodmap
(self, transform: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types.rs:2331
↓ 47 callersMethodsecondary
Create a secondary annotation attached to the range of the given value in the file currently being type checked. The annotation returned has no messa
crates/ty_python_semantic/src/types/context.rs:240
↓ 46 callersMethodas_str
(self)
crates/ty_site_packages/src/lib.rs:475
↓ 46 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:2009
↓ 46 callersMethodcreate_directory_all
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:114
↓ 46 callersMethoddangling
Returns the [dangling comments](self#dangling-comments) of `node`
crates/ruff_python_formatter/src/comments/mod.rs:316
↓ 46 callersMethodinsert
Adds a typevar to this support.
crates/ty_python_semantic/src/types/constraints/support.rs:45
↓ 46 callersMethodinto_boxed_slice
(self)
crates/ty_python_core/src/definition.rs:290
↓ 46 callersMethodis_empty
Returns true if and only if this collection is empty.
crates/ty_ide/src/symbols.rs:136
↓ 46 callersMethodis_subtype_of
Return true if this type is a subtype of type `target`. See [`TypeRelation::Subtyping`] for more details.
crates/ty_python_semantic/src/types/relation.rs:399
↓ 46 callersMethoditer
(self)
crates/ty_python_semantic/src/types/class/typed_dict.rs:116
↓ 46 callersMethodkind
Returns how the place load obtains its value.
crates/ty_python_semantic/src/place_load.rs:234
↓ 46 callersMethodkind
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:280
↓ 46 callersMethodline_position
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:141
↓ 46 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
↓ 46 callersMethodprogram_file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:921
↓ 46 callersMethodreplace
(&mut self, line: usize, start: usize, end: usize, string: &str)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:118
↓ 45 callersMethodnext
(&mut self)
crates/ruff_python_ast/src/nodes.rs:308
↓ 45 callersMethodpop
Removes and returns an arbitrary typevar from this support.
crates/ty_python_semantic/src/types/constraints/support.rs:59
↓ 45 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:98
↓ 45 callersMethodskip_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:793
↓ 45 callersMethodsplit_at
Returns a pair of token slices from both before and after the given [`TextSize`] offset. If the given offset is between two tokens, the "before" slic
crates/ruff_python_ast/src/token/tokens.rs:204
↓ 44 callersMethodas_str
(self)
crates/ruff_python_ast/src/str.rs:28
↓ 44 callersFunctionget_result
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, )
crates/mdtest/src/matcher.rs:573
↓ 44 callersMethodis_always_satisfied
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints.rs:619
↓ 44 callersMethodor_default
(&self)
crates/ty_project/src/metadata/options.rs:2645
↓ 44 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
↓ 43 callersMethoddocument_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ty_server/tests/e2e/main.rs:1035
↓ 43 callersMethodget
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
↓ 43 callersFunctionglobal_scope
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:231
← previousnext →301–400 of 31,562, ranked by callers