MCPcopy Create free account

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

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

↓ 1 callersMethodget_args
Returns the arguments passed to the executable.
crates/ruff_db/src/system/command.rs:96
↓ 1 callersFunctionget_argument_index
Determine which argument is associated with the specified offset. Returns zero if not within any argument.
crates/ty_ide/src/signature_help.rs:186
↓ 1 callersFunctionget_call_expr
Returns the innermost call expression that contains the specified offset and the index of the argument that the offset maps to.
crates/ty_ide/src/signature_help.rs:118
↓ 1 callersFunctionget_call_kind
Return the [`CallKind`] of the given function call.
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:455
↓ 1 callersFunctionget_comparison_to_none
If the regex call is compared to `None`, return the comparison and its range. Example: `re.search("abc", s) is None`
crates/ruff_linter/src/rules/ruff/rules/unnecessary_regular_expression.rs:441
↓ 1 callersFunctionget_completions
( db: &'db ProjectDatabase, path: &SystemPath, offset: ruff_text_size::TextSize, )
crates/ty_completion_bench/src/main.rs:133
↓ 1 callersFunctionget_complexity_number
(stmts: &[Stmt])
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:79
↓ 1 callersMethodget_current_dir
Returns the command's working directory, if explicitly configured.
crates/ruff_db/src/system/command.rs:101
↓ 1 callersFunctionget_docs
Collect all doc comment attributes into a string
crates/ruff_macros/src/rust_doc.rs:22
↓ 1 callersFunctionget_docs
Collect all doc comment attributes into a string
crates/ruff_macros/src/violation_metadata.rs:63
↓ 1 callersFunctionget_element_type
(element: &Stmt, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_django/rules/unordered_body_content_in_model.rs:155
↓ 1 callersMethodget_env_clear
(&self)
crates/ruff_db/src/system/command.rs:86
↓ 1 callersMethodget_envs
(&self)
crates/ruff_db/src/system/command.rs:74
↓ 1 callersMethodget_executable
Returns the executable to invoke.
crates/ruff_db/src/system/command.rs:91
↓ 1 callersFunctionget_executable_path
(name: str)
python/ruff-ecosystem/ruff_ecosystem/cli.py:184
↓ 1 callersFunctionget_expected_empty_workspace_diagnostics_and_shutdown
Asks for workspace diagnostics in a way that anticipates "long polling." This specifically occurs when there aren't any workspace diagnostics to repo
crates/ty_server/tests/e2e/workspace_folders.rs:1011
↓ 1 callersMethodget_extension
Return the [`Language`] for a given file extension.
crates/ruff_linter/src/settings/types.rs:513
↓ 1 callersFunctionget_fallback_target_version
Extract `target-version` from `pyproject.toml` in the given directory if the file exists and has `requires-python`.
crates/ruff_workspace/src/pyproject.rs:213
↓ 1 callersFunctionget_grammars
(target_versions: Set[TargetVersion])
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pattern_matching_generic.py:12
↓ 1 callersMethodget_heap_size_with_tracker
( &self, tracker: T, )
crates/ruff_db/src/parsed.rs:340
↓ 1 callersFunctionget_indent
(line: str)
scripts/add_rule.py:70
↓ 1 callersFunctionget_indent
(line: str)
scripts/add_plugin.py:60
↓ 1 callersFunctionget_key
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM910.py:80
↓ 1 callersFunctionget_mapping_data
Get the ambiguous character mapping data from the vscode-unicode-data repository. Uses the system's `curl` command to download the data,
scripts/update_ambiguous_characters.py:55
↓ 1 callersFunctionget_maxsplit_value
Returns the value of the `maxsplit` argument as an `i32`, if it is a numeric value.
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:253
↓ 1 callersFunctionget_metadata
Extract the rule metadata attributes. These attributes look like: ```ignore #[violation_metadata(stable_since = "1.2.3", category = Category::Correc
crates/ruff_macros/src/violation_metadata.rs:92
↓ 1 callersFunctionget_model_field_name
Return the name of the field type, if the expression is constructor for a Django model field.
crates/ruff_linter/src/rules/flake8_django/helpers.rs:37
↓ 1 callersMethodget_module_symbols
Return the symbols exported by the module referred to by `name`. e.g., This can be used to resolve `__all__ += submodule.__all__`, where `name` is `s
crates/ty_ide/src/symbols.rs:589
↓ 1 callersFunctionget_name_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:106
↓ 1 callersFunctionget_num_digits
(text: &str)
crates/ruff_python_literal/src/format.rs:262
↓ 1 callersFunctionget_operator
Return the `operator` implemented by the given expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:355
↓ 1 callersMethodget_operator
Returns the operator at the given index or `None` if it is out of bounds.
crates/ruff_python_formatter/src/expression/binary_like.rs:605
↓ 1 callersFunctionget_or_add
( map: &'b mut FxHashMap<BindingId, AppendGroup<'a>>, append: Append<'a>, )
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:252
↓ 1 callersMethodget_or_cache
Reads the provided file from the system cache, or creates the file if necessary. Returns `Ok(None)` if the system does not expose a suitable cache di
crates/ruff_db/src/system.rs:261
↓ 1 callersMethodget_or_evaluate
(&self, index: usize, evaluate: impl FnOnce() -> Truthiness)
crates/ty_python_semantic/src/reachability.rs:2161
↓ 1 callersMethodget_or_try_insert_with
( &self, path: &Path, project_root: &Path, load: impl FnOnce() -> Result<Confi
crates/ruff_workspace/src/resolver.rs:314
↓ 1 callersMethodget_parameter_list
Returns the parameter list to substitute for `paramspec` in the current callable signature. Choosing one parameter list for a signature must preserve
crates/ty_python_semantic/src/types/generics.rs:2355
↓ 1 callersFunctionget_parametrize_name_range
Returns the range of the `name` argument of `@pytest.mark.parametrize`. This accounts for parenthesized expressions. For example, the following code
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:343
↓ 1 callersFunctionget_permissions
(mode: u16)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:281
↓ 1 callersFunctionget_possible_new_name
Suggests a potential alternative name to resolve a shadowing conflict.
crates/ruff_linter/src/rules/ruff/rules/used_dummy_variable.rs:225
↓ 1 callersFunctionget_prefix
Return the longest prefix of `path` between `settings.src` and `settings.project_root`.
crates/ruff_linter/src/rules/flake8_builtins/rules/stdlib_module_shadowing.rs:126
↓ 1 callersFunctionget_publishable_crates
Return publishable workspace crates.
scripts/publish-crates.py:72
↓ 1 callersMethodget_range
(&self, node: ast::AnyNodeRef<'_>, argument_index: Option<usize>)
crates/ty_python_semantic/src/types/call/bind.rs:135
↓ 1 callersFunctionget_section_contexts
( docstring: &'a Docstring<'a>, convention: Option<Convention>, )
crates/ruff_linter/src/rules/pydocstyle/helpers.rs:73
↓ 1 callersFunctionget_short_circuit_edit
( expr: &Expr, range: TextRange, truthiness: bool, in_boolean_test: bool, generator: Gener
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:710
↓ 1 callersMethodget_source_type_by_extension
Return a mapped [`SourceType`] for a given file extension.
crates/ruff_linter/src/settings/types.rs:526
↓ 1 callersFunctionget_str
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB166.py:15
↓ 1 callersMethodget_string
(self)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:169
↓ 1 callersFunctionget_symbol
( db: &'db TestDb, file_name: &str, scopes: &[&str], symbol_name: &str, )
crates/ty_python_semantic/src/types/infer/tests.rs:38
↓ 1 callersMethodget_symbol
Return an [`Edit`] to reference an existing symbol, if it's present in the given [`SemanticModel`].
crates/ruff_linter/src/importer/mod.rs:354
↓ 1 callersFunctionget_table_data
(unicode_data: &'static str)
crates/ruff_unicode_names2_generator/src/lib.rs:28
↓ 1 callersFunctionget_test_cases
Adapted from typing/conformance/test_groups.py.
scripts/conformance.py:1028
↓ 1 callersFunctionget_test_groups
Adapted from typing/conformance/test_groups.py.
scripts/conformance.py:1019
↓ 1 callersFunctionget_toml_assertions
(source: &str)
crates/mdtest/src/assertion.rs:560
↓ 1 callersFunctionget_ty_command
(project: Project, *, ty_binary: str, venv_dir: Path)
scripts/setup_primer_project.py:99
↓ 1 callersMethodget_v
(self)
crates/ruff_linter/resources/test/fixtures/pylint/unnecessary_dunder_call.py:59
↓ 1 callersFunctionget_value
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_34.py:16
↓ 1 callersFunctionget_var_attr_args
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/zip_dict_keys_and_values.rs:143
↓ 1 callersFunctiongetattr_with_constant
B009
crates/ruff_linter/src/rules/flake8_bugbear/rules/getattr_with_constant.rs:72
↓ 1 callersMethodgetters_only
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1097
↓ 1 callersFunctiongh_api
( endpoint: str, *options: str, data: dict[str, str | list[str]] | None = None )
scripts/pull_request_labels_and_title.py:43
↓ 1 callersFunctiongit_head
(git_dir: &Path)
crates/ty/build.rs:118
↓ 1 callersFunctiongit_head
(git_dir: &Path)
crates/ruff/build.rs:79
↓ 1 callersFunctiongit_head
(git_dir: &Path)
crates/ty_wasm/build.rs:64
↓ 1 callersFunctionglob_to_regex
Converts a module glob pattern to a regex pattern, validating during parsing.
crates/ty_module_resolver/src/module_glob.rs:267
↓ 1 callersFunctionglobal_at_module_level
PLW0604
crates/ruff_linter/src/rules/pylint/rules/global_at_module_level.rs:30
↓ 1 callersMethodglobal_mut
Returns a mutable reference to the global scope
crates/ruff_python_semantic/src/scope.rs:268
↓ 1 callersFunctionglobal_statement
PLW0603
crates/ruff_linter/src/rules/pylint/rules/global_statement.rs:58
↓ 1 callersFunctionglobal_variable_not_assigned
PLW0602
crates/ruff_linter/src/rules/pylint/rules/global_variable_not_assigned.rs:58
↓ 1 callersMethodglobals_id
Returns the globals pointer for this scope.
crates/ruff_python_semantic/src/scope.rs:150
↓ 1 callersFunctiongood_multiline
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:179
↓ 1 callersFunctiongood_multiline_ending
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:186
↓ 1 callersFunctiongood_nested
Run to the hills.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D401.py:45
↓ 1 callersFunctiongoogle_section
( checker: &Checker, docstring: &Docstring, context: &SectionContext, next: Option<&SectionCon
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:2110
↓ 1 callersMethodgoto_definition
(&self)
crates/ty_ide/src/goto_definition.rs:2793
↓ 1 callersMethodgoto_target_for_covering_node
( &self, covering_node: &CoveringNode<'node>, )
crates/ty_ide/src/references.rs:764
↓ 1 callersMethodgradual_element_type
Return the homogeneous element type if this segment has gradual arity, including aliases.
crates/ty_python_semantic/src/types/tuple.rs:932
↓ 1 callersFunctiongroup_appends
Group the given appends by the associated bindings.
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:211
↓ 1 callersFunctiongroup_diagnostics_by_filename
( diagnostics: &'a [Diagnostic], resolver: &'a dyn FileResolver, )
crates/ruff_db/src/diagnostic/render/grouped.rs:100
↓ 1 callersFunctiongroup_diagnostics_by_filename
( diagnostics: &'a [Diagnostic], resolver: &'a dyn FileResolver, )
crates/ruff_db/src/diagnostic/render/junit.rs:126
↓ 1 callersFunctiongroup_diagnostics_by_key
( old: list[TyDiagnostic], new: list[TyDiagnostic], expected: list[ExpectedError], )
scripts/conformance.py:555
↓ 1 callersFunctiongroup_for_node
(node: str)
crates/ruff_python_formatter/generate.py:73
↓ 1 callersMethodgroup_modes
(&self)
crates/ruff_formatter/src/printer/mod.rs:1559
↓ 1 callersMethodgroup_modes_mut
(&mut self)
crates/ruff_formatter/src/printer/mod.rs:1563
↓ 1 callersMethodgrow_stack
(&mut self, f: impl FnOnce(&mut Self) -> T)
crates/ruff_python_parser/src/parser/mod.rs:979
↓ 1 callersMethodguideline
(&self)
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:110
↓ 1 callersFunctionh
(w: Literal["a", "b"], x: typing.Literal["c"], y: typing_extensions.Literal["d"], z: _T)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI020.py:11
↓ 1 callersMethodh
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP036_0.py:93
↓ 1 callersMethodhandle
(&self, changes: Vec<ChangeEvent>)
crates/ty_project/src/watch/watcher.rs:409
↓ 1 callersFunctionhandleRenamed
(newName: string)
playground/ty/src/Editor/Files.tsx:145
↓ 1 callersFunctionhandle_alias_comment
Attach an enclosed comment to the appropriate [`ast::Identifier`] within an [`ast::Alias`]. For example: ```python from foo import ( bar # comment
crates/ruff_python_formatter/src/comments/placement.rs:2129
↓ 1 callersMethodhandle_assign
Handle, e.g., `items[0] = 1`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:274
↓ 1 callersFunctionhandle_attribute_comment
Own line comments coming after the node are always dangling comments ```python ( a # trailing comment on `a` # dangling comment on the attribute . #
crates/ruff_python_formatter/src/comments/placement.rs:1427
↓ 1 callersMethodhandle_aug_assign
Handle, e.g., `items += [1]`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:298
↓ 1 callersFunctionhandle_bracketed_end_of_line_comment
Attach an end-of-line comment immediately following an open bracket as a dangling comment on enclosing node. For example, given the following functi
crates/ruff_python_formatter/src/comments/placement.rs:1988
↓ 1 callersMethodhandle_call
Handle, e.g., `items.append(1)`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:305
↓ 1 callersFunctionhandle_call_comment
Handle comments between a function call and its arguments. For example, attach the following as dangling on the call: ```python ( func # dangling () )
crates/ruff_python_formatter/src/comments/placement.rs:1403
↓ 1 callersFunctionhandle_comprehension_comment
Handle comments inside comprehensions, e.g. ```python [ a for # dangling on the comprehension b # dangling on the comprehension in # dangling on co
crates/ruff_python_formatter/src/comments/placement.rs:2197
↓ 1 callersMethodhandle_delete
Handle, e.g., `del items[0]`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:255
↓ 1 callersFunctionhandle_dict_unpacking_comment
Handles comments between `**` and the variable name in dict unpacking It attaches these to the appropriate value node. ```python { # comment between
crates/ruff_python_formatter/src/comments/placement.rs:1318
← previousnext →9,801–9,900 of 31,562, ranked by callers