Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/astral-sh/ruff
/ functions
Functions
31,562 in github.com/astral-sh/ruff
⨍
Functions
31,562
◇
Types & classes
7,116
↳
Endpoints
82
Method
new
Construct a new [`PerFile`] from the given glob `pattern` and containing `data`. If provided, `project_root` is used to construct a second glob patte
crates/ruff_linter/src/settings/types.rs:345
Method
new
( checker: &'a Checker<'b>, candidates: Vec<FileOpen<'a>>, with_stmt: &'a ast::StmtWit
crates/ruff_linter/src/rules/refurb/rules/write_whole_file.rs:110
Method
new
( checker: &'a Checker<'b>, candidates: Vec<FileOpen<'a>>, with_stmt: &'a ast::StmtWit
crates/ruff_linter/src/rules/refurb/rules/read_whole_file.rs:110
Method
new
(name: &'static str, bytes: &'static [u8])
crates/ruff_linter/src/rules/refurb/rules/hardcoded_string_charset.rs:69
Method
new
Create a new [`ReraiseVisitor`] with the given exception name.
crates/ruff_linter/src/rules/flake8_blind_except/rules/blind_except.rs:146
Method
new
( semantic: &'a SemanticModel<'a>, stylist: &'a Stylist<'a>, locator: &'a Locator<'a>,
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:442
Method
new
(decorators: &'a BTreeSet<String>)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:137
Method
new
( first_party: Vec<IdentifierPattern>, third_party: Vec<IdentifierPattern>, local_fold
crates/ruff_linter/src/rules/isort/categorize.rs:309
Method
new
( locator: &'a Locator<'a>, directives: &'a IsortDirectives, is_stub: bool, ce
crates/ruff_linter/src/rules/isort/block.rs:41
Method
new
(parameters: &'a Parameters)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_map.rs:321
Method
new
(ty: TokenType, range: TextRange)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:47
Method
new
(stmt: &'a Stmt, checker: &Checker)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:93
Method
new
(semantic: &'semantic SemanticModel<'data>)
crates/ruff_linter/src/rules/flake8_return/visitor.rs:58
Method
new
(s: &'a str, max_split: usize, method: Method)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:325
Method
new
(target: &'a str)
crates/ruff_linter/src/rules/perflint/rules/unnecessary_list_cast.rs:168
Method
new
(input: &'a str)
crates/ruff_linter/src/rules/fastapi/rules/fastapi_unused_path_parameter.rs:508
Method
new
(elements: &'a [&str], elts: &'a [ast::Expr])
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:191
Method
new
(locator: &'loc Locator<'src>)
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:121
Method
new
(offset: TextSize, confusable: char, representant: char)
crates/ruff_linter/src/rules/ruff/rules/ambiguous_unicode_character.rs:333
Method
new
( comment_ranges: I, builder: &'builder mut (dyn CaptureSuppressionComment<'src> + 'src),
crates/ruff_linter/src/rules/ruff/rules/suppression_comment_visitor.rs:41
Method
new
(semantic: &'semantic SemanticModel<'a>)
crates/ruff_linter/src/rules/ruff/rules/unnecessary_assign_before_yield.rs:174
Method
new
Creates a new visitor with the given checker.
crates/ruff_linter/src/rules/ruff/rules/fallible_context_manager.rs:113
Method
new
(node: &'a ast::Expr)
crates/ruff_linter/src/rules/ruff/rules/sort_dunder_slots.rs:204
Method
new
(checker: &'a Checker<'b>, target_version: PythonVersion)
crates/ruff_linter/src/rules/flake8_quotes/rules/avoidable_escaped_quote.rs:96
Method
new
( tokens: &'a Tokens, locator: &'a Locator, indent_width: IndentWidth, cell_of
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:408
Method
new
(checker: &'a Checker<'b>, exception_name: &'a str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:247
Method
new
(semantic: &'a SemanticModel)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:905
Method
new
(preview: PreviewMode)
crates/ruff_linter/src/rules/flake8_import_conventions/settings.rs:104
Method
new
(semantic: &'a SemanticModel<'b>, logger_objects: &'a [String])
crates/ruff_linter/src/rules/tryceratops/helpers.rs:16
Method
new
(sequence_name: &'a str, index_name: &'a str, value_name: &'a str)
crates/ruff_linter/src/rules/pylint/helpers.rs:82
Method
new
(stmt_for: &'a StmtFor, dict_name: &'a ast::ExprName, checker: &'a Checker<'b>)
crates/ruff_linter/src/rules/pylint/rules/dict_index_missing_items.rs:108
Method
new
(module: &'a str, name: &'a str)
crates/ruff_linter/src/rules/numpy/helpers.rs:18
Method
new
Initialize the visitor.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:220
Method
new
(group_name: &'a str)
crates/ruff_linter/src/rules/flake8_bugbear/rules/reuse_of_groupby_generator.rs:77
Method
new
(checker: &'a Checker<'b>, extend_immutable_calls: &'a [QualifiedName<'b>])
crates/ruff_linter/src/rules/flake8_bugbear/rules/function_call_in_argument_default.rs:96
Method
new
(keyword: impl Into<DeferralKeyword>)
crates/ruff_linter/src/rules/pyflakes/rules/yield_outside_function.rs:64
Method
new
(shadowed: &'a Binding<'a>, binding: &'a Binding<'a>)
crates/ruff_linter/src/rules/pyflakes/rules/redefined_while_unused.rs:314
Method
new
(range: T, op: CmpOp)
crates/ruff_linter/src/rules/pyflakes/rules/invalid_literal_comparisons.rs:223
Method
new
()
crates/ruff_linter/src/rules/pyupgrade/rules/super_call_with_parameters.rs:333
Method
new
( import_from_stmt: &'a StmtImportFrom, module: &'a str, locator: &'a Locator<'a>,
crates/ruff_linter/src/rules/pyupgrade/rules/deprecated_import.rs:438
Method
new
(locator: &'a Locator<'a>, comments: &'a CommentRanges)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_coding_comment.rs:138
Method
new
(source_code: String)
crates/ruff_linter/src/fix/snippet.rs:8
Method
new
(notebook_indexes: &'a FxHashMap<String, NotebookIndex>)
crates/ruff_linter/src/message/mod.rs:206
Method
new
(path: SystemPathBuf, settings_diagnostic_path: Option<SystemPathBuf>)
crates/ty_site_packages/src/lib.rs:65
Method
new
(path: Arc<SystemPathBuf>, range: Option<TextRange>)
crates/ty_site_packages/src/version.rs:59
Method
new
()
crates/ruff_index/src/vec.rs:18
Method
new
()
fuzz/fuzz_targets/ty_check_invalid_syntax.rs:45
Function
new_209
First line. More lines.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D.py:382
Function
new_assignment
()
crates/ruff_linter/src/rules/pyflakes/mod.rs:2437
Method
new_code_block
Attempts to create a new reStructuredText code example from a `code-block` or `sourcecode` directive. If one couldn't be found, then `None` is returne
crates/ruff_python_formatter/src/string/docstring.rs:1057
Method
new_constraint
Creates a new BDD node for an individual constraint. (The BDD will evaluate to `true` when the constraint holds, and to `false` when it does not.)
crates/ty_python_semantic/src/types/constraints.rs:2409
Function
new_directory_with_python_files
()
crates/ty/tests/file_watching.rs:715
Method
new_empty
Construct an empty formatter result
crates/ruff_formatter/src/lib.rs:379
Method
new_equivalence_bound
Returns the constraints that model the requirement that `typevar` must be equivalent to `bound`. An equality is represented by one equivalence constr
crates/ty_python_semantic/src/types/constraints/variables.rs:381
Function
new_file
()
crates/ty/tests/file_watching.rs:692
Function
new_file_in_ignored_directory
()
crates/ty/tests/file_watching.rs:804
Function
new_file_in_included_out_of_project_directory
()
crates/ty/tests/file_watching.rs:1007
Function
new_file_in_parent_ignored_directory
()
crates/ty/tests/file_watching.rs:831
Function
new_files_with_explicit_included_paths
()
crates/ty/tests/file_watching.rs:967
Method
new_flat
( print_queue: &'print PrintQueue<'a>, print_stack: &'print PrintCallStack, printer: &
crates/ruff_formatter/src/printer/mod.rs:1056
Method
new_from_vec
(prefix: Vec<T>, variable: V, suffix: Vec<T>)
crates/ty_python_semantic/src/types/tuple.rs:1204
Function
new_function_inserted_after_test_start
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/range_formatting/regressions.py:84
Method
new_generic
( generic_context: Option<GenericContext<'db>>, parameters: Parameters<'db>, return_ty
crates/ty_python_semantic/src/types/signatures.rs:968
Method
new_heap
(name: impl AsRef<str>)
crates/ruff_python_ast/src/name.rs:67
Function
new_ignore_file_in_ignored_directory
()
crates/ty/tests/file_watching.rs:857
Function
new_ignored_file
()
crates/ty/tests/file_watching.rs:782
Method
new_impl
(data: ArchiveData)
crates/ruff_db/src/vendored.rs:50
Method
new_inline
(name: impl AsRef<str>)
crates/ruff_python_ast/src/name.rs:61
Method
new_inner
( client: &Client, request_token: Option<ProgressToken>, begin: WorkDoneProgressBegin,
crates/ty_server/src/server/lazy_work_done_progress.rs:90
Method
new_lower_bound
Returns the constraints that model the requirement that `bound` must be assignable to `typevar`. Union lower bounds are broken apart into separate con
crates/ty_python_semantic/src/types/constraints/variables.rs:215
Method
new_nodes
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut ConstraintSetStorage<'
crates/ty_python_semantic/src/types/constraints/variables.rs:134
Function
new_non_project_file
()
crates/ty/tests/file_watching.rs:929
Function
new_non_python_file_is_not_indexed
()
crates/ty/tests/file_watching.rs:761
Method
new_notebook
(document: NotebookDocument)
crates/ty_server/src/session/index.rs:243
Method
new_notebook
(document: NotebookDocument)
crates/ruff_server/src/session/index.rs:490
Method
new_on_main_loop
Returns a progress reporter that displays an indicator if the main-loop action queue has capacity. Server-initiated progress requires sending a reque
crates/ty_server/src/server/lazy_work_done_progress.rs:76
Method
new_passes
(self)
scripts/conformance.py:462
Method
new_repr
(source: &'a str)
crates/ruff_python_literal/src/escape.rs:113
Method
new_satisfied_constraint
Creates a new BDD node for a positive, negative, or unconstrained individual constraint. (For a positive constraint, this returns the same BDD node as
crates/ty_python_semantic/src/types/constraints.rs:2424
Method
new_starts_at
Create a new parser for the given source code which starts parsing at the given offset.
crates/ruff_python_parser/src/parser/mod.rs:125
Method
new_static
(name: &'static str)
crates/ty_module_resolver/src/module_name.rs:64
Method
new_static
(raw_bytes: &'static [u8])
crates/ruff_db/src/vendored.rs:42
Method
new_static
(name: &'static str)
crates/ruff_python_ast/src/name.rs:72
Method
new_text
(document: TextDocument)
crates/ty_server/src/session/index.rs:239
Method
new_text
(document: TextDocument)
crates/ruff_server/src/session/index.rs:486
Method
new_upper_bound
Returns the constraints that model the requirement that `typevar` must be assignable to `bound`. Intersection upper bounds are broken apart into separ
crates/ty_python_semantic/src/types/constraints/variables.rs:303
Method
new_vec
Writes directly to a vector while retaining the buffer adapters for specialized writes.
crates/ruff_formatter/src/formatter.rs:22
Method
new_with_class
( db: &'db dyn Db, class: ClassType<'db>, getter: Option<Type<'db>>, setter: O
crates/ty_python_semantic/src/types.rs:1699
Method
new_with_parameter_heading
( range: TextRange, items: Vec<SectionItem>, parameter_heading: ParameterHeading,
crates/ty_ide/src/docstring/markdown/structured.rs:162
Method
new_with_settings
( db: &'db dyn Db, callable_type: Type<'db>, settings: Option<&DisplaySettings<'db>>,
crates/ty_python_semantic/src/types/call/bind.rs:9920
Method
new_with_vec
(state: &'a mut FormatState<Context>, elements: Vec<FormatElement>)
crates/ruff_formatter/src/buffer.rs:182
Function
newer_project_refresh_discards_old_metadata
()
crates/ty_project/src/uv/environments.rs:970
Method
newline
(&mut self)
crates/ruff_python_codegen/src/generator.rs:151
Function
newline_after_closing_quote
We enforce a newline after the closing quote for a multi-line docstring \ but continuations shouldn't be considered multi-line
crates/ruff_linter/resources/test/fixtures/pydocstyle/D.py:663
Function
newline_in_brackets_eol
(eol: &str)
crates/ruff_python_parser/src/lexer.rs:2122
Function
newline_sub_section_header
Below, `returns:` should be considered a section header. Args: arg: Here's a note. returns: Here's another note.
crates/ruff_linter/resources/test/fixtures/pydocstyle/sections.py:567
Function
newtype_index
(_metadata: TokenStream, input: TokenStream)
crates/ruff_macros/src/lib.rs:138
Method
next
(&mut self)
crates/ruff_formatter/shared_traits.rs:94
Method
next
(&mut self)
crates/ruff_python_formatter/src/shared_traits.rs:99
Method
next
(&mut self)
crates/ruff_db/src/system/memory_fs.rs:560
← previous
next →
25,601–25,700 of 31,562, ranked by callers