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
(options: SimpleFormatOptions)
crates/ruff_formatter/src/lib.rs:226
Method
new
Creates a new context that uses the given formatter context
crates/ruff_formatter/src/formatter.rs:15
Method
new
(value: &'fmt F)
crates/ruff_formatter/src/arguments.rs:20
Method
new
(inner: F)
crates/ruff_formatter/src/format_extensions.rs:79
Method
new
(content: Vec<FormatElement>)
crates/ruff_formatter/src/format_element.rs:158
Method
new
(indent: Indentation)
crates/ruff_formatter/src/printer/call_stack.rs:35
Method
new
(source_code: SourceCode<'a>, options: PrinterOptions)
crates/ruff_formatter/src/printer/mod.rs:42
Method
new
(original: &'a [T])
crates/ruff_formatter/src/printer/stack.rs:39
Method
new
(slice: &'a [FormatElement])
crates/ruff_formatter/src/printer/queue.rs:67
Method
new
(width: u16)
crates/ruff_formatter/src/printer/printer_options/mod.rs:65
Method
new
(source_code: SourceCode<'a>)
crates/ruff_formatter/src/format_element/document.rs:210
Method
new
()
crates/ruff_formatter/src/format_element/tag.rs:204
Method
new
(source: TextSize, dest: TextSize)
crates/ruff_diagnostics/src/source_map.rs:16
Method
new
(project: RealWorldProject<'a>)
crates/ruff_benchmark/benches/ty.rs:2828
Method
new
Creates the selected layout and records its expected modules and matching symbols.
crates/ruff_benchmark/benches/ty_ide.rs:160
Method
new
(project: RealWorldProject<'a>)
crates/ruff_benchmark/benches/ty_walltime.rs:23
Method
new
(name: &'static str, code: &'static str)
crates/ruff_benchmark/src/lib.rs:58
Method
new
Create a new task for the Python project at `project_path`. `truth` should correspond to the completion configuration and the expected answer for com
crates/ty_completion_eval/src/main.rs:271
Method
new
(f: &'fmt mut PyFormatter<'ast, 'buf, 'state>, sequence_end: TextSize)
crates/ruff_python_formatter/src/builders.rs:137
Method
new
(range: TextRange, context: &'a PyFormatContext<'ast>)
crates/ruff_python_formatter/src/range.rs:181
Method
new
(tokens: Iter<'a, AstToken>, verbatim_range: TextRange)
crates/ruff_python_formatter/src/verbatim.rs:817
Method
new
( options: PyFormatOptions, contents: &'a str, comments: Comments<'a>, trivia:
crates/ruff_python_formatter/src/context.rs:37
Method
new
( expression_comments: &LeadingDanglingTrailingComments<'a>, statement: AnyNodeRef<'a>,
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1159
Method
new
(context: &'input PyFormatContext)
crates/ruff_python_formatter/src/expression/mod.rs:614
Method
new
(index: usize)
crates/ruff_python_formatter/src/expression/binary_like.rs:1045
Method
new
(item: &'a DictItem)
crates/ruff_python_formatter/src/expression/expr_dict.rs:84
Method
new
(expr: &'a ExprTuple)
crates/ruff_python_formatter/src/expression/expr_tuple.rs:212
Method
new
Looks for a valid doctest PS1 prompt in the line given. If one was found, then state for a new doctest code example is returned, along with the code
crates/ruff_python_formatter/src/string/docstring.rs:881
Method
new
(input: &'str str, start_offset: usize)
crates/ruff_python_formatter/src/string/normalize.rs:776
Method
new
(string: impl Into<StringLike<'a>>)
crates/ruff_python_formatter/src/string/implicit.rs:36
Method
new
(flags: AnyStringFlags, layout: InterpolatedStringLayout)
crates/ruff_python_formatter/src/other/interpolated_string.rs:13
Method
new
(identifier: &'a Identifier)
crates/ruff_python_formatter/src/other/identifier.rs:52
Method
new
( element: &'a InterpolatedStringElement, context: InterpolatedStringContext, )
crates/ruff_python_formatter/src/other/interpolated_string_element.rs:31
Method
new
(slice: SourceCodeSlice, position: CommentLinePosition)
crates/ruff_python_formatter/src/comments/mod.rs:127
Method
new
(comment: &'a SourceComment, source_code: SourceCode<'a>)
crates/ruff_python_formatter/src/comments/debug.rs:18
Method
new
( source_code: SourceCode<'a>, comment_ranges: &'a CommentRanges, builder: &'builder m
crates/ruff_python_formatter/src/comments/visitor.rs:40
Method
new
()
crates/ruff_python_formatter/src/comments/map.rs:63
Method
new
(title: &'a str)
crates/ruff_python_formatter/tests/fixtures.rs:530
Method
new
()
crates/ruff_unicode_names2_generator/src/trie.rs:10
Method
new
()
crates/ruff_db/src/lib.rs:154
Method
new
(value: u128)
crates/ruff_db/src/file_revision.rs:17
Method
new
(raw_bytes: Vec<u8>)
crates/ruff_db/src/vendored.rs:46
Method
new
()
crates/ruff_db/src/cancellation.rs:18
Method
new
(revision: FileRevision, permissions: Option<u32>, file_type: FileType)
crates/ruff_db/src/system.rs:305
Method
new
(file: File, python_version: PythonVersion, parsed: Parsed<ModModule>)
crates/ruff_db/src/parsed.rs:126
Method
new
()
crates/ruff_db/src/testing.rs:184
Method
new
Creates a new resolved set of diagnostics.
crates/ruff_db/src/diagnostic/render.rs:129
Method
new
Create a new diagnostic with the given identifier, severity and message. The identifier should be something that uniquely identifies the _type_ of di
crates/ruff_db/src/diagnostic/mod.rs:60
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/grouped.rs:20
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/junit.rs:28
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/concise.rs:14
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/json_lines.rs:16
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/pylint.rs:21
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/gitlab.rs:20
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/full.rs:24
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/json.rs:25
Method
new
( resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig, metadata: FxHas
crates/ruff_db/src/diagnostic/render/sarif.rs:29
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/azure.rs:16
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/rdjson.rs:21
Method
new
(resolver: &'a dyn FileResolver, config: &'a DisplayDiagnosticConfig)
crates/ruff_db/src/diagnostic/render/github.rs:16
Method
new
Creates a command for the given executable.
crates/ruff_db/src/system/command.rs:17
Method
new
()
crates/ruff_db/src/system/memory_fs.rs:40
Method
new
(inner: impl WritableSystem + RefUnwindSafe + Send + Sync + 'static)
crates/ruff_db/src/system/test.rs:41
Method
new
(path: &(impl AsRef<Utf8Path> + ?Sized))
crates/ruff_db/src/system/path.rs:29
Method
new
(path: impl AsRef<SystemPath>, walker: W)
crates/ruff_db/src/system/walk_directory.rs:27
Method
new
()
crates/ruff_db/src/system/os/ignore.rs:40
Method
new
(indent: &'a Indentation, line_ending: LineEnding)
crates/ruff_python_codegen/src/generator.rs:118
Method
new
(indentation: String)
crates/ruff_python_codegen/src/stylist.rs:147
Method
new
( diagnostics: Vec<Diagnostic>, notebook_indexes: FxHashMap<String, NotebookIndex>, )
crates/ruff/src/diagnostics.rs:45
Method
new
( format: OutputFormat, log_level: LogLevel, fix_mode: flags::FixMode, unsafe_
crates/ruff/src/printer.rs:68
Method
new
(path: PathBuf, package: PackageCache)
crates/ruff/src/cache.rs:145
Method
new
(results: &'a [FormatPathResult], mode: FormatMode)
crates/ruff/src/commands/format.rs:536
Method
new
Creates a new test fixture with an empty temporary directory. This sets up: - A temporary directory that's automatically cleaned up - Insta snapshot
crates/ruff/tests/cli/main.rs:60
Method
new
()
crates/ruff/tests/cli/analyze_graph.rs:158
Method
new
()
crates/ruff/tests/cli/version.rs:100
Method
new
(source: ValueSource, is_toml: bool)
crates/ruff_ranged_value/src/lib.rs:77
Method
new
Creates an identifier matcher that borrows `name` without allocating. The identifier `name` is expected to be NFKC-normalized.
crates/ruff_python_trivia/src/name_matcher.rs:27
Method
new
Creates a combined set of token-derived range indexes.
crates/ruff_python_trivia/src/comment_ranges.rs:21
Method
new
(source: &'a str, range: TextRange)
crates/ruff_python_trivia/src/tokenizer.rs:516
Method
new
(source: &'a str)
crates/ruff_python_trivia/src/cursor.rs:18
Method
new
Create a new [`Resolver`] for the given [`RootSettings`].
crates/ruff_workspace/src/resolver.rs:73
Method
new
(project_root: &Path)
crates/ruff_workspace/src/settings.rs:167
Method
new
(client_capabilities: &ResolvedClientCapabilities)
crates/ruff_server/src/edit.rs:107
Method
new
( worker_threads: NonZeroUsize, connection: ConnectionInitializer, preview: Option<boo
crates/ruff_server/src/server.rs:51
Method
new
( client_capabilities: &ClientCapabilities, position_encoding: PositionEncoding, globa
crates/ruff_server/src/session.rs:62
Method
new
Create a new workspace with the given root URI.
crates/ruff_server/src/workspace.rs:85
Method
new
()
crates/ruff_server/src/session/request_queue.rs:17
Method
new
(client_capabilities: &ClientCapabilities)
crates/ruff_server/src/session/capabilities.rs:16
Method
new
( workspaces: &Workspaces, global: &GlobalClientSettings, client: &Client, )
crates/ruff_server/src/session/index.rs:74
Method
new
(main_loop_sender: MainLoopSender, client_sender: ConnectionSender)
crates/ruff_server/src/session/client.rs:22
Method
new
Create the settings index for the given workspace root. This will create the index in the following order: 1. Resolve any settings from above the wor
crates/ruff_server/src/session/index/ruff_settings.rs:134
Method
new
(err: anyhow::Error, code: server::ErrorCode)
crates/ruff_server/src/server/api.rs:394
Method
new
(worker_threads: NonZeroUsize)
crates/ruff_server/src/server/schedule.rs:39
Method
new
(priority: ThreadPriority)
crates/ruff_server/src/server/schedule/thread.rs:41
Method
new
(threads: NonZeroUsize)
crates/ruff_server/src/server/schedule/thread/pool.rs:48
Method
new
(contents: String, version: DocumentVersion)
crates/ruff_server/src/edit/text_document.rs:48
Method
new
( version: DocumentVersion, cells: Vec<lsp_types::NotebookCell>, metadata: Map<String,
crates/ruff_server/src/edit/notebook.rs:33
Method
new
Create a new test server with the given workspace configurations
crates/ruff_server/tests/e2e/main.rs:194
Method
new
()
crates/ruff_cache/src/cache_key.rs:401
Method
new
(start: TextSize, end: TextSize)
crates/ruff_text_size/src/range.rs:49
← previous
next →
25,501–25,600 of 31,766, ranked by callers