MCPcopy Create free account

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

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

↓ 4 callersFunctionis_special_assignment
Returns `true` if this is a "special" assignment which must have a value (e.g., an assignment to `__all__`).
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:472
↓ 4 callersMethodis_standard
Returns `true` if the parameters are a standard parameter list (not gradual, top, `ParamSpec`, or `Concatenate`).
crates/ty_python_semantic/src/types/signatures.rs:5296
↓ 4 callersMethodis_static_sequent_eligible
Returns whether this type can participate in a transitive sequent proof. Gradual assignability is not transitive, so constraints with dynamic bounds
crates/ty_python_semantic/src/types/constraints/sequents.rs:2155
↓ 4 callersFunctionis_stub_body
Returns `true` if all statements in `body` are `pass` or `...` (ellipsis) An empty body (`[]`) returns `false`
crates/ruff_python_ast/src/helpers.rs:1262
↓ 4 callersMethodis_subtyping
(self)
crates/ty_python_semantic/src/types/relation.rs:180
↓ 4 callersFunctionis_top_level_expression_in_statement
Returns `true` if the given call is a top-level expression in its statement. This means the call's return value is not used, so return type changes do
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:221
↓ 4 callersMethodis_type_expression_explanation
(&self)
crates/ty_python_semantic/src/types/context.rs:315
↓ 4 callersFunctionis_type_var_like_call
Returns `true` if an [`Expr`] appears to be `TypeVar`, `TypeVarTuple`, `NewType`, or `ParamSpec` call. See also [`ruff_python_semantic::analyze::typi
crates/ruff_linter/src/rules/flake8_pyi/rules/simple_defaults.rs:453
↓ 4 callersMethodis_typealias_special_form
(&self)
crates/ty_python_semantic/src/types.rs:2732
↓ 4 callersMethodis_unicode
Returns `true` if the string literal has a `u` prefix, e.g. `u"foo"`. Although all strings in Python 3 are valid unicode (and the `u` prefix is only
crates/ruff_python_ast/src/nodes.rs:1600
↓ 4 callersMethodis_unreachable
(&self, stmt: &ast::Stmt)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:1140
↓ 4 callersMethodis_unresolved_import
If the call path is dot-prefixed, it's an unresolved relative import. Ex) `[".foo", "bar"]` -> `".foo.bar"`
crates/ruff_python_ast/src/name.rs:369
↓ 4 callersMethodis_unspecified
(self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:566
↓ 4 callersMethodis_used
Is the symbol used in its containing scope?
crates/ty_python_core/src/symbol.rs:66
↓ 4 callersMethodis_valid
(&self)
crates/ruff_python_ast/src/nodes.rs:438
↓ 4 callersMethodis_valid
(&self)
crates/ty_python_semantic/src/types/constraints.rs:4965
↓ 4 callersMethoditer
(&self)
crates/ty_python_core/src/frozen.rs:46
↓ 4 callersMethoditer
(&self)
crates/ty_ide/src/lib.rs:250
↓ 4 callersMethoditer
(&self)
crates/ty_python_semantic/src/suppression.rs:443
↓ 4 callersMethoditer_clauses
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:1892
↓ 4 callersMethoditer_enabled
Returns an iterator over all enabled rules.
crates/ruff_linter/src/settings/rule_table.rs:50
↓ 4 callersMethoditer_mut
Returns a mutable iterator over the parts of this f-string, in source order.
crates/ruff_python_ast/src/nodes.rs:603
↓ 4 callersMethoditer_negative
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1500
↓ 4 callersMethoditerable
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1291
↓ 4 callersMethodkey_from_uri
(&self, uri: Uri)
crates/ruff_server/src/session/index.rs:127
↓ 4 callersMethodkey_type
Returns the type of keys that may be present in this `TypedDict`. A closed `TypedDict` has a finite set of literal keys. Open and extra-items `TypedD
crates/ty_python_semantic/src/types/typed_dict.rs:383
↓ 4 callersMethodkeywords
Return an iterator over the metaclass keywords of the class.
crates/ruff_python_ast/src/nodes.rs:42
↓ 4 callersMethodkind
Determine whether this module is a single-file module or a package
crates/ty_module_resolver/src/module.rs:136
↓ 4 callersMethodknown
Is this a module that we special-case somehow? If so, which one?
crates/ty_module_resolver/src/module.rs:89
↓ 4 callersFunctionknown_instance
(db: &TestDb, class: KnownClass)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2246
↓ 4 callersMethodlacks_instance_storage
Whether a known slotted layout has no instance storage available for `name`. An unknown layout remains permissive, as do builtins whose C-level stora
crates/ty_python_semantic/src/types/class/slots.rs:532
↓ 4 callersMethodlast
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the file is at the end of the file.
crates/ruff_python_trivia/src/cursor.rs:67
↓ 4 callersMethodlast_child_in_body
The last child of the last branch, if the node has multiple branches.
crates/ruff_python_ast/src/node.rs:590
↓ 4 callersMethodlast_definition_signature
Typed externally-visible signature of the last overload or implementation of this function. ## Warning This uses the semantic index to find the defi
crates/ty_python_semantic/src/types/function.rs:1030
↓ 4 callersMethodleading_index
(&self)
crates/ruff_python_formatter/src/comments/map.rs:519
↓ 4 callersMethodleading_range
(&self)
crates/ruff_python_formatter/src/comments/map.rs:476
↓ 4 callersMethodlevel
Returns the indentation level
crates/ruff_formatter/src/printer/mod.rs:968
↓ 4 callersFunctionlines_after
Counts the empty lines between `offset` and the first non-whitespace character.
crates/ruff_python_trivia/src/tokenizer.rs:67
↓ 4 callersFunctionlines_after_ignoring_end_of_line_trivia
(offset: TextSize, code: &str)
crates/ruff_python_trivia/src/tokenizer.rs:118
↓ 4 callersFunctionlint_only
Generate a [`Diagnostic`] for each diagnostic triggered by the given source code.
crates/ruff_linter/src/linter.rs:427
↓ 4 callersMethodlint_source
The source for the diagnostic (either the AST, the filesystem, or the physical lines).
crates/ruff_linter/src/registry.rs:269
↓ 4 callersFunctionlist_modules
List all available top-level modules.
crates/ty_module_resolver/src/list.rs:15
↓ 4 callersFunctionliteral_completions
( server: &mut TestServer, cell: &lsp_types::Uri, position: Position, )
crates/ty_server/tests/e2e/notebook.rs:875
↓ 4 callersMethodlog_guidance
Returns editor-specific guidance for finding logs. Different editors have different ways to access language server logs, so we provide tailored instr
crates/ty_server/src/session.rs:1750
↓ 4 callersMethodlog_level
(&self)
crates/ruff/src/args.rs:85
↓ 4 callersMethodlower_bound
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:3410
↓ 4 callersMethodmagic_trailing_comma
(&self)
crates/ruff_python_formatter/src/options.rs:123
↓ 4 callersMethodmapNavigationTargets
( links: LocationLink[], )
playground/ty/src/Editor/Editor.tsx:1041
↓ 4 callersFunctionmap_member_lookup_type
( db: &'db dyn Db, result: MemberLookupResult<'db>, f: impl FnOnce(Type<'db>) -> Type<'db>, )
crates/ty_python_semantic/src/types.rs:1194
↓ 4 callersMethodmark_bound
(&mut self, id: ScopedPlaceId)
crates/ty_python_core/src/place.rs:441
↓ 4 callersMethodmark_parameter
(&mut self)
crates/ty_python_core/src/symbol.rs:163
↓ 4 callersMethodmark_used
(&mut self, suppression_id: FileSuppressionId)
crates/ty_python_semantic/src/types/diagnostic.rs:1735
↓ 4 callersFunctionmatch_arg
(call: &'a Call<'b>)
crates/ruff_linter/src/cst/matchers.rs:115
↓ 4 callersFunctionmatch_candidate_exclusion
Return `true` if the given candidates should be ignored based on the exclusion criteria.
crates/ruff_workspace/src/resolver.rs:872
↓ 4 callersFunctionmatch_indented_block
( suite: &'a mut Suite<'b>, )
crates/ruff_linter/src/cst/matchers.rs:193
↓ 4 callersMethodmatching_overloads_mut
Returns an iterator over all the mutable overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4747
↓ 4 callersMethodmaterialize_impl
( self, db: &'db dyn Db, materialization_kind: MaterializationKind, visitor: &
crates/ty_python_semantic/src/types/generics.rs:1587
↓ 4 callersMethodmaterialize_ref
Returns the materialized place state for immutable access. Call this instead of [`Self::materialize`] when the state will only be read. If the pendin
crates/ty_python_core/src/use_def.rs:1897
↓ 4 callersMethodmaterialized_origin
Returns the class origin of a protocol with a pending materialization.
crates/ty_python_semantic/src/types/instance.rs:1825
↓ 4 callersMethodmay_be_data_descriptor
Returns whether this type should be considered a possible data descriptor. If this type is a union, returns true if _any_ element is a data descriptor
crates/ty_python_semantic/src/types.rs:5599
↓ 4 callersMethodmay_be_present
Returns `false` for optional fields whose declared type is uninhabited.
crates/ty_python_semantic/src/types/typed_dict.rs:3280
↓ 4 callersMethodmember_count
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/enums.rs:370
↓ 4 callersMethodmember_id_by_instance_attribute_name
(&self, name: &str)
crates/ty_python_core/src/place.rs:315
↓ 4 callersMethodmember_sources
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:69
↓ 4 callersMethodmembers_in_scope_at
Builds a set of members in scope at the given AST node and position. Callers should use this routine to build "in scope members" to be used with repe
crates/ty_python_semantic/src/importer.rs:95
↓ 4 callersMethodmerge
Merge the given snapshot into the current state, reflecting that we might have taken either path to get here. The new state for each place should incl
crates/ty_python_core/src/use_def.rs:3237
↓ 4 callersMethodmerge
(&mut self, b: Self, reachability_constraints: &mut ReachabilityConstraintsBuilder)
crates/ty_python_core/src/use_def/place_state.rs:271
↓ 4 callersMethodmerged_specialization
Merge the alternatives into one closed specialization, discarding their correlations and completeness. Compatibility and diagnostic results use their
crates/ty_python_semantic/src/types/generics.rs:2618
↓ 4 callersMethodmessage
Attach a message to this annotation. An annotation without a message will still have a presence in rendering. In particular, it will highlight the sp
crates/ruff_db/src/diagnostic/mod.rs:831
↓ 4 callersMethodmessage
(&self)
crates/ty_wasm/src/lib.rs:908
↓ 4 callersMethodmodel
(name: string)
playground/ty/src/Playground.tsx:767
↓ 4 callersFunctionmodule_type_symbols
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/place.rs:2587
↓ 4 callersMethodmro_identity
Return the identity of this base for method-resolution-order construction. Specializations of a generic class share one runtime class and must occupy
crates/ty_python_semantic/src/types/class_base.rs:112
↓ 4 callersMethodmultiline
(&self)
crates/ty_python_semantic/src/types/display.rs:167
↓ 4 callersMethodname
(self, name: String)
crates/ruff_server/src/server/schedule/thread.rs:48
↓ 4 callersMethodname_in_file
Returns the name of this symbol as it exists in a file. When absent, there is no concrete symbol in a module somewhere. Instead, this represents impo
crates/ty_ide/src/all_symbols.rs:141
↓ 4 callersMethodnarrow
Narrows a binding while reusing projections and shared suffixes from earlier bindings.
crates/ty_python_semantic/src/reachability.rs:1231
↓ 4 callersMethodnarrowing_constraint
(&self)
crates/ty_python_core/src/use_def/place_state.rs:418
↓ 4 callersMethodnarrowing_evaluator
( &self, constraint: ScopedNarrowingConstraint, )
crates/ty_python_core/src/use_def.rs:1178
↓ 4 callersMethodnearest_disjoint_base
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:1651
↓ 4 callersMethodneeds_parentheses
( &self, parent: AnyNodeRef, context: &PyFormatContext, )
crates/ruff_python_formatter/src/pattern/mod.rs:136
↓ 4 callersMethodnesting
(&self)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:50
↓ 4 callersMethodnew_module_name
Returns the new name of a resolved module affected by this batch. An exact file rename takes precedence over any directory rename that matches a pref
crates/ty_ide/src/will_rename.rs:234
↓ 4 callersMethodnext
(&mut self)
crates/ruff_formatter/src/printer/queue.rs:219
↓ 4 callersMethodnext
(&mut self)
crates/ty_python_semantic/src/types/set_theoretic.rs:1011
↓ 4 callersMethodnext_back
(&mut self)
crates/ruff_formatter/src/format_element.rs:442
↓ 4 callersMethodnext_sibling
(&self)
crates/ruff_python_ast/src/traversal.rs:69
↓ 4 callersMethodnode_key
(self)
crates/ty_python_core/src/scope.rs:342
↓ 4 callersFunctionnon_terminal_call_predicates
( db: &'db dyn Db, scope: ScopeId<'db>, )
crates/ty_python_semantic/src/reachability.rs:684
↓ 4 callersFunctionnon_type_parameter_parent
Returns a scope's lexical parent, skipping an intervening type-parameter scope.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1629
↓ 4 callersMethodnormalize
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:57
↓ 4 callersFunctionnormalize_candidates
Orders candidates for the same module name by precedence and removes shadowed namespace packages. Regular packages and file modules shadow namespace
crates/ty_module_resolver/src/resolve.rs:1472
↓ 4 callersFunctionnormalize_path_to
Convert any path to an absolute path (based on the specified project root).
crates/ruff_linter/src/fs.rs:39
↓ 4 callersFunctionnormalize_string
( input: &str, start_offset: usize, new_flags: AnyStringFlags, escape_braces: bool, )
crates/ruff_python_formatter/src/string/normalize.rs:664
↓ 4 callersMethodnum_lines
(&self)
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:135
↓ 4 callersMethodobject
Return a `ClassLiteral` representing the class `builtins.object`
crates/ty_python_semantic/src/types/class.rs:643
↓ 4 callersMethodobserve_line_outside_preformatted_block
Updates internal state for a line outside of any active preformatted block.
crates/ty_ide/src/docstring/document/preformatted.rs:118
↓ 4 callersMethodoffset
(&self)
crates/ruff_python_trivia/src/cursor.rs:27
↓ 4 callersMethodoffset
(&self)
crates/ruff_linter/src/docstrings/sections.rs:344
↓ 4 callersMethodopen_virtual_text_document
Send a `textDocument/didOpen` notification for an unsaved virtual document.
crates/ty_server/tests/e2e/main.rs:885
← previousnext →3,401–3,500 of 31,766, ranked by callers