MCPcopy Create free account

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

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

↓ 1 callersFunctiondiscover_pytest_tests
Returns collected pytest test functions and their containing classes in source order. Collection follows pytest's default conventions, including `uni
crates/ty_ide/src/pytest_test_discovery.rs:20
↓ 1 callersMethoddisjuncts
(&self, intersection: bool)
crates/ty_python_semantic/src/types/narrow.rs:1216
↓ 1 callersFunctiondispatch
()
crates/ty_python_semantic/resources/corpus/97_global_nonlocal_store.py:1
↓ 1 callersMethoddispatch
Dispatches a `task` by either running it as a blocking function or executing it on a background thread pool.
crates/ruff_server/src/server/schedule.rs:49
↓ 1 callersFunctiondisplace
(f1: u32, f2: u32, d1: u32, d2: u32)
crates/ruff_unicode_names2_generator/src/phf.rs:20
↓ 1 callersFunctiondisplace
(f1: u32, f2: u32, d1: u32, d2: u32)
crates/ruff_unicode_names2/src/lib.rs:273
↓ 1 callersMethoddisplay
(&'a self, source_code: SourceCode<'a>)
crates/ruff_formatter/src/format_element/document.rs:154
↓ 1 callersMethoddisplay_alias_declaration
Displays an alias declaration with its original type parameters, if this type denotes one. Recursive types without a source alias use ordinary type di
crates/ty_python_semantic/src/types/display.rs:981
↓ 1 callersFunctiondisplay_error
( f: &mut std::fmt::Formatter<'_>, sys_prefix_origin: &SysPrefixPathOrigin, given_path: &SystemPat
crates/ty_site_packages/src/lib.rs:1427
↓ 1 callersMethoddisplay_graph
Keep this around for debugging purposes
crates/ty_python_semantic/src/types/constraints.rs:1010
↓ 1 callersMethoddisplay_limit
(self, total: usize, preserve_full: bool)
crates/ty_python_semantic/src/types/display.rs:3076
↓ 1 callersMethoddisplay_materialization_kind
Returns the materialization wrapper needed for displaying this protocol. Fully static requirements need no wrapper. A generic specialization can alre
crates/ty_python_semantic/src/types/instance.rs:1866
↓ 1 callersMethoddisplay_maximum
(self)
crates/ty_python_semantic/src/types/tuple.rs:115
↓ 1 callersFunctiondisplay_method
Synthesize `get_<field>_display()` for fields with `choices` defined.
crates/ty_python_semantic/src/types/dedicated/django.rs:383
↓ 1 callersFunctiondisplay_parameters
(raw: &str)
crates/ty_ide/src/docstring/document/numpy.rs:1360
↓ 1 callersMethoddisplay_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:1104
↓ 1 callersMethoddisplay_with
( self, db: &'db dyn Db, env: &'env ProgramEnvironment<'db>, display_settings:
crates/ty_python_semantic/src/types/class_base.rs:527
↓ 1 callersFunctiondisplayed_parameters_for_signature
Build the parameter list shown for a rendered signature. Returns both the displayed parameters and a mapping from each parameter in `signature` to it
crates/ty_python_semantic/src/types/ide_support.rs:1044
↓ 1 callersFunctiondistribute_member_lookup_over_bound_or_constraints
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, bound_or_constraints: TypeVarBoundOrConstraints<
crates/ty_python_semantic/src/types.rs:1223
↓ 1 callersFunctiondjango_extra
S610
crates/ruff_linter/src/rules/flake8_bandit/rules/django_extra.rs:49
↓ 1 callersFunctiondjango_raw_sql
S611
crates/ruff_linter/src/rules/flake8_bandit/rules/django_raw_sql.rs:40
↓ 1 callersFunctiondoc_line_too_long
W505
crates/ruff_linter/src/rules/pycodestyle/rules/doc_line_too_long.rs:88
↓ 1 callersFunctiondoc_lines_from_ast
Extract doc lines (standalone strings) start positions from an AST.
crates/ruff_linter/src/doc_lines.rs:102
↓ 1 callersFunctiondoc_lines_from_tokens
Extract doc lines (standalone comments) from a token sequence.
crates/ruff_linter/src/doc_lines.rs:16
↓ 1 callersFunctiondocstring
Q002
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:257
↓ 1 callersFunctiondocstring_format_source
Formats the given source code using the given options. The given quote style should correspond to the style used by the docstring containing the code
crates/ruff_python_formatter/src/string/docstring.rs:1574
↓ 1 callersFunctiondocstring_in_stubs
PYI021
crates/ruff_linter/src/rules/flake8_pyi/rules/docstring_in_stubs.rs:46
↓ 1 callersMethoddocument
(&self, file: File)
crates/ty_server/src/db.rs:23
↓ 1 callersMethoddocument
Returns the formatted document.
crates/ruff_formatter/src/lib.rs:310
↓ 1 callersFunctiondocument_revision
Helper function to get the [`FileRevision`] of the given document.
crates/ty_server/src/system.rs:360
↓ 1 callersMethoddocument_target
Selects an open document or a supported closed document for a request.
crates/ty_server/src/session.rs:1282
↓ 1 callersFunctiondocumentation
()
crates/ruff_linter/src/registry.rs:506
↓ 1 callersMethoddocumentation
()
crates/ty_project/src/metadata/options.rs:2121
↓ 1 callersMethoddocumentation
(self, docs: impl Into<String>)
crates/ty_ide/src/completion.rs:629
↓ 1 callersFunctiondocumentation_for_parameter
(docstring: &Docstring, name: &str)
crates/ty_ide/src/hover.rs:318
↓ 1 callersFunctiondocumentation_fragment_trim
Normalizes an extracted docstring fragment without removing meaningful relative indentation.
crates/ty_ide/src/docstring.rs:65
↓ 1 callersMethoddocumentation_url
Set the documentation URL for the diagnostic.
crates/ruff_db/src/diagnostic/render.rs:2883
↓ 1 callersFunctiondouble_negation
SIM208
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_unary_op.rs:265
↓ 1 callersMethoddrain_assignment_queue
( &mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Con
crates/ty_python_semantic/src/types/constraints/paths.rs:866
↓ 1 callersMethoddrain_messages
Drain all messages from the server.
crates/ty_server/tests/e2e/main.rs:333
↓ 1 callersMethoddrain_messages
Drain all messages from the server.
crates/ruff_server/tests/e2e/main.rs:270
↓ 1 callersFunctiondraw_cfg
Returns control flow graph in Mermaid syntax.
crates/ruff_python_semantic/src/cfg/visualize.rs:9
↓ 1 callersFunctiondraw_code_line
( renderer: &Renderer, buffer: &mut StyledBuffer, row_num: &mut usize, highlight_parts: &[Subs
crates/ruff_annotate_snippets/src/renderer/render.rs:1816
↓ 1 callersFunctiondraw_col_separator
(renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize)
crates/ruff_annotate_snippets/src/renderer/render.rs:2199
↓ 1 callersFunctiondraw_col_separator_start
( renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize, )
crates/ruff_annotate_snippets/src/renderer/render.rs:2214
↓ 1 callersMethoddraw_edges
(&self, node: Self::Node)
crates/ruff_python_semantic/src/cfg/visualize.rs:218
↓ 1 callersMethoddraw_graph
(&self)
crates/ruff_python_semantic/src/cfg/visualize.rs:17
↓ 1 callersFunctiondraw_line_separator
(renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize)
crates/ruff_annotate_snippets/src/renderer/render.rs:2311
↓ 1 callersFunctiondraw_multiline_line
( renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, offset: usize, depth: usize
crates/ruff_annotate_snippets/src/renderer/render.rs:2169
↓ 1 callersFunctiondraw_note_separator
( renderer: &Renderer, buffer: &mut StyledBuffer, line: usize, col: usize, is_cont: bool,
crates/ruff_annotate_snippets/src/renderer/render.rs:2300
↓ 1 callersFunctiondraw_range
( buffer: &mut StyledBuffer, symbol: char, line: usize, col_from: usize, col_to: usize,
crates/ruff_annotate_snippets/src/renderer/render.rs:2156
↓ 1 callersMethoddrop
(&mut self)
crates/ruff_python_formatter/src/context.rs:299
↓ 1 callersMethoddrop
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3998
↓ 1 callersFunctiondummy_return
()
crates/ruff_linter/resources/test/fixtures/pylint/misplaced_comparison_constant.py:13
↓ 1 callersMethoddummy_return
(self)
crates/ruff_linter/resources/test/fixtures/pylint/misplaced_comparison_constant.py:10
↓ 1 callersMethoddunder
(self)
crates/ty_python_semantic/src/types/infer/comparisons.rs:650
↓ 1 callersFunctiondunder_all_extend_argument
Returns the single argument to `__all__.extend()`, if it is a call to `__all__.extend()` where it looks like the argument might be a `submodule.__all_
crates/ty_python_core/src/builder.rs:6181
↓ 1 callersMethoddunder_all_names_for_import_from
Returns the names in `__all__` from the module imported from the given `import_from` statement. Returns [`None`] if module resolution fails, invalid
crates/ty_python_semantic/src/dunder_all.rs:165
↓ 1 callersMethoddunder_class_cell_definition
(self)
crates/ty_python_semantic/src/place_load.rs:1313
↓ 1 callersFunctiondunder_function_name
N807
crates/ruff_linter/src/rules/pep8_naming/rules/dunder_function_name.rs:53
↓ 1 callersFunctionduplicate_bases
PLE0241
crates/ruff_linter/src/rules/pylint/rules/duplicate_bases.rs:80
↓ 1 callersFunctionduplicate_class_field_definition
PIE794
crates/ruff_linter/src/rules/flake8_pie/rules/duplicate_class_field_definition.rs:58
↓ 1 callersFunctionduplicate_entry_in_dunder_all_ann_assign
Apply RUF068 to a `StmtAnnAssign` AST node. For example: `__all__: list[str] = ["a", "b", "a"]`.
crates/ruff_linter/src/rules/ruff/rules/duplicate_entry_in_dunder_all.rs:110
↓ 1 callersFunctionduplicate_entry_in_dunder_all_assign
Apply RUF068 to `StmtAssign` AST node. For example: `__all__ = ["a", "b", "a"]`.
crates/ruff_linter/src/rules/ruff/rules/duplicate_entry_in_dunder_all.rs:69
↓ 1 callersFunctionduplicate_entry_in_dunder_all_aug_assign
Apply RUF068 to `StmtAugAssign` AST node. For example: `__all__ += ["a", "b", "a"]`.
crates/ruff_linter/src/rules/ruff/rules/duplicate_entry_in_dunder_all.rs:79
↓ 1 callersFunctionduplicate_entry_in_dunder_all_extend_call
Apply RUF068 to `__all__.extend()`.
crates/ruff_linter/src/rules/ruff/rules/duplicate_entry_in_dunder_all.rs:89
↓ 1 callersFunctionduplicate_exceptions
B025
crates/ruff_linter/src/rules/flake8_bugbear/rules/duplicate_exceptions.rs:194
↓ 1 callersFunctionduplicate_handler_exceptions
B014
crates/ruff_linter/src/rules/flake8_bugbear/rules/duplicate_exceptions.rs:129
↓ 1 callersFunctionduplicate_isinstance_call
SIM101
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:345
↓ 1 callersFunctionduplicate_literal_member
PYI062
crates/ruff_linter/src/rules/flake8_pyi/rules/duplicate_literal_member.rs:61
↓ 1 callersFunctionduplicate_union_member
PYI016
crates/ruff_linter/src/rules/flake8_pyi/rules/duplicate_union_member.rs:62
↓ 1 callersFunctionduplicate_value
B033
crates/ruff_linter/src/rules/flake8_bugbear/rules/duplicate_value.rs:74
↓ 1 callersFunctionduplicates
Determine the set of keywords that appear in multiple positions (either directly, as in `func(x=1)`, or indirectly, as in `func(**{"x": 1})`).
crates/ruff_linter/src/rules/flake8_pie/rules/unnecessary_dict_kwargs.rs:187
↓ 1 callersMethodduplication_variance
(self)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_comprehension_in_call.rs:224
↓ 1 callersMethoddyn_clone
(&self)
crates/ty_project/src/db.rs:656
↓ 1 callersMethoddyn_clone
(&self)
crates/ty_python_semantic/src/db.rs:215
↓ 1 callersFunctiondynamic_content
Determine whether `ty` contains any dynamic type.
crates/ty_python_semantic/src/types/visitor.rs:473
↓ 1 callersFunctiondynamic_generalization_intersection
Intersect two specializations of the same generic class if `general` only differs from `specific` by using dynamic types. For example, `list[Any]` dy
crates/ty_python_semantic/src/types/set_theoretic/generic_gradual_intersections.rs:205
↓ 1 callersMethodeat_action
(&mut self)
crates/ruff_linter/src/suppression.rs:1277
↓ 1 callersMethodeat_char3
(&mut self, c1: char, c2: char, c3: char)
crates/ruff_python_trivia/src/cursor.rs:130
↓ 1 callersMethodeat_char3
(&mut self, c1: char, c2: char, c3: char)
crates/ruff_python_parser/src/lexer/cursor.rs:124
↓ 1 callersMethodeat_codes
( &mut self, kind: SuppressionKind, )
crates/ty_python_semantic/src/suppression/parser.rs:87
↓ 1 callersMethodeat_codes
(&mut self)
crates/ruff_linter/src/suppression.rs:1312
↓ 1 callersMethodeat_indentation
(&mut self)
crates/ruff_python_parser/src/lexer.rs:230
↓ 1 callersMethodeat_kind
(&mut self)
crates/ty_python_semantic/src/suppression/parser.rs:59
↓ 1 callersMethodeat_word
(&mut self)
crates/ty_python_semantic/src/suppression/parser.rs:137
↓ 1 callersMethodeat_word
(&mut self)
crates/ruff_linter/src/suppression.rs:1362
↓ 1 callersFunctionecosystem_python_files
( corpus_directory: Path, *, environment: dict[str, str] )
scripts/build_ruff_pgo.py:374
↓ 1 callersMethodedit_attribute_reference
Chooses a reference edit for an attribute such as `pkg.old`. Both the attribute and its receiver must resolve to modules. For attributes defined in t
crates/ty_ide/src/will_rename.rs:943
↓ 1 callersMethodedit_import_from
Computes imported name and module name edits for an import-from statement. For example, `from pkg import old` becomes `from pkg import new`, and `fro
crates/ty_ide/src/will_rename.rs:431
↓ 1 callersMethodedit_name_reference
Chooses a reference edit for a name by considering the definitions that connect that name to a bound name change from an import statement.
crates/ty_ide/src/will_rename.rs:906
↓ 1 callersMethodedit_plain_import
Computes imported name edits for a plain import statement, such as `import old` to `import new`.
crates/ty_ide/src/will_rename.rs:416
↓ 1 callersMethodedit_string_annotation_references
Computes reference edits in string annotations, such as `value: 'old.C'`. Ordinary strings in `__all__ = ["old"]` or `importlib.import_module("pkg.ol
crates/ty_ide/src/will_rename.rs:1016
↓ 1 callersMethodeditable_inline_suppressions_rev
Returns applicable comments whose targets allow `--add-ignore` to append a code, in reverse source order. The interval index filters out blanket supp
crates/ty_python_semantic/src/suppression.rs:429
↓ 1 callersMethodeditable_owner
(&self, path: &SystemPath)
crates/ty_python_semantic/src/dependency.rs:275
↓ 1 callersFunctioneditable_search_paths
Returns the validated roots listed in the environment's `.pth` files. Unlike [`search_paths`], this includes editable roots that are also first-party
crates/ty_module_resolver/src/resolve.rs:1016
↓ 1 callersFunctioneditable_suppression_prefix
Returns the portion of an ignore comment before its closing bracket if another code can be appended to it. ```python # ty: ignore[] # Editabl
crates/ty_python_semantic/src/suppression/add_ignore.rs:309
↓ 1 callersFunctionedits_for_file
Computes edits for one candidate file in two AST passes. 1. [`ImportStatementVisitor`] extracts source edits and bound name changes from import state
crates/ty_ide/src/will_rename.rs:332
↓ 1 callersMethodelement
Return the generated element for the candidate.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_starmap.rs:216
↓ 1 callersMethodelement_type
Returns the element type if it is known, or `None` if the type is never iterable.
crates/ty_python_semantic/src/types/iteration.rs:678
← previousnext →9,001–9,100 of 31,766, ranked by callers