MCPcopy Create free account

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

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

↓ 19 callersMethodrange
Returns the [`TextRange`] for the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:491
↓ 19 callersMethodrecord_constraint_set
Records one relation in the call-wide constraint set. Generic unsatisfiability is retained in `pending` rather than reported as a misleading type-var
crates/ty_python_semantic/src/types/generics.rs:3707
↓ 19 callersMethodremove
(&mut self, name: impl Into<String>)
crates/ruff_db/src/system/command.rs:135
↓ 19 callersFunctionrender_docstring
(raw: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:834
↓ 19 callersMethodseen_typing
(&self)
crates/ruff_python_semantic/src/model.rs:1746
↓ 19 callersMethodstatus
(&self)
crates/ty_python_semantic/src/lint.rs:134
↓ 19 callersMethodstmt
Generate source code from a [`Stmt`].
crates/ruff_python_codegen/src/generator.rs:140
↓ 19 callersMethodtarget
(self, db: &'db dyn Db, parsed: &'ast ParsedModuleRef)
crates/ty_python_core/src/unpack.rs:69
↓ 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 callersMethodwith_files
Write multiple files to the test directory
crates/ty_server/tests/e2e/main.rs:1645
↓ 19 callersMethodwith_real_uv
(mut self)
crates/ty_server/tests/e2e/main.rs:1361
↓ 19 callersMethodworkspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1591
↓ 18 callersMethodadd_negative
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1789
↓ 18 callersMethodadd_negative_in_place
(&mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1803
↓ 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
Returns the underlying package name.
crates/ty_project/src/metadata/pyproject.rs:258
↓ 18 callersMethodas_str
(self)
crates/ty_module_resolver/src/module.rs:310
↓ 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 callersMethodattach_to
( &self, db: &'db dyn Db, env: &ProgramEnvironment, relation: ErrorRelation,
crates/ty_python_semantic/src/types/relation_error.rs:739
↓ 18 callersMethodawait_diagnostic_refresh
Wait for and acknowledge a server-requested diagnostic refresh.
crates/ty_server/tests/e2e/main.rs:612
↓ 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 callersMethodentry
(&self, source: &str)
crates/ty_project/src/baseline.rs:410
↓ 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:100
↓ 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:689
↓ 18 callersMethodintersects
Return true if `self` and `other` contain at least one shared `definition`. A symbol can resolve to multiple definitions (for example, overload group
crates/ty_ide/src/goto.rs:471
↓ 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:76
↓ 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:832
↓ 18 callersMethodjoin_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:372
↓ 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:759
↓ 18 callersMethodp
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 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:857
↓ 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 callersMethodset_override_options
Sets the highest-precedence options for this project, replacing any previous overrides.
crates/ty_project/src/metadata.rs:442
↓ 18 callersMethodsite_packages
Add a file to site-packages (simulating a third-party dependency). The path should be relative to site-packages root (e.g., "numpy/__init__.py").
crates/ty_ide/src/lib.rs:743
↓ 18 callersMethodvariance_of
( self, db: &'db dyn Db, _: &ProgramEnvironment<'db>, typevar: BoundTypeVarIde
crates/ty_python_semantic/src/types/class/static_literal.rs:3620
↓ 18 callersMethodwhen_any
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:213
↓ 18 callersMethodwith_qualifiers
(self, qualifiers: TypeQualifiers)
crates/ty_python_semantic/src/place.rs:339
↓ 17 callersMethodall
Returns all supported semantic token types as enum variants.
crates/ty_ide/src/semantic_tokens.rs:83
↓ 17 callersMethodanalysis_settings
(&self, _file: File)
crates/ty_python_semantic/src/db.rs:199
↓ 17 callersMethodapply_uv_workspace
Applies a previously obtained uv workspace without invoking uv or checking [`Self::uv_workspace_discovery_enabled`]. An explicit ty configuration kee
crates/ty_project/src/metadata.rs:234
↓ 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:3270
↓ 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:52
↓ 17 callersMethodclass
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/instance.rs:241
↓ 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 callersMethodenable_workspace_diagnostic_refresh
Enable server-requested refreshes for pull diagnostics.
crates/ty_server/tests/e2e/main.rs:1437
↓ 17 callersMethodend_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1358
↓ 17 callersMethodfile_path
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:856
↓ 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:226
↓ 17 callersMethodidentity_specialization
Returns the identity specialization for this class (same as default for non-generic).
crates/ty_python_semantic/src/types/class.rs:832
↓ 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:12785
↓ 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:3204
↓ 17 callersMethodis_declared
(self)
crates/ty_python_semantic/src/place.rs:67
↓ 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 callersMethodis_variadic
(&self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:708
↓ 17 callersMethoditer_flat
Returns an iterator over all `CallableBinding`s, flattening the two-level structure. Note: This loses the union/intersection distinction. The returne
crates/ty_python_semantic/src/types/call/bind.rs:1047
↓ 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 callersMethodmap_bound_or_constraints
Returns an identical type variable with its `TypeVarBoundOrConstraints` mapped by the provided closure.
crates/ty_python_semantic/src/types/typevar.rs:1362
↓ 17 callersMethodname
The absolute name of the module (e.g. `foo.bar`)
crates/ty_module_resolver/src/module.rs:66
↓ 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 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:795
↓ 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:37
← previousnext →901–1,000 of 31,766, ranked by callers