MCPcopy Create free account

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

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

Methodnew
Creates a new `TextSize` at the given `offset`. # Examples ```rust # use ruff_text_size::*; assert_eq!(TextSize::from(4), TextSize::new(4)); ```
crates/ruff_text_size/src/size.rs:47
Methodnew
Initialize a [`ModuleDb`] for the given system.
crates/ruff_graph/src/db.rs:29
Methodnew
Initialize a [`Resolver`] with a given [`ModuleDb`].
crates/ruff_graph/src/resolver.rs:20
Methodnew
( module_path: Option<&'a [String]>, string_imports: StringImports, type_checking_impo
crates/ruff_graph/src/collector.rs:22
Methodnew
(name: impl AsRef<str>)
crates/ruff_python_ast/src/name.rs:55
Methodnew
(suite: &'a [Stmt], stmt: AnyNodeRef<'a>)
crates/ruff_python_ast/src/traversal.rs:61
Methodnew
(items: &'a [T])
crates/ruff_python_ast/src/comparable.rs:381
Methodnew
(items: &'a [DictItem])
crates/ruff_python_ast/src/nodes.rs:307
Methodnew
(source: &'a str, range: TextRange)
crates/ruff_python_ast/src/identifier.rs:163
Methodnew
(kind: TokenKind, range: TextRange, flags: TokenFlags)
crates/ruff_python_ast/src/token.rs:37
Methodnew
(tokens: Vec<Token>)
crates/ruff_python_ast/src/token/tokens.rs:16
Methodnew
(expression: MemberExpr)
crates/ty_python_core/src/member.rs:27
Methodnew
(value: usize)
crates/ty_python_core/src/narrowing_constraints.rs:64
Methodnew
(value: usize)
crates/ty_python_core/src/reachability_constraints.rs:116
Methodnew
(name: Name)
crates/ty_python_core/src/symbol.rs:54
Methodnew
()
crates/ty_python_core/src/lib.rs:152
Methodnew
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/re_exports.rs:67
Methodnew
(states: IndexVec<ScopedDefinitionId, DefinitionEntry<'db>>)
crates/ty_python_core/src/use_def.rs:767
Methodnew
( db: &'db dyn Db, scope_id: ScopeId<'db>, place: ScopedPlaceId, kind: Definit
crates/ty_python_core/src/definition.rs:65
Methodnew
(kind: UnpackKind, expression: Expression<'db>)
crates/ty_python_core/src/unpack.rs:99
Methodnew
()
crates/ty_python_core/src/db.rs:67
Methodnew
(db: &'db dyn Db, places: &'a PlaceTableBuilder)
crates/ty_python_core/src/place.rs:624
Methodnew
(db: &'db dyn Db, file: File, program: Program<'db>)
crates/ty_python_core/src/program_file.rs:69
Methodnew
( parent: Option<FileScopeId>, node: NodeWithScopeKind, descendants: Range<FileScopeId
crates/ty_python_core/src/scope.rs:138
Methodnew
(value: usize)
crates/ty_python_core/src/predicate.rs:45
Methodnew
Creates a new `AstNodeRef` that references `node`. This method may panic or produce unspecified results if the provided module is from a different fi
crates/ty_python_core/src/ast_node_ref.rs:74
Methodnew
( db: &'db dyn Db, file: ProgramFile<'db>, module_ref: &'ast ParsedModuleRef, )
crates/ty_python_core/src/builder.rs:322
Methodnew
(declaration: ScopedDefinitionId, is_imported_qualifier: bool)
crates/ty_python_core/src/use_def/place_state.rs:105
Methodnew
(kind: ExceptionContextKind, exception_handlers: ExceptionHandlers)
crates/ty_python_core/src/builder/except_handlers.rs:364
Methodnew
(f: &'fmt mut Formatter<'buf>)
crates/ruff_options_metadata/src/lib.rs:347
Methodnew
(options: JsValue, position_encoding: PositionEncoding)
crates/ruff_wasm/src/lib.rs:281
Methodnew
(start_index: u32)
crates/ruff_unicode_names2/src/iter_str.rs:35
Methodnew
Create a new lexer for the given input source which starts at the given offset. If the start offset is greater than 0, the cursor is moved ahead that
crates/ruff_python_parser/src/lexer.rs:81
Methodnew
(source: &'src str, flags: AnyStringFlags, offset: TextSize, range: TextRange)
crates/ruff_python_parser/src/string.rs:102
Methodnew
Creates a new `LexicalError` with the given error type and location.
crates/ruff_python_parser/src/error.rs:352
Methodnew
()
crates/ruff_python_parser/src/semantic_errors.rs:45
Methodnew
(kinds: [TokenKind; N])
crates/ruff_python_parser/src/token_set.rs:8
Methodnew
Create a new token source for the given lexer.
crates/ruff_python_parser/src/token_source.rs:23
Methodnew
(flags: TokenFlags, nesting: u32)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:24
Methodnew
(column: u32)
crates/ruff_python_parser/src/lexer/indentation.rs:15
Methodnew
(source: &'src str)
crates/ruff_python_parser/src/lexer/cursor.rs:25
Methodnew
Create a new parser for the given source code.
crates/ruff_python_parser/src/parser/mod.rs:120
Methodnew
()
crates/ruff_python_parser/src/parser/scratch_buffer.rs:13
Methodnew
(tokens: &'a Tokens, source_length: TextSize)
crates/ruff_python_parser/tests/fixtures.rs:447
Methodnew
( root: &str, position_encoding: PositionEncoding, options: JsValue, )
crates/ty_wasm/src/lib.rs:120
Methodnew
(comment: &'a str)
crates/mdtest/src/assertion.rs:395
Methodnew
( md_index: &LineIndex, dimensions: impl IntoIterator<Item = BacktickOffsets>, )
crates/mdtest/src/parser.rs:292
Methodnew
(message: impl std::fmt::Display)
crates/mdtest/src/matcher.rs:66
Methodnew
( diagnostics: impl IntoIterator<Item = &'a Diagnostic>, line_start: &dyn Fn(TextRange) -> One
crates/mdtest/src/diagnostic.rs:22
Methodnew
Create a new docstring from the raw string literal contents
crates/ty_ide/src/docstring.rs:25
Methodnew
(symbol: SymbolInfo<'db>, file: File)
crates/ty_ide/src/document_symbols.rs:636
Methodnew
(symbol_info: WorkspaceSymbolInfo)
crates/ty_ide/src/workspace_symbols.rs:209
Methodnew
Create a new `SemanticTokens` instance.
crates/ty_ide/src/semantic_tokens.rs:181
Methodnew
Creates a new `NavigationTarget` where the focus and full range are identical.
crates/ty_ide/src/lib.rs:145
Methodnew
(range: FileRange, index: usize)
crates/ty_ide/src/selection_range.rs:467
Methodnew
(file: File, folding_range: FoldingRange)
crates/ty_ide/src/folding_range.rs:2809
Methodnew
(text: impl Into<String>)
crates/ty_ide/src/inlay_hints.rs:315
Methodnew
Create a new empty collection of completions. The given typed text should correspond to what we believe the user has typed as part of the next symbol
crates/ty_ide/src/completion.rs:177
Methodnew
(db: &'db dyn ty_python_semantic::Db)
crates/ty_ide/src/stub_mapping.rs:19
Methodnew
(item: CallHierarchyItem)
crates/ty_ide/src/call_hierarchy.rs:222
Methodnew
(action: GotoAction, targets: RangedValue<NavigationTargets>)
crates/ty_ide/src/goto_definition.rs:2861
Methodnew
(db: &'db dyn Db, renames: &[FileRename])
crates/ty_ide/src/will_rename.rs:204
Methodnew
(mut resolved: Vec<ResolvedDefinition<'db>>)
crates/ty_ide/src/goto.rs:252
Methodnew
(output: &'output mut String)
crates/ty_ide/src/docstring/markdown/general.rs:286
Methodnew
Creates a structured replacement from the items parsed out of one source section.
crates/ty_ide/src/docstring/markdown/structured.rs:158
Methodnew
Starts buffering a wrapped link candidate found in `line`.
crates/ty_ide/src/docstring/markdown/general/inline.rs:218
Methodnew
Creates a lossless iterator over plain text and complete inline markup. Escaped or unmatched backticks remain part of an [`InlineMarkupToken::Text`]
crates/ty_ide/src/docstring/document/syntax.rs:97
Methodnew
(lines: Vec<ParsedLine<'a>>)
crates/ty_ide/src/docstring/document/numpy.rs:137
Methodnew
(lines: Vec<ParsedLine<'a>>)
crates/ty_ide/src/docstring/document/google.rs:227
Methodnew
Constructs a line cursor from raw docstring text.
crates/ty_ide/src/docstring/document/rst.rs:80
Methodnew
(db: &'db dyn Db, file: ProgramFile<'db>, index: &'db SemanticIndex<'db>)
crates/ty_python_semantic/src/dunder_all.rs:52
Methodnew
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_semantic/src/pull_types.rs:26
Methodnew
(env: &'env ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:546
Methodnew
Creates a projector for narrowing `place`.
crates/ty_python_semantic/src/reachability.rs:1196
Methodnew
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_semantic/src/semantic_model.rs:58
Methodnew
Starts resolution using the given mode.
crates/ty_python_semantic/src/place_load.rs:47
Methodnew
Create a new importer. The `file` given should correspond to the module that we want to insert an import statement into. Source style and top-level
crates/ty_python_semantic/src/importer.rs:60
Methodnew
()
crates/ty_python_semantic/src/db.rs:79
Methodnew
(ty: T)
crates/ty_python_semantic/src/place.rs:145
Methodnew
(file: File, path: &SystemPath, original_diagnostics: &'a [Diagnostic])
crates/ty_python_semantic/src/fixes.rs:710
Methodnew
(db: &'a dyn Db, python_file: PythonFile<'a>, diagnostics: TypeCheckDiagnostics)
crates/ty_python_semantic/src/suppression.rs:270
Methodnew
( source_overload_index: Option<NonZeroU32>, receiver_constraints: Option<ReceiverConstraints<
crates/ty_python_semantic/src/types/signatures.rs:707
Methodnew
( env: &'a ProgramEnvironment<'db>, relation: TypeRelation, constraints: &'c Constrain
crates/ty_python_semantic/src/types/relation.rs:1278
Methodnew
( interface: ProtocolInterface<'db>, materialization: Option<MaterializationKind>, )
crates/ty_python_semantic/src/types/protocol_class.rs:468
Methodnew
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, soundness_policy: ComparisonSoundnes
crates/ty_python_semantic/src/types/equality.rs:312
Methodnew
()
crates/ty_python_semantic/src/types/display.rs:340
Methodnew
(interface: ProtocolInterface<'db>)
crates/ty_python_semantic/src/types/instance.rs:2231
Methodnew
( db: &'db dyn Db, env: &'c ProgramEnvironment<'db>, constraints: &'c ConstraintSetBui
crates/ty_python_semantic/src/types/generics.rs:2807
Methodnew
( db: &'db dyn Db, env: &'ast ProgramEnvironment<'db>, target_scope: ScopeId<'db>,
crates/ty_python_semantic/src/types/unpacker.rs:51
Methodnew
(db: &'db dyn Db, source: RecursiveDefinition<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:578
Methodnew
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, module: &'ast ParsedModuleRef,
crates/ty_python_semantic/src/types/narrow.rs:1696
Methodnew
(promotable: bool, recursively_defined: RecursivelyDefined)
crates/ty_python_semantic/src/types/literal.rs:48
Methodnew
(db: &'db dyn Db, constraints: OwnedConstraintSet<'db>)
crates/ty_python_semantic/src/types/known_instance.rs:44
Methodnew
(defining_class: ClassType<'db>)
crates/ty_python_semantic/src/types/typed_dict.rs:231
Methodnew
( db: &'db dyn Db, class: ClassLiteral<'db>, specialization: Option<Specialization<'db
crates/ty_python_semantic/src/types/mro.rs:623
Methodnew
(index: usize, name: Option<&Name>)
crates/ty_python_semantic/src/types/relation_error.rs:50
Methodnew
( owner_type: Type<'db>, lookup_anchor: ClassType<'db>, receiver: DescriptorReceiverKi
crates/ty_python_semantic/src/types/bound_super.rs:270
Methodnew
Create a new MRO lookup from a database and an MRO iterator.
crates/ty_python_semantic/src/types/class.rs:2869
Methodnew
(result_ty: Type<'db>, error: SubscriptErrorKind<'db>)
crates/ty_python_semantic/src/types/subscript.rs:241
Methodnew
(call_site_scope: Option<ScopeId<'db>>)
crates/ty_python_semantic/src/types/typevar.rs:941
← previousnext →25,601–25,700 of 31,766, ranked by callers