MCPcopy Create free account

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

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

↓ 19 callersMethodsub
(mut self, sub: SubDiagnostic)
crates/ty_project/src/metadata/options.rs:2609
↓ 19 callersMethodtarget
(self, db: &'db dyn Db, parsed: &'ast ParsedModuleRef)
crates/ty_python_core/src/unpack.rs:69
↓ 19 callersMethodto_search_paths
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_module_resolver/src/settings.rs:55
↓ 19 callersFunctiontrailing
()
crates/ruff_python_formatter/src/comments/map.rs:645
↓ 19 callersMethodvisit_body
(&mut self, body: &'db [ast::Stmt])
crates/ty_ide/src/symbols.rs:837
↓ 19 callersFunctionwalk_stmt
(visitor: &mut V, stmt: &'a Stmt)
crates/ruff_python_ast/src/visitor.rs:135
↓ 19 callersMethodworkspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1563
↓ 19 callersMethodwrite_file
( &self, path: impl AsRef<SystemPath>, content: impl AsRef<str>, )
crates/ty_server/tests/e2e/main.rs:860
↓ 18 callersMethodadd_negative
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1749
↓ 18 callersMethodadd_negative_in_place
(&mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1763
↓ 18 callersMethodancestor_scopes
Returns the scopes enclosing `node`, starting with the scope containing the node itself. Like [`Self::scope`], this handles nodes inside string annot
crates/ty_python_semantic/src/semantic_model.rs:450
↓ 18 callersMethodappend
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__regression.py:109
↓ 18 callersMethodas_function_def_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:399
↓ 18 callersMethodas_str
(self)
crates/ty_module_resolver/src/module.rs:296
↓ 18 callersMethodas_str
(self)
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/private_type_parameter.rs:82
↓ 18 callersFunctionassert_file_diagnostics
(db: &TestDb, filename: &str, expected: &[&str])
crates/ty_python_semantic/src/types/infer/tests.rs:73
↓ 18 callersMethodbinding_id
Returns the [`BindingId`] if this symbol resolves to a concrete binding.
crates/ruff_python_semantic/src/model.rs:45
↓ 18 callersMethodchild_scopes
Returns an iterator over the direct child scopes of `scope`.
crates/ty_python_core/src/lib.rs:657
↓ 18 callersMethodcontains
(&self, key: &K)
crates/ty_python_core/src/frozen.rs:287
↓ 18 callersMethodcontents
Return the underlying source code.
crates/ruff_linter/src/locator.rs:106
↓ 18 callersMethodenter_node
(&mut self, node: T)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:205
↓ 18 callersMethodexit_node
(&mut self)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:213
↓ 18 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:99
↓ 18 callersMethodfinish
(&mut self)
crates/ruff_db/src/display.rs:38
↓ 18 callersMethodfirst_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1198
↓ 18 callersMethodhas_leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:290
↓ 18 callersMethodidentity_specialization
Returns a specialization of this class where each typevar is mapped to itself.
crates/ty_python_semantic/src/types/class/static_literal.rs:690
↓ 18 callersMethodinto_iter
(self)
crates/ty_site_packages/src/lib.rs:268
↓ 18 callersMethodinto_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:31
↓ 18 callersMethodis_empty
(&self)
crates/ty_python_core/src/rank.rs:73
↓ 18 callersMethodis_ipynb
(self)
crates/ruff_python_ast/src/lib.rs:153
↓ 18 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
↓ 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 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:814
↓ 18 callersMethodjoin_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:371
↓ 18 callersMethodline
Set the default line number to display
crates/ruff_annotate_snippets/src/snippet.rs:558
↓ 18 callersMethodnext
(&mut self)
crates/ruff_db/src/system/path.rs:993
↓ 18 callersMethodor_recursively_defined
Preserve recursion from both the source union and any transformed elements already added.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:746
↓ 18 callersMethodp
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 callersMethodrecursively_defined
(self)
crates/ty_python_semantic/src/types/literal.rs:59
↓ 18 callersMethodreturn_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/call.rs:378
↓ 18 callersMethodvariance_of
( self, db: &'db dyn Db, _: &ProgramEnvironment<'db>, typevar: BoundTypeVarIde
crates/ty_python_semantic/src/types/class/static_literal.rs:3577
↓ 18 callersMethodwhen_any
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:217
↓ 18 callersMethodwith_files
Write multiple files to the test directory
crates/ty_server/tests/e2e/main.rs:1638
↓ 17 callersMethodanalysis_settings
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:199
↓ 17 callersFunctionany_over_type_expanding_aliases
Searches through type aliases without forcing other lazily inferred type attributes. Revisiting a recursive alias counts as a match because its speci
crates/ty_python_semantic/src/types/visitor.rs:1094
↓ 17 callersMethodapply_uv_workspace
Applies a previously obtained uv workspace without invoking uv or checking [`Self::use_uv`]. An explicit ty configuration keeps its root; otherwise u
crates/ty_project/src/metadata.rs:231
↓ 17 callersMethodas_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:189
↓ 17 callersMethodas_path
(&self)
crates/ty_module_resolver/src/path.rs:811
↓ 17 callersMethodas_str
(self)
crates/ruff_linter/src/docstrings/mod.rs:99
↓ 17 callersMethodas_system
(&self)
crates/ty_test/src/db.rs:467
↓ 17 callersMethodas_union
(self)
crates/ty_python_semantic/src/types.rs:3271
↓ 17 callersMethodchar_column
Set the default column to display <div class="warning"> `char_column` is only be respected if [`Origin::line`] is also set. </div>
crates/ruff_annotate_snippets/src/snippet.rs:570
↓ 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 callersMethodcompletion_request
Sends a `textDocument/completion` request for the document at the given URI and position.
crates/ty_server/tests/e2e/main.rs:1127
↓ 17 callersFunctioncovering_node
Returns the node with a minimal range that fully contains `range`. If `range` is empty and falls within a parser *synthesized* node generated during
crates/ruff_python_ast/src/find_node.rs:14
↓ 17 callersFunctioncreate_typevar
(db: &'db TestDb, name: &'static str)
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:26
↓ 17 callersMethoddefinitions
Gets the definitions for this goto target. The `alias_resolution` parameter controls whether import aliases (i.e. "x" in "from a import b as x") are
crates/ty_ide/src/goto.rs:649
↓ 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 callersMethodend_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1358
↓ 17 callersMethodentry
(&self, source: &str)
crates/ty_project/src/baseline.rs:410
↓ 17 callersMethodformat
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callersMethodid
Returns the identifier for this diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:223
↓ 17 callersMethodidentity_specialization
Returns the identity specialization for this class (same as default for non-generic).
crates/ty_python_semantic/src/types/class.rs:813
↓ 17 callersMethodignore_conflicting_declarations
(self)
crates/ty_python_semantic/src/place.rs:1050
↓ 17 callersMethodin_range
Returns a slice of [`Token`] that are within the given `range`. The start and end offset of the given range should be either: 1. Token boundary 2. Ga
crates/ruff_python_ast/src/token/tokens.rs:82
↓ 17 callersMethodin_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:429
↓ 17 callersMethodinference_flags
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:12636
↓ 17 callersMethodintersect
Return a new tuple-spec builder that reflects the intersection of this tuple and another tuple, or `None` if the intersection is impossible (e.g., two
crates/ty_python_semantic/src/types/tuple.rs:3203
↓ 17 callersMethodis_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callersMethodis_eof
(self)
crates/ruff_python_ast/src/token.rs:330
↓ 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:177
↓ 17 callersMethodlower
(cls, my_field: str)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N805.py:30
↓ 17 callersMethodnode
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1198
↓ 17 callersMethodnode_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callersFunctionplace_from_declarations
Build a declared type from a [`DeclarationsIterator`]. If there is only one declaration, or all declarations declare the same type, returns `Ok(..)`.
crates/ty_python_semantic/src/place.rs:856
↓ 17 callersMethodplace_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:292
↓ 17 callersFunctionprogram_file
(db: &TestDb, file: File)
crates/ty_python_semantic/src/types/infer/tests.rs:29
↓ 17 callersMethodrange
(&self)
crates/ty_ide/src/semantic_tokens.rs:168
↓ 17 callersMethodremaining_literal_union
Expand this complement to the union of enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:791
↓ 17 callersMethodresize
Resizes this tuple to a different length, if possible. If this tuple cannot satisfy the desired minimum or maximum length, we return an error. If we r
crates/ty_python_semantic/src/types/tuple.rs:2660
↓ 17 callersMethodrest
Returns the remaining text to lex. Use [`Cursor::text_len`] to get the length of the remaining text.
crates/ruff_python_parser/src/lexer/cursor.rs:57
↓ 17 callersMethodreturn_type
(&self)
crates/ty_python_semantic/src/types/infer/builder/class.rs:36
↓ 17 callersMethodset_override_options
Sets the highest-precedence options for this project, replacing any previous overrides.
crates/ty_project/src/metadata.rs:434
↓ 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:1669
↓ 17 callersMethodsnapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
↓ 17 callersMethodspan
Create a span with the range of the given expression in the file being currently type checked. If you're creating a diagnostic with snippets in files
crates/ty_python_semantic/src/types/context.rs:232
↓ 17 callersMethodterm_width
Set the width to render within Affects the rendering of [`Snippet`][crate::Snippet]s
crates/ruff_annotate_snippets/src/renderer/mod.rs:170
↓ 17 callersMethodto_instance
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:1575
↓ 17 callersMethodtrim_whitespace
(&self)
crates/ruff_python_trivia/src/whitespace.rs:113
↓ 17 callersFunctionunbound
()
crates/ty_python_core/src/use_def/place_state.rs:834
↓ 17 callersMethodvalues
Returns an iterator over the fixes in the map.
crates/ruff/src/diagnostics.rs:146
↓ 17 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:388
↓ 17 callersMethodwith_file
Write a file to the test directory
crates/ruff_server/tests/e2e/main.rs:1123
↓ 17 callersMethodwith_qualifiers
(self, qualifiers: TypeQualifiers)
crates/ty_python_semantic/src/place.rs:335
↓ 16 callersMethodall
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:83
↓ 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_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1226
↓ 16 callersMethodas_str
Returns the underlying package name.
crates/ty_project/src/metadata/pyproject.rs:258
← previousnext →901–1,000 of 31,562, ranked by callers