MCPcopy Create free account

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

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

↓ 10 callersMethodlen
(&self)
crates/ruff_source_file/src/newlines.rs:326
↓ 10 callersMethodmake_key
Retrieve the original key that describes this document query.
crates/ruff_server/src/session/index.rs:546
↓ 10 callersMethodmaterialize
Applies both constraint kinds between the place's last materialized nodes and `target`. The place's node must be an ancestor of `target`. After mater
crates/ty_python_core/src/use_def.rs:1819
↓ 10 callersMethodmay_be_true
(self)
crates/ty_python_core/src/lib.rs:1005
↓ 10 callersMethodmetaclass
Returns the metaclass of this class.
crates/ty_python_semantic/src/types/class.rs:736
↓ 10 callersMethodmetadata
(&self, path: impl AsRef<VendoredPath>)
crates/ruff_db/src/vendored.rs:74
↓ 10 callersMethodnext_index
(&self)
crates/ruff_index/src/vec.rs:69
↓ 10 callersMethodno_name
Do not show the [`Level`]s name Useful for: - Another layer of the application will include the level (e.g. when rendering errors) - [`Message`]s tha
crates/ruff_annotate_snippets/src/level.rs:211
↓ 10 callersFunctionnormalized
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1377
↓ 10 callersMethodopposite
(self)
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:67
↓ 10 callersFunctionother
(b)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/dummy_implementations.py:7
↓ 10 callersMethodown_class_member
Returns the inferred type of the class member named `name`. Only bound members or those marked as `ClassVars` are considered. You must provide the `i
crates/ty_python_semantic/src/types/class.rs:1928
↓ 10 callersMethodparse_body
Parses the body of the given [`Clause`]. This could either be a single statement that's on the same line as the clause header or an indented block.
crates/ruff_python_parser/src/parser/statement.rs:3108
↓ 10 callersMethodparse_identifier
Parses an identifier. For an invalid identifier, the `id` field will be an empty string. See: <https://docs.python.org/3/reference/expressions.html#
crates/ruff_python_parser/src/parser/expression.rs:501
↓ 10 callersMethodparts
Returns an iterator over the [`StringLikePart`] contained in this string-like expression.
crates/ruff_python_ast/src/expression.rs:98
↓ 10 callersMethodpath
(&self, relative_path: &str)
crates/ruff_db/src/system/os/ignore.rs:58
↓ 10 callersFunctionpending_place_state_mut
( place: ScopedPlaceId, symbol_states: &'a mut IndexVec<ScopedSymbolId, PendingPlaceState>, member
crates/ty_python_core/src/use_def.rs:2018
↓ 10 callersMethodposition_encoding
(&self)
crates/ty_server/src/session.rs:1513
↓ 10 callersFunctionpublic_test
(code: &str)
crates/ty_ide/src/symbols.rs:3277
↓ 10 callersMethodpush_trailing
Pushes a *trailing* part for `key`.
crates/ruff_python_formatter/src/comments/map.rs:146
↓ 10 callersMethodquote_style
(&self)
crates/ruff_linter/src/docstrings/mod.rs:49
↓ 10 callersMethodrange
The range from the clause keyword up to and including the final colon.
crates/ruff_python_formatter/src/statement/clause.rs:76
↓ 10 callersMethodreachable_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1259
↓ 10 callersFunctionread
()
crates/ruff_db/src/system/memory_fs.rs:913
↓ 10 callersMethodreceiver
Returns the receiver for the next step of assignment or deletion validation. Validation stays on `object_ty` for a frozen field because the generated
crates/ty_python_semantic/src/types/class/static_literal.rs:140
↓ 10 callersMethodreceiver_constraints
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2550
↓ 10 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
↓ 10 callersMethodrender
Render the docstring to the given markup format
crates/ty_ide/src/docstring.rs:30
↓ 10 callersMethodrequest_sync
Requests a background uv sync for `file` if its environment needs updating. This is a no-op for files that aren't scripts. This method cancels any in
crates/ty_project/src/uv/environments.rs:209
↓ 10 callersFunctionscript_tag
(db: &dyn SourceDb, file: File)
crates/ty_project/src/script.rs:253
↓ 10 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:459
↓ 10 callersFunctionset_expr_ctx
Set the `ctx` for `Expr::Id`, `Expr::Attribute`, `Expr::Subscript`, `Expr::Starred`, `Expr::Tuple` and `Expr::List`. If `expr` is either `Expr::Tuple`
crates/ruff_python_parser/src/parser/helpers.rs:10
↓ 10 callersMethodset_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:416
↓ 10 callersMethodsettings
Get the document settings associated with this query.
crates/ruff_server/src/session/index.rs:558
↓ 10 callersMethodshould_colorize
Returns whether to use color on this stream. Call [`Self::resolve`] first to apply the environment. In the resolved [`Self::Auto`] mode, this checks w
crates/ruff_command_line/src/color.rs:61
↓ 10 callersMethodshow_fix_status
Show fix availability when rendering.
crates/ruff_db/src/diagnostic/render.rs:2600
↓ 10 callersMethodshrink_to_fit
(&mut self)
crates/ruff_index/src/vec.rs:74
↓ 10 callersMethodsource_code
Returns the Python source code for this source kind.
crates/ruff_linter/src/source_kind.rs:105
↓ 10 callersMethodspecialize_recursive
Creates a specialization of this generic context. Panics if the length of `types` does not match the number of typevars in the generic context. If an
crates/ty_python_semantic/src/types/generics.rs:1011
↓ 10 callersMethodsplit_around_star
Return the patterns before and after the starred element.
crates/ty_python_core/src/predicate.rs:238
↓ 10 callersFunctionstr
(x)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP029_3.py:2
↓ 10 callersMethodsymbol_mut
(&mut self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:354
↓ 10 callersMethodsymbols
Iterator over all symbols in this scope.
crates/ty_python_core/src/place.rs:230
↓ 10 callersMethodsystem
(&self)
crates/ty_server/src/session.rs:207
↓ 10 callersMethodsystem
Looks up a file by its `path`. For a non-existing file, creates a new salsa [`File`] ingredient and stores it for future lookups. The operation alwa
crates/ruff_db/src/files.rs:110
↓ 10 callersFunctiontest_helper
(source: &str, expected_num_branches: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_branches.rs:264
↓ 10 callersMethodtext_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:72
↓ 10 callersMethodtoken_range
(&self)
crates/ruff_python_parser/src/lexer.rs:1379
↓ 10 callersMethodtop_materialization
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:657
↓ 10 callersMethodtruncate
(&mut self, len: usize)
crates/ruff_python_ast/src/script.rs:201
↓ 10 callersMethodtry_register_static_roots
Registers file roots for all non-dynamically discovered search paths.
crates/ty_module_resolver/src/resolve.rs:973
↓ 10 callersFunctiontyRangeToMonacoRange
(range: TyRange)
playground/ty/src/Editor/Editor.tsx:1055
↓ 10 callersMethodunparse_expr
(&mut self, ast: &Expr, level: u8)
crates/ruff_python_codegen/src/generator.rs:942
↓ 10 callersMethodup_to
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:47
↓ 10 callersMethodvalue
(self)
crates/ruff_python_formatter/src/comments/map.rs:554
↓ 10 callersMethodvirtual_file_path
Get the path for the document selected by this query, ignoring whether the file exists on disk. Returns the URI's path if this is an unsaved (untitle
crates/ruff_server/src/session/index.rs:642
↓ 10 callersFunctionvisit
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, right: EnumLi
crates/ty_python_semantic/src/types/equality.rs:1167
↓ 10 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:1791
↓ 10 callersMethodwhen_constraint_set_assignable_to_owned
Returns an _owned_ (i.e. salsa-cached) constraint set that describes when `self` is constraint-set assignable to `target`. Recursive relations are ev
crates/ty_python_semantic/src/types/relation.rs:713
↓ 10 callersMethodwith_dangling_comments
Inserts any dangling comments that should be placed immediately after the open parenthesis. For example: ```python [ # comment 1, 2, 3, ] ```
crates/ruff_python_formatter/src/expression/parentheses.rs:144
↓ 10 callersMethodwrite
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1524
↓ 10 callersMethodwrite_source_file
(&self, path: &str, contents: &[u8])
crates/ruff/src/cache.rs:1042
↓ 9 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
↓ 9 callersMethodall_end_of_scope_symbol_bindings
( &'map self, )
crates/ty_python_core/src/use_def.rs:1438
↓ 9 callersMethodapply_type_mapping
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, type_mapping: &TypeMap
crates/ty_python_semantic/src/types.rs:9918
↓ 9 callersMethodassert_no_pending_messages
(&self)
crates/ty_server/tests/e2e/main.rs:345
↓ 9 callersFunctionassert_uv_supports_script_metadata
()
crates/ty/tests/cli/scripts.rs:1721
↓ 9 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:178
↓ 9 callersMethodbase
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:49
↓ 9 callersFunctionbefore_main
()
crates/ty_wasm/src/lib.rs:45
↓ 9 callersFunctionbind_markdown_snapshot_filters
()
crates/ty_ide/src/docstring/markdown/structured/google.rs:339
↓ 9 callersMethodbinding_type
Return the inferred binding type. A missing entry is `Never` when the whole pattern cannot match. Otherwise, it is `Unknown` as defensive recovery fo
crates/ty_python_semantic/src/types/narrow.rs:235
↓ 9 callersMethodbindings_at_use
(&self, use_id: ScopedUseId)
crates/ty_python_core/src/use_def.rs:1093
↓ 9 callersMethodbump
Bumps the token source to the next non-trivia token. It pushes the given kind to the token vector with the current token range.
crates/ruff_python_parser/src/token_source.rs:165
↓ 9 callersFunctioncheck_path
( path: &Path, package: Option<PackageRoot<'_>>, locator: &Locator, stylist: &Stylist, ind
crates/ruff_linter/src/linter.rs:121
↓ 9 callersMethodclass_literal
Returns the class literal for this instance.
crates/ty_python_semantic/src/types/instance.rs:294
↓ 9 callersMethodclass_member
Look up a class-level member by name (including superclasses).
crates/ty_python_semantic/src/types/class/typed_dict.rs:1020
↓ 9 callersMethodclear
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:3531
↓ 9 callersMethodclient_capabilities
(&self)
crates/ty_server/src/session.rs:1505
↓ 9 callersMethodclose_text_document
Send a `textDocument/didClose` notification
crates/ty_server/tests/e2e/main.rs:939
↓ 9 callersMethodcmp
(&self, other: &Self)
crates/ruff_python_ast/src/node_index.rs:207
↓ 9 callersMethodcmp
(&self, other: &Self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:63
↓ 9 callersFunctioncomment_indentation_after
Determine the indentation level of an own-line comment, defined as the minimum indentation of all comments between the preceding node and the comment,
crates/ruff_python_ast/src/helpers.rs:1814
↓ 9 callersMethodcomponents
(&self)
crates/ruff_db/src/system/path.rs:253
↓ 9 callersMethodconstraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1401
↓ 9 callersMethodcontains_self
Returns `true` if this type contains a `Self` type variable.
crates/ty_python_semantic/src/types.rs:2579
↓ 9 callersMethodcurrent_scope_info_mut
(&mut self)
crates/ty_python_core/src/builder.rs:388
↓ 9 callersMethodcycle_recovery
(mut self, val: bool)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:750
↓ 9 callersFunctiondefault_aliases
(preview: PreviewMode)
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:75
↓ 9 callersMethoddiagnostic_mode
(&self)
crates/ty_server/src/session/settings.rs:17
↓ 9 callersMethodelements_slice
(&self)
crates/ty_python_semantic/src/types/tuple.rs:987
↓ 9 callersMethodenabled
(&self, rule: Rule)
crates/ruff_linter/src/settings/rule_table.rs:27
↓ 9 callersMethodenum_complement
Return the compact enum-complement view of this intersection, if it has one.
crates/ty_python_semantic/src/types/set_theoretic.rs:1065
↓ 9 callersMethodenv_var
(&self, name: &str)
crates/ty_server/src/system.rs:292
↓ 9 callersMethodextend
(&mut self, other: Self)
crates/ty_site_packages/src/lib.rs:106
↓ 9 callersFunctionextract_class_literal
Extract a `ClassLiteral` from a `Type`, handling various type forms.
crates/ty_python_semantic/src/types/ide_support.rs:2049
↓ 9 callersFunctionextract_directives
( tokens: &Tokens, flags: Flags, locator: &Locator, indexer: &Indexer, )
crates/ruff_linter/src/directives.rs:55
↓ 9 callersFunctionf
()
crates/ruff_python_parser/resources/valid/other/decorator.py:12
↓ 9 callersFunctionfile_time_now
()
crates/ruff_db/src/system.rs:372
↓ 9 callersMethodfiles
(&self)
crates/ty_module_resolver/src/db.rs:109
← previousnext →1,601–1,700 of 31,766, ranked by callers