MCPcopy Create free account

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

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

↓ 1 callersMethodcontains_name_with_prefix
Returns whether any entry name starts with `prefix`.
crates/ruff_db/src/files/directory.rs:24
↓ 1 callersMethodcontains_never
(&self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:2022
↓ 1 callersMethodcontains_none
Check if the [`TypingTarget`] explicitly allows `None`.
crates/ruff_linter/src/rules/ruff/typing.rs:165
↓ 1 callersMethodcontains_place
Returns whether any predicate may narrow `place`.
crates/ty_python_core/src/use_def.rs:674
↓ 1 callersMethodcontains_quote
(&self, range: TextRange, flags: AnyStringFlags)
crates/ruff_python_formatter/src/string/normalize.rs:997
↓ 1 callersFunctioncontains_quotes
Return `true` if the string contains quotes.
crates/ruff_linter/src/rules/pyupgrade/rules/f_strings.rs:130
↓ 1 callersFunctioncontains_side_effecting_sub_expression
(target: &Expr)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_dict_comprehension_for_iterable.rs:233
↓ 1 callersMethodcontains_type_form_value
(&self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/type_form.rs:73
↓ 1 callersFunctioncontains_unescaped_newline
(haystack: &str)
crates/ruff_python_formatter/src/string/docstring.rs:217
↓ 1 callersFunctioncontains_yield_like
Return `true` if the [`Expr`] contains an `await`, `yield`, or `yield from` expression.
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:421
↓ 1 callersFunctioncontentHash
(content: string)
playground/shared/src/downloadZip.ts:34
↓ 1 callersMethodcontext
Returns the Context specifying how to format the current CST
crates/ruff_formatter/src/formatter.rs:37
↓ 1 callersFunctioncontext_manager_iterator
UP052
crates/ruff_linter/src/rules/pyupgrade/rules/context_manager_iterator.rs:90
↓ 1 callersFunctioncontinue_in_finally
PLE0116
crates/ruff_linter/src/rules/pylint/rules/continue_in_finally.rs:89
↓ 1 callersMethodconvention
(&self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:98
↓ 1 callersFunctionconvert_call_to_conversion_flag
Generate a [`Fix`] to replace an explicit type conversion with a conversion flag.
crates/ruff_linter/src/rules/ruff/rules/explicit_f_string_type_conversion.rs:138
↓ 1 callersFunctionconvert_f_string_to_regular_string
Generate an [`Edit`] to rewrite an f-string as a regular string.
crates/ruff_linter/src/rules/pyflakes/rules/f_string_missing_placeholders.rs:125
↓ 1 callersFunctionconvert_for_loop_to_any_all
SIM110, SIM111
crates/ruff_linter/src/rules/flake8_simplify/rules/reimplemented_builtin.rs:75
↓ 1 callersFunctionconvert_inplace_argument_to_assignment
Remove the `inplace` argument from a function call and replace it with an assignment.
crates/ruff_linter/src/rules/pandas_vet/rules/inplace_argument.rs:115
↓ 1 callersFunctionconvert_iou
iou 转换,还原原始的韵母 iou,uei,uen前面加声母的时候,写成iu,ui,un。 例如niu(牛),gui(归),lun(论)。
crates/ruff_benchmark/resources/pypinyin.py:127
↓ 1 callersFunctionconvert_named_tuple_functional_to_class
UP014
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:78
↓ 1 callersFunctionconvert_to_class
Generate a `Fix` to convert a `TypedDict` from functional to class.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:297
↓ 1 callersFunctionconvert_to_class
Generate a `Fix` to convert a `NamedTuple` assignment to a class definition.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:255
↓ 1 callersFunctionconvert_to_constant
( literal: &ast::ExprNumberLiteral, constant: &'static str, checker: &Checker, )
crates/ruff_linter/src/rules/refurb/rules/math_constant.rs:75
↓ 1 callersFunctionconvert_to_dict_comprehension
( fix_type: DictComprehensionType, binding: &Binding, for_stmt: &ast::StmtFor, if_test: Option
crates/ruff_linter/src/rules/perflint/rules/manual_dict_comprehension.rs:314
↓ 1 callersFunctionconvert_to_elif
Generate [`Fix`] to convert an `else` block to an `elif` block.
crates/ruff_linter/src/rules/pylint/rules/collapsible_else_if.rs:109
↓ 1 callersFunctionconvert_to_fix
( iterable: &Expr, call: &ast::ExprCall, checker: &Checker, fix_style: QuadraticListSummationF
crates/ruff_linter/src/rules/ruff/rules/quadratic_list_summation.rs:141
↓ 1 callersFunctionconvert_to_list_extend
( fix_type: ComprehensionType, binding: &Binding, for_stmt: &ast::StmtFor, if_test: Option<&Ex
crates/ruff_linter/src/rules/perflint/rules/manual_list_comprehension.rs:369
↓ 1 callersFunctionconvert_to_lsp_document_symbol
( db: &dyn Db, file: File, symbols: &HierarchicalSymbols, id: SymbolId, symbol: SymbolInfo
crates/ty_server/src/server/api/requests/document_symbols.rs:93
↓ 1 callersFunctionconvert_to_lsp_item
( db: &ProjectDatabase, item: ty_ide::TypeHierarchyItem, encoding: PositionEncoding, )
crates/ty_server/src/server/api/type_hierarchy.rs:50
↓ 1 callersFunctionconvert_to_positional
Generate an [`Expr`] to replace `defaultdict(default_factory=callable)` with `defaultdict(callable)`. For example, given `defaultdict(default_factory
crates/ruff_linter/src/rules/ruff/rules/default_factory_kwarg.rs:134
↓ 1 callersFunctionconvert_to_reduce
Generate a [`Fix`] to convert a `sum()` call to a `functools.reduce()` call.
crates/ruff_linter/src/rules/ruff/rules/quadratic_list_summation.rs:174
↓ 1 callersFunctionconvert_to_starred_list_comprehension
( iterable: &Expr, call: &ast::ExprCall, checker: &Checker, )
crates/ruff_linter/src/rules/ruff/rules/quadratic_list_summation.rs:157
↓ 1 callersFunctionconvert_type_vars
( generic_base: &ExprSubscript, old_style_type_vars: &Expr, type_params: &TypeParams, class_ar
crates/ruff_linter/src/rules/ruff/rules/class_with_mixed_type_vars.rs:130
↓ 1 callersFunctionconvert_typed_dict_functional_to_class
UP013
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:88
↓ 1 callersFunctionconvert_uei
uei 转换,还原原始的韵母 iou,uei,uen前面加声母的时候,写成iu,ui,un。 例如niu(牛),gui(归),lun(论)。
crates/ruff_benchmark/resources/pypinyin.py:136
↓ 1 callersFunctionconvert_uen
uen 转换,还原原始的韵母 iou,uei,uen前面加声母的时候,写成iu,ui,un。 例如niu(牛),gui(归),lun(论)。
crates/ruff_benchmark/resources/pypinyin.py:145
↓ 1 callersFunctionconvert_uv
ü 转换,还原原始的韵母 ü行的韵跟声母j,q,x拼的时候,写成ju(居),qu(区),xu(虚), ü上两点也省略;但是跟声母n,l拼的时候,仍然写成nü(女),lü(吕)。
crates/ruff_benchmark/resources/pypinyin.py:116
↓ 1 callersFunctionconvert_zero_consonant
零声母转换,还原原始的韵母 i行的韵母,前面没有声母的时候,写成yi(衣),ya(呀),ye(耶),yao(腰), you(忧),yan(烟),yin(因),yang(央),ying(英),yong(雍)。 u行的韵母,前面没有声母的时候,写成wu(乌),wa(蛙),wo
crates/ruff_benchmark/resources/pypinyin.py:67
↓ 1 callersMethodconverter_input_type_for_field
Returns the converter input type for a dataclass field, if the field has a `converter`.
crates/ty_python_semantic/src/types/class.rs:2231
↓ 1 callersMethodconverter_input_type_for_field
Returns the converter's input type (i.e., the type of its first positional parameter) for a dataclass field, if the field has a converter function spe
crates/ty_python_semantic/src/types/class/static_literal.rs:3343
↓ 1 callersFunctionconvertible
Returns `true` if the sequence of [`PercentFormatPart`] indicate that an [`Expr`] can be converted.
crates/ruff_linter/src/rules/pyupgrade/rules/printf_string_formatting.rs:311
↓ 1 callersFunctioncoord_repr
(src: str, pos: Pos)
crates/ruff_benchmark/resources/tomllib/_parser.py:656
↓ 1 callersFunctioncopyAsMarkdown
(workspace: Workspace)
playground/ty/src/Editor/persist.ts:41
↓ 1 callersFunctioncopyAsMarkdown
( settingsSource: string, pythonSource: string, )
playground/ruff/src/Editor/settings.ts:59
↓ 1 callersFunctioncopyAsMarkdownLink
(workspace: Workspace)
playground/ty/src/Editor/persist.ts:33
↓ 1 callersFunctioncopyAsMarkdownLink
( settingsSource: string, pythonSource: string, )
playground/ruff/src/Editor/settings.ts:48
↓ 1 callersFunctioncopy_directory_recursive
(db: &mut Db, src: &SystemPath, dest: &SystemPath)
crates/ty_test/src/external_dependencies.rs:191
↓ 1 callersFunctioncopy_file
Copies `src` to `dst` while looking for cursor directives. Each cursor directive looks like: `<CURSOR [expected-module.]expected-symbol>`. When occu
crates/ty_completion_eval/src/main.rs:597
↓ 1 callersFunctioncopy_project
Copy the Python project from `src_dir` to `dst_dir`. This also looks for occurrences of cursor directives among the project files and returns them. T
crates/ty_completion_eval/src/main.rs:543
↓ 1 callersFunctioncopy_site_packages_to_db
Copy the site-packages directory from a real virtual environment to the in-memory filesystem of `db`. This recursively copies all files from the venv
crates/ty_test/src/external_dependencies.rs:155
↓ 1 callersMethodcopy_to_memory_fs
Copies the entire project to a memory file system.
crates/ruff_benchmark/src/real_world_projects.rs:126
↓ 1 callersFunctioncorpus_name
Use the Python patch version, generator version, and seed range as the artifact key. The generator uses Python's `ast` module, which can change b
python/py-fuzzer/prepare_corpus.py:45
↓ 1 callersFunctioncorresponding_context_expr
(binding: &Binding, with: &'a ast::StmtWith)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/assertion.rs:460
↓ 1 callersMethodcould_exist_in_mro_of
Return `true` if this class could exist in the MRO of `other`.
crates/ty_python_semantic/src/types/class.rs:1639
↓ 1 callersMethodcould_inherit_from
Whether an unknown base could supply an otherwise unproven subclass relationship. Call this after ruling out known subclass relationships in both dir
crates/ty_python_semantic/src/types/class.rs:1570
↓ 1 callersMethodcount
(self)
crates/ruff_linter/resources/test/fixtures/pylint/no_self_use.py:63
↓ 1 callersFunctioncount_bools
Count the number of Boolean expressions in a `bool_op` expression.
crates/ruff_linter/src/rules/pylint/rules/too_many_boolean_expressions.rs:79
↓ 1 callersFunctioncount_consecutive_chars_from_end
(s: &str, target: char)
crates/ruff_python_formatter/src/string/docstring.rs:1625
↓ 1 callersFunctioncount_diagnostic_signatures
Count occurrences of each diagnostic signature.
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:452
↓ 1 callersFunctioncount_f_string_chars
Count the number of visible characters in an f-string. This accounts for implicitly concatenated f-strings as well.
crates/ruff_linter/src/rules/flake8_pyi/rules/string_or_bytes_too_long.rs:100
↓ 1 callersMethodcounts
(&self)
crates/ruff_linter/src/linter.rs:69
↓ 1 callersFunctioncovariant_supertype_hint
( class: StaticClassLiteral<'db>, db: &'db dyn Db, mismatched_invariant_parameters: &[usize], )
crates/ty_python_semantic/src/types/diagnostic.rs:1859
↓ 1 callersMethodcover_offset
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:268
↓ 1 callersMethodcover_range
(mut self, range: TextRange)
crates/ruff_db/src/files.rs:690
↓ 1 callersFunctioncrate_version_exists
Return True if the crate version already exists on crates.io.
scripts/publish-crates.py:102
↓ 1 callersFunctioncrate_version_url
(crate: Crate, api_url: str)
scripts/publish-crates.py:96
↓ 1 callersMethodcreateVendoredModel
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:524
↓ 1 callersFunctioncreate_bound_method
( db: &'db dyn Db, program: Program<'db>, function: Type<'db>, builtins_class: Type<'db>, )
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:217
↓ 1 callersFunctioncreate_class_def_stmt
Generate a `StmtKind:ClassDef` statement based on the provided body, keywords, and base class.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_typed_dict_functional_to_class.rs:171
↓ 1 callersFunctioncreate_class_def_stmt
Generate a `StmtKind:ClassDef` statement based on the provided body and keywords.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:236
↓ 1 callersFunctioncreate_diagnostic
Create a [`Diagnostic`] for `parameter` and return an updated value of `seen_default`. While all of the *input* `parameter` values have default value
crates/ruff_linter/src/rules/fastapi/rules/fastapi_non_annotated_dependency.rs:238
↓ 1 callersFunctioncreate_diagnostic
(call: &ast::ExprCall, mode_arg: &Expr, mode: OpenMode, checker: &Checker)
crates/ruff_linter/src/rules/pyupgrade/rules/redundant_open_modes.rs:89
↓ 1 callersFunctioncreate_diagnostic_snapshot
( db: &dyn Db, tool_name: &'static str, relative_fixture_path: &Utf8Path, test: &parser::Markd
crates/mdtest/src/lib.rs:528
↓ 1 callersFunctioncreate_dict_rule
(src: str, pos: Pos, out: Output)
crates/ruff_benchmark/resources/tomllib/_parser.py:284
↓ 1 callersMethodcreate_directory
(&self, path: impl AsRef<SystemPath>)
crates/ruff_db/src/system/os/ignore.rs:69
↓ 1 callersMethodcreate_directory_all
(&self, path: &SystemPath)
crates/ruff_db/src/system/test.rs:245
↓ 1 callersMethodcreate_dynamic_enum_anchor
( &mut self, call_expr: &ast::ExprCall, definition: Option<Definition<'db>>, s
crates/ty_python_semantic/src/types/infer/builder/enum_call.rs:632
↓ 1 callersFunctioncreate_field_property
Create a property type for a namedtuple field.
crates/ty_python_semantic/src/types/class/named_tuple.rs:637
↓ 1 callersFunctioncreate_fields_from_fields_arg
Create a list of field assignments from the `NamedTuple` fields argument.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:186
↓ 1 callersFunctioncreate_fields_from_keywords
Create a list of field assignments from the `NamedTuple` keyword arguments.
crates/ruff_linter/src/rules/pyupgrade/rules/convert_named_tuple_functional_to_class.rs:222
↓ 1 callersFunctioncreate_fix
If possible, return a [`Fix`] for a violation of this rule. Avoid producing code that would raise an exception when `Literal[None] | None` would be f
crates/ruff_linter/src/rules/flake8_pyi/rules/redundant_none_literal.rs:159
↓ 1 callersFunctioncreate_fix_introduced_syntax_error_diagnostic
( db: &dyn Db, file: File, parsed: &ParsedModuleRef, )
crates/ty_python_semantic/src/fixes.rs:292
↓ 1 callersFunctioncreate_lexicon_and_offsets
Construct a huge string storing the text data, and return it, along with information about the position and frequency of the constituent words of the
crates/ruff_unicode_names2_generator/src/lib.rs:124
↓ 1 callersFunctioncreate_list_rule
(src: str, pos: Pos, out: Output)
crates/ruff_benchmark/resources/tomllib/_parser.py:302
↓ 1 callersMethodcreate_new_file
(&self, path: &SystemPath)
crates/ruff_db/src/system/memory_fs.rs:165
↓ 1 callersFunctioncreate_parameters
Create `ParameterDetails` objects from semantic displayed parameter details.
crates/ty_ide/src/signature_help.rs:248
↓ 1 callersMethodcreate_pattern_predicate
( &mut self, subject: Expression<'db>, pattern: &ast::Pattern, guard: Option<&
crates/ty_python_core/src/builder.rs:2789
↓ 1 callersFunctioncreate_phf
( data: &[(char, &str)], lambda: usize, max_tries: usize, )
crates/ruff_unicode_names2_generator/src/phf.rs:141
↓ 1 callersFunctioncreate_qualifier_suffix
(qualifiers: TypeQualifiers)
crates/ty_ide/src/hover.rs:441
↓ 1 callersFunctioncreate_remove_argument_fix
( call: &ast::ExprCall, mode_arg: &Expr, tokens: &Tokens, )
crates/ruff_linter/src/rules/pyupgrade/rules/redundant_open_modes.rs:110
↓ 1 callersFunctioncreate_signature_details_from_call_signature_details
Create signature details from `CallSignatureDetails`.
crates/ty_ide/src/signature_help.rs:200
↓ 1 callersFunctioncreate_test_cases
()
crates/ruff_benchmark/benches/parser.rs:28
↓ 1 callersFunctioncreate_test_cases
()
crates/ruff_benchmark/benches/lexer.rs:29
↓ 1 callersFunctioncreate_test_cases
()
crates/ruff_benchmark/benches/linter.rs:55
↓ 1 callersFunctioncreate_test_cases
()
crates/ruff_benchmark/benches/formatter.rs:31
↓ 1 callersFunctioncreate_test_notebook
(test_cells: Vec<TestCellContent>)
crates/ruff_server/src/edit/notebook.rs:273
↓ 1 callersFunctioncreate_test_uri
(index: usize)
crates/ruff_server/src/edit/notebook.rs:269
↓ 1 callersFunctioncreate_too_many_iterations_diagnostics
( file: File, fix_mode: FixMode, diagnostics: &[Diagnostic], )
crates/ty_python_semantic/src/fixes.rs:326
↓ 1 callersFunctionctx1
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E741.py:53
← previousnext →8,601–8,700 of 31,562, ranked by callers