Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,766 in github.com/astral-sh/ruff
⨍
Functions
31,766
◇
Types & classes
7,128
↳
Endpoints
82
Method
new
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
Method
new
Initialize a [`ModuleDb`] for the given system.
crates/ruff_graph/src/db.rs:29
Method
new
Initialize a [`Resolver`] with a given [`ModuleDb`].
crates/ruff_graph/src/resolver.rs:20
Method
new
( module_path: Option<&'a [String]>, string_imports: StringImports, type_checking_impo
crates/ruff_graph/src/collector.rs:22
Method
new
(name: impl AsRef<str>)
crates/ruff_python_ast/src/name.rs:55
Method
new
(suite: &'a [Stmt], stmt: AnyNodeRef<'a>)
crates/ruff_python_ast/src/traversal.rs:61
Method
new
(items: &'a [T])
crates/ruff_python_ast/src/comparable.rs:381
Method
new
(items: &'a [DictItem])
crates/ruff_python_ast/src/nodes.rs:307
Method
new
(source: &'a str, range: TextRange)
crates/ruff_python_ast/src/identifier.rs:163
Method
new
(kind: TokenKind, range: TextRange, flags: TokenFlags)
crates/ruff_python_ast/src/token.rs:37
Method
new
(tokens: Vec<Token>)
crates/ruff_python_ast/src/token/tokens.rs:16
Method
new
(expression: MemberExpr)
crates/ty_python_core/src/member.rs:27
Method
new
(value: usize)
crates/ty_python_core/src/narrowing_constraints.rs:64
Method
new
(value: usize)
crates/ty_python_core/src/reachability_constraints.rs:116
Method
new
(name: Name)
crates/ty_python_core/src/symbol.rs:54
Method
new
()
crates/ty_python_core/src/lib.rs:152
Method
new
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/re_exports.rs:67
Method
new
(states: IndexVec<ScopedDefinitionId, DefinitionEntry<'db>>)
crates/ty_python_core/src/use_def.rs:767
Method
new
( db: &'db dyn Db, scope_id: ScopeId<'db>, place: ScopedPlaceId, kind: Definit
crates/ty_python_core/src/definition.rs:65
Method
new
(kind: UnpackKind, expression: Expression<'db>)
crates/ty_python_core/src/unpack.rs:99
Method
new
()
crates/ty_python_core/src/db.rs:67
Method
new
(db: &'db dyn Db, places: &'a PlaceTableBuilder)
crates/ty_python_core/src/place.rs:624
Method
new
(db: &'db dyn Db, file: File, program: Program<'db>)
crates/ty_python_core/src/program_file.rs:69
Method
new
( parent: Option<FileScopeId>, node: NodeWithScopeKind, descendants: Range<FileScopeId
crates/ty_python_core/src/scope.rs:138
Method
new
(value: usize)
crates/ty_python_core/src/predicate.rs:45
Method
new
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
Method
new
( db: &'db dyn Db, file: ProgramFile<'db>, module_ref: &'ast ParsedModuleRef, )
crates/ty_python_core/src/builder.rs:322
Method
new
(declaration: ScopedDefinitionId, is_imported_qualifier: bool)
crates/ty_python_core/src/use_def/place_state.rs:105
Method
new
(kind: ExceptionContextKind, exception_handlers: ExceptionHandlers)
crates/ty_python_core/src/builder/except_handlers.rs:364
Method
new
(f: &'fmt mut Formatter<'buf>)
crates/ruff_options_metadata/src/lib.rs:347
Method
new
(options: JsValue, position_encoding: PositionEncoding)
crates/ruff_wasm/src/lib.rs:281
Method
new
(start_index: u32)
crates/ruff_unicode_names2/src/iter_str.rs:35
Method
new
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
Method
new
(source: &'src str, flags: AnyStringFlags, offset: TextSize, range: TextRange)
crates/ruff_python_parser/src/string.rs:102
Method
new
Creates a new `LexicalError` with the given error type and location.
crates/ruff_python_parser/src/error.rs:352
Method
new
()
crates/ruff_python_parser/src/semantic_errors.rs:45
Method
new
(kinds: [TokenKind; N])
crates/ruff_python_parser/src/token_set.rs:8
Method
new
Create a new token source for the given lexer.
crates/ruff_python_parser/src/token_source.rs:23
Method
new
(flags: TokenFlags, nesting: u32)
crates/ruff_python_parser/src/lexer/interpolated_string.rs:24
Method
new
(column: u32)
crates/ruff_python_parser/src/lexer/indentation.rs:15
Method
new
(source: &'src str)
crates/ruff_python_parser/src/lexer/cursor.rs:25
Method
new
Create a new parser for the given source code.
crates/ruff_python_parser/src/parser/mod.rs:120
Method
new
()
crates/ruff_python_parser/src/parser/scratch_buffer.rs:13
Method
new
(tokens: &'a Tokens, source_length: TextSize)
crates/ruff_python_parser/tests/fixtures.rs:447
Method
new
( root: &str, position_encoding: PositionEncoding, options: JsValue, )
crates/ty_wasm/src/lib.rs:120
Method
new
(comment: &'a str)
crates/mdtest/src/assertion.rs:395
Method
new
( md_index: &LineIndex, dimensions: impl IntoIterator<Item = BacktickOffsets>, )
crates/mdtest/src/parser.rs:292
Method
new
(message: impl std::fmt::Display)
crates/mdtest/src/matcher.rs:66
Method
new
( diagnostics: impl IntoIterator<Item = &'a Diagnostic>, line_start: &dyn Fn(TextRange) -> One
crates/mdtest/src/diagnostic.rs:22
Method
new
Create a new docstring from the raw string literal contents
crates/ty_ide/src/docstring.rs:25
Method
new
(symbol: SymbolInfo<'db>, file: File)
crates/ty_ide/src/document_symbols.rs:636
Method
new
(symbol_info: WorkspaceSymbolInfo)
crates/ty_ide/src/workspace_symbols.rs:209
Method
new
Create a new `SemanticTokens` instance.
crates/ty_ide/src/semantic_tokens.rs:181
Method
new
Creates a new `NavigationTarget` where the focus and full range are identical.
crates/ty_ide/src/lib.rs:145
Method
new
(range: FileRange, index: usize)
crates/ty_ide/src/selection_range.rs:467
Method
new
(file: File, folding_range: FoldingRange)
crates/ty_ide/src/folding_range.rs:2809
Method
new
(text: impl Into<String>)
crates/ty_ide/src/inlay_hints.rs:315
Method
new
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
Method
new
(db: &'db dyn ty_python_semantic::Db)
crates/ty_ide/src/stub_mapping.rs:19
Method
new
(item: CallHierarchyItem)
crates/ty_ide/src/call_hierarchy.rs:222
Method
new
(action: GotoAction, targets: RangedValue<NavigationTargets>)
crates/ty_ide/src/goto_definition.rs:2861
Method
new
(db: &'db dyn Db, renames: &[FileRename])
crates/ty_ide/src/will_rename.rs:204
Method
new
(mut resolved: Vec<ResolvedDefinition<'db>>)
crates/ty_ide/src/goto.rs:252
Method
new
(output: &'output mut String)
crates/ty_ide/src/docstring/markdown/general.rs:286
Method
new
Creates a structured replacement from the items parsed out of one source section.
crates/ty_ide/src/docstring/markdown/structured.rs:158
Method
new
Starts buffering a wrapped link candidate found in `line`.
crates/ty_ide/src/docstring/markdown/general/inline.rs:218
Method
new
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
Method
new
(lines: Vec<ParsedLine<'a>>)
crates/ty_ide/src/docstring/document/numpy.rs:137
Method
new
(lines: Vec<ParsedLine<'a>>)
crates/ty_ide/src/docstring/document/google.rs:227
Method
new
Constructs a line cursor from raw docstring text.
crates/ty_ide/src/docstring/document/rst.rs:80
Method
new
(db: &'db dyn Db, file: ProgramFile<'db>, index: &'db SemanticIndex<'db>)
crates/ty_python_semantic/src/dunder_all.rs:52
Method
new
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_semantic/src/pull_types.rs:26
Method
new
(env: &'env ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:546
Method
new
Creates a projector for narrowing `place`.
crates/ty_python_semantic/src/reachability.rs:1196
Method
new
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_semantic/src/semantic_model.rs:58
Method
new
Starts resolution using the given mode.
crates/ty_python_semantic/src/place_load.rs:47
Method
new
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
Method
new
()
crates/ty_python_semantic/src/db.rs:79
Method
new
(ty: T)
crates/ty_python_semantic/src/place.rs:145
Method
new
(file: File, path: &SystemPath, original_diagnostics: &'a [Diagnostic])
crates/ty_python_semantic/src/fixes.rs:710
Method
new
(db: &'a dyn Db, python_file: PythonFile<'a>, diagnostics: TypeCheckDiagnostics)
crates/ty_python_semantic/src/suppression.rs:270
Method
new
( source_overload_index: Option<NonZeroU32>, receiver_constraints: Option<ReceiverConstraints<
crates/ty_python_semantic/src/types/signatures.rs:707
Method
new
( env: &'a ProgramEnvironment<'db>, relation: TypeRelation, constraints: &'c Constrain
crates/ty_python_semantic/src/types/relation.rs:1278
Method
new
( interface: ProtocolInterface<'db>, materialization: Option<MaterializationKind>, )
crates/ty_python_semantic/src/types/protocol_class.rs:468
Method
new
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, soundness_policy: ComparisonSoundnes
crates/ty_python_semantic/src/types/equality.rs:312
Method
new
()
crates/ty_python_semantic/src/types/display.rs:340
Method
new
(interface: ProtocolInterface<'db>)
crates/ty_python_semantic/src/types/instance.rs:2231
Method
new
( db: &'db dyn Db, env: &'c ProgramEnvironment<'db>, constraints: &'c ConstraintSetBui
crates/ty_python_semantic/src/types/generics.rs:2807
Method
new
( db: &'db dyn Db, env: &'ast ProgramEnvironment<'db>, target_scope: ScopeId<'db>,
crates/ty_python_semantic/src/types/unpacker.rs:51
Method
new
(db: &'db dyn Db, source: RecursiveDefinition<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:578
Method
new
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, module: &'ast ParsedModuleRef,
crates/ty_python_semantic/src/types/narrow.rs:1696
Method
new
(promotable: bool, recursively_defined: RecursivelyDefined)
crates/ty_python_semantic/src/types/literal.rs:48
Method
new
(db: &'db dyn Db, constraints: OwnedConstraintSet<'db>)
crates/ty_python_semantic/src/types/known_instance.rs:44
Method
new
(defining_class: ClassType<'db>)
crates/ty_python_semantic/src/types/typed_dict.rs:231
Method
new
( db: &'db dyn Db, class: ClassLiteral<'db>, specialization: Option<Specialization<'db
crates/ty_python_semantic/src/types/mro.rs:623
Method
new
(index: usize, name: Option<&Name>)
crates/ty_python_semantic/src/types/relation_error.rs:50
Method
new
( owner_type: Type<'db>, lookup_anchor: ClassType<'db>, receiver: DescriptorReceiverKi
crates/ty_python_semantic/src/types/bound_super.rs:270
Method
new
Create a new MRO lookup from a database and an MRO iterator.
crates/ty_python_semantic/src/types/class.rs:2869
Method
new
(result_ty: Type<'db>, error: SubscriptErrorKind<'db>)
crates/ty_python_semantic/src/types/subscript.rs:241
Method
new
(call_site_scope: Option<ScopeId<'db>>)
crates/ty_python_semantic/src/types/typevar.rs:941
← previous
next →
25,601–25,700 of 31,766, ranked by callers