MCPcopy Create free account

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

Functions28,707 in github.com/astral-sh/ruff

↓ 9 callersMethodraw_value_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:82
↓ 9 callersMethodremove_directory
Deletes the directory at `path`. ## Errors If the directory is not empty The `path` is not a directory The `path` does not exist
crates/ruff_db/src/system/memory_fs.rs:337
↓ 9 callersFunctionremove_file
()
crates/ruff_db/src/system/memory_fs.rs:971
↓ 9 callersMethodroot
(&self)
crates/ty_server/tests/e2e/main.rs:1532
↓ 9 callersFunctionrule
Explain a `Rule` to the user.
crates/ruff/src/commands/rule.rs:101
↓ 9 callersMethodrun
(mut self)
crates/ty_server/src/server.rs:162
↓ 9 callersMethodscope
(&self, id: FileScopeId)
crates/ty_python_core/src/lib.rs:428
↓ 9 callersMethodsecondary_code_or_id
Returns the secondary code for the diagnostic if it exists, or the lint name otherwise. This is a common pattern for Ruff diagnostics, which want to
crates/ruff_db/src/diagnostic/mod.rs:441
↓ 9 callersFunctionsequence_pattern_type_builder
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/match_pattern.rs:120
↓ 9 callersMethodsettings
(&self)
crates/ty_test/src/db.rs:56
↓ 9 callersMethodshow_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ty_server/src/session/client.rs:193
↓ 9 callersMethodshow_fix_status
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1568
↓ 9 callersMethodsite_packages_paths
( &self, system: &dyn System, )
crates/ty_site_packages/src/lib.rs:379
↓ 9 callersFunctionskip_chars
(src: str, pos: Pos, chars: Iterable[str])
crates/ruff_benchmark/resources/tomllib/_parser.py:232
↓ 9 callersFunctionsoft_line_break_or_space
()
crates/ruff_formatter/src/builders.rs:190
↓ 9 callersMethodsource_location
( &self, offset: TextSize, position_encoding: PositionEncoding, )
crates/ruff_source_file/src/lib.rs:44
↓ 9 callersMethodsplit_around_star
Return the patterns before and after the starred element.
crates/ty_python_core/src/predicate.rs:173
↓ 9 callersFunctiontest_helper
(source: &str, expected: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_return_statements.rs:105
↓ 9 callersFunctiontext
Creates a text from a dynamic string. This is done by allocating a new string internally.
crates/ruff_formatter/src/builders.rs:343
↓ 9 callersMethodtext_len
Returns the length of the indentation in bytes. # Panics If the indentation is longer than 4GB.
crates/ruff_python_formatter/src/string/docstring.rs:1734
↓ 9 callersMethodtext_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:64
↓ 9 callersMethodtext_len
(self)
crates/ruff_python_ast/src/str_prefix.rs:39
↓ 9 callersMethodto_module_path
(&self)
crates/ty_module_resolver/src/path.rs:581
↓ 9 callersMethodtruncated_display
Return a truncated snippet for user-facing display.
crates/ruff_linter/src/fix/snippet.rs:27
↓ 9 callersMethodtry_call_dunder_with_policy
Same as `try_call_dunder`, but allows specifying a policy for the member lookup. In particular, this allows to specify `MemberLookupPolicy::MRO_NO_OBJ
crates/ty_python_semantic/src/types.rs:6495
↓ 9 callersMethodtry_map
A fallible version of [`UnionType::map`]. For each element in `self`, `transform_fn` is called on that element. If `transform_fn` returns `Some()` fo
crates/ty_python_semantic/src/types/set_theoretic.rs:227
↓ 9 callersMethodtry_register_static_roots
Registers file roots for all non-dynamically discovered search paths.
crates/ty_module_resolver/src/resolve.rs:851
↓ 9 callersMethodtry_set_optional_fix
( &mut self, func: impl FnOnce() -> anyhow::Result<Option<Fix>>, )
crates/ruff_linter/src/checkers/ast/mod.rs:3743
↓ 9 callersMethodtyping_importer
Create a [`TypingImporter`] that will import `member` from either `typing` or `typing_extensions`. On Python <`version_added_to_typing`, `member` is
crates/ruff_linter/src/checkers/ast/mod.rs:640
↓ 9 callersFunctionupdate_file
Updates the content of a file and ensures that the last modified file time is updated.
crates/ty/tests/file_watching.rs:547
↓ 9 callersFunctionvendored_path_to_file
( db: &dyn Db, path: impl AsRef<VendoredPath>, )
crates/ruff_db/src/files.rs:51
↓ 9 callersFunctionwalk_pattern
(visitor: &mut V, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:760
↓ 9 callersMethodwarning
Override the output style for [warnings][crate::Level::WARNING]
crates/ruff_annotate_snippets/src/renderer/mod.rs:216
↓ 9 callersFunctionworkspace_case
()
crates/ty/tests/cli/uv_workspace.rs:13
↓ 9 callersMethodwrite
Write the notebook back to the given [`Write`] implementer.
crates/ruff_notebook/src/notebook.rs:461
↓ 9 callersMethodwrite_files
(&self, files: impl IntoIterator<Item = (SystemPathBuf, &'a str)>)
crates/ruff_db/src/system/os/ignore.rs:62
↓ 8 callersMethod__init__
(self, foo)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:332
↓ 8 callersMethodabsolute
Makes a path absolute and normalizes it without accessing the file system. Adapted from [cargo](https://github.com/rust-lang/cargo/blob/fede83ccf9734
crates/ruff_db/src/system/path.rs:447
↓ 8 callersMethodadd
Attempts to adds the given completion to this collection. When added, `true` is returned. This might not add the completion for a variety of reasons
crates/ty_ide/src/completion.rs:244
↓ 8 callersMethodadd
(x, y)
crates/ruff_linter/resources/test/fixtures/refurb/FURB118.py:47
↓ 8 callersFunctionadd_argument
Generic function to add arguments or keyword arguments to function calls. The new argument will be inserted before the first existing keyword argumen
crates/ruff_linter/src/fix/edits.rs:274
↓ 8 callersMethodafter
Returns a slice of tokens after the given [`TextSize`] offset. If the given offset is between two tokens, the returned slice will start from the foll
crates/ruff_python_ast/src/token/tokens.rs:174
↓ 8 callersMethodall_rules
Return all matching rules, regardless of rule group filters like preview and deprecated.
crates/ruff_linter/src/rule_selector.rs:260
↓ 8 callersMethodapplies
Return [`true`] if this [`Fix`] should be applied with at a given [`Applicability`].
crates/ruff_diagnostics/src/fix.rs:163
↓ 8 callersMethodas_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:584
↓ 8 callersMethodas_fixed_length
Returns the inner fixed-length tuple if this is a `Tuple::Fixed` variant.
crates/ty_python_semantic/src/types/tuple.rs:2346
↓ 8 callersMethodas_ipy_notebook
(&self)
crates/ruff_linter/src/source_kind.rs:34
↓ 8 callersMethodas_str
(&self)
crates/ruff_python_ast/src/name.rs:96
↓ 8 callersMethodas_string
(self)
crates/ty_python_semantic/src/types/literal.rs:203
↓ 8 callersFunctionattribute_scopes
Returns all attribute assignments as scope IDs for a specific class body scope. Only call this when doing type inference on the same file as `class_b
crates/ty_python_core/src/lib.rs:175
↓ 8 callersMethodbase
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:49
↓ 8 callersMethodbinary_search
(&self, value: &T)
crates/ruff_index/src/slice.rs:121
↓ 8 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured.rs:1100
↓ 8 callersMethodbindings
Returns a tuple of the name and ID of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:103
↓ 8 callersMethodblock_comments
Given a [`CommentRanges`], determine which comments are grouped together in "comment blocks". A "comment block" is a sequence of consecutive own-line
crates/ruff_python_trivia/src/comment_ranges.rs:157
↓ 8 callersMethodbool
Determine whether instances of this class are always truthy, always falsy, or have an ambiguous truthiness. Returns `None` for `KnownClass::Tuple`, s
crates/ty_python_semantic/src/types/class/known.rs:181
↓ 8 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:3175
↓ 8 callersFunctioncheck_display_graph
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, set: ConstraintSet<'db, 'c>
crates/ty_python_semantic/src/types/constraints.rs:8078
↓ 8 callersMethodclass_member_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, po
crates/ty_python_semantic/src/types.rs:3195
↓ 8 callersMethodclear_salsa_events
Clears the salsa events.
crates/ty_module_resolver/src/db.rs:84
↓ 8 callersMethodclear_salsa_events
Clears the salsa events. ## Panics If there are any pending salsa snapshots.
crates/ty_python_semantic/src/db.rs:125
↓ 8 callersFunctioncommand_with_uv
(case: &CliTest, virtual_env: Option<&Path>)
crates/ty/tests/cli/uv_workspace.rs:52
↓ 8 callersMethodcurrent_statement_id
Return the [`NodeId`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1519
↓ 8 callersMethoddefault_string_flags
Return the default string flags a generated `StringLiteral` node should use, given where we are in the AST.
crates/ruff_linter/src/checkers/ast/mod.rs:373
↓ 8 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:55
↓ 8 callersFunctiondeserialize_fixture
(content: &str)
crates/ruff_server/src/session/options.rs:522
↓ 8 callersMethoddocument_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ruff_server/tests/e2e/main.rs:785
↓ 8 callersFunctiondocument_symbols
Get all document symbols for a file with the given options.
crates/ty_ide/src/document_symbols.rs:6
↓ 8 callersFunctiondocumentation_trim
Normalizes tabs and trims a docstring as specified in PEP-0257 See: <https://peps.python.org/pep-0257/#handling-docstring-indentation>
crates/ty_ide/src/docstring.rs:89
↓ 8 callersMethoddownstream_constructor_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:282
↓ 8 callersMethodeat_char
(&mut self, c: char)
crates/ruff_python_parser/src/lexer/cursor.rs:104
↓ 8 callersFunctionempty_line
()
crates/ruff_formatter/src/builders.rs:133
↓ 8 callersMethodenabled
(&self, rule: Rule)
crates/ruff_linter/src/settings/rule_table.rs:27
↓ 8 callersMethoderror
()
crates/ruff_linter/resources/test/fixtures/flake8_raise/RSE102.py:58
↓ 8 callersFunctionexactly_one_argument_with_matching_function
( name: &str, func: &Expr, args: &'a [Expr], keywords: &[Keyword], )
crates/ruff_linter/src/rules/flake8_comprehensions/helpers.rs:3
↓ 8 callersMethodexecution_context
Return the [`ExecutionContext`] of the current scope.
crates/ruff_python_semantic/src/model.rs:2080
↓ 8 callersMethodexpression_scope_id
(&self, expression: &E)
crates/ty_python_core/src/lib.rs:403
↓ 8 callersMethodextend
(&mut self, other: Self)
crates/ty_site_packages/src/lib.rs:105
↓ 8 callersMethodextend_back
(&mut self, elements: &'a [FormatElement])
crates/ruff_formatter/src/printer/queue.rs:105
↓ 8 callersFunctionf
(*args, **kwargs)
crates/ruff_python_formatter/resources/test/fixtures/ruff/expression/call.py:4
↓ 8 callersFunctionf
()
crates/ruff_python_parser/resources/valid/other/decorator.py:12
↓ 8 callersMethodfallback
Returns the descriptor's declared return type and kind despite the invalid call.
crates/ty_python_semantic/src/types.rs:595
↓ 8 callersMethodfile
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:329
↓ 8 callersMethodfile_expression_type
Get the type of an expression from any scope in the same file. If the expression is in the current scope, and we are inferring the entire scope, just
crates/ty_python_semantic/src/types/infer/builder.rs:989
↓ 8 callersMethodfile_stem
(&self)
crates/ruff_db/src/system/path.rs:290
↓ 8 callersMethodfind_legacy_typevars
Locates any legacy `TypeVar`s in this type, and adds them to a set. This is used to build up a generic context from any legacy `TypeVar`s that appear
crates/ty_python_semantic/src/types.rs:7964
↓ 8 callersMethodfinish
Finish the code example by generating any final actions if applicable. This typically adds an action when the end of a code example coincides with th
crates/ruff_python_formatter/src/string/docstring.rs:743
↓ 8 callersMethodfinite_alternative_union
Return the exact finite alternative union represented by this intersection, if available.
crates/ty_python_semantic/src/types/set_theoretic.rs:815
↓ 8 callersMethodflags
(self)
crates/ty_python_semantic/src/types/literal.rs:105
↓ 8 callersMethodflush_pending_line
Flushes content buffered for the current line.
crates/ty_ide/src/docstring/markdown/general.rs:307
↓ 8 callersMethodfmt
(&self, item: &Identifier, f: &mut PyFormatter)
crates/ruff_python_formatter/src/other/identifier.rs:11
↓ 8 callersFunctionformat
( document: &TextDocument, source_type: SourceType, formatter_settings: &FormatterSettings, pa
crates/ruff_server/src/format.rs:47
↓ 8 callersMethodformat
(&self)
crates/ruff_python_formatter/src/statement/mod.rs:74
↓ 8 callersMethodformatted
Converts every item to an object that knows how to format it.
crates/ruff_python_formatter/src/shared_traits.rs:70
↓ 8 callersMethodfull_line_range
Computes the range of this `offset`s line. The range starts at the beginning of the line and goes up to, and including, the new line character at the
crates/ruff_source_file/src/line_ranges.rs:98
↓ 8 callersMethodfull_lines_range
Computes the range of all lines that this `range` covers. The range starts at the beginning of the line at `range.start()` and goes up to, and includ
crates/ruff_source_file/src/line_ranges.rs:193
↓ 8 callersFunctionfull_range
(input: &str)
crates/ty_server/tests/e2e/code_actions.rs:35
↓ 8 callersMethodget_or_infer_expression
Return an already-inferred type for `expr`, or infer it with `tcx` if needed. This is used in places where an expression may already have been inferr
crates/ty_python_semantic/src/types/infer/builder.rs:941
↓ 8 callersMethodglobal_scope
Returns a reference to the global [`Scope`].
crates/ruff_python_semantic/src/model.rs:1529
↓ 8 callersMethodhas_dataclass_param
Checks if the given dataclass parameter flag is set for this class. This checks both the `dataclass_params` and `transformer_params`.
crates/ty_python_semantic/src/types/class/static_literal.rs:1102
← previousnext →1,501–1,600 of 28,707, ranked by callers