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
↓ 1 callers
Method
get_executable
Returns the executable to invoke.
crates/ruff_db/src/system/command.rs:91
↓ 1 callers
Function
get_executable_path
(name: str)
python/ruff-ecosystem/ruff_ecosystem/cli.py:184
↓ 1 callers
Function
get_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 callers
Method
get_extension
Return the [`Language`] for a given file extension.
crates/ruff_linter/src/settings/types.rs:513
↓ 1 callers
Function
get_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 callers
Function
get_grammars
(target_versions: Set[TargetVersion])
crates/ruff_python_formatter/resources/test/fixtures/black/cases/pattern_matching_generic.py:12
↓ 1 callers
Method
get_heap_size_with_tracker
( &self, tracker: T, )
crates/ruff_db/src/parsed.rs:340
↓ 1 callers
Function
get_indent
(line: str)
scripts/add_rule.py:52
↓ 1 callers
Function
get_indent
(line: str)
scripts/add_plugin.py:42
↓ 1 callers
Function
get_key
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM910.py:80
↓ 1 callers
Function
get_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:37
↓ 1 callers
Function
get_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 callers
Function
get_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 callers
Function
get_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 callers
Method
get_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 callers
Function
get_name_expr
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:105
↓ 1 callers
Function
get_num_digits
(text: &str)
crates/ruff_python_literal/src/format.rs:262
↓ 1 callers
Function
get_operator
Return the `operator` implemented by the given expression.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:355
↓ 1 callers
Method
get_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 callers
Function
get_or_add
( map: &'b mut FxHashMap<BindingId, AppendGroup<'a>>, append: Append<'a>, )
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:252
↓ 1 callers
Method
get_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 callers
Method
get_or_evaluate
(&self, index: usize, evaluate: impl FnOnce() -> Truthiness)
crates/ty_python_semantic/src/reachability.rs:2161
↓ 1 callers
Method
get_or_try_insert_with
( &self, path: &Path, project_root: &Path, load: impl FnOnce() -> Result<Confi
crates/ruff_workspace/src/resolver.rs:299
↓ 1 callers
Method
get_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:2383
↓ 1 callers
Function
get_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 callers
Function
get_permissions
(mode: u16)
crates/ruff_linter/src/rules/ruff/rules/non_octal_permissions.rs:278
↓ 1 callers
Function
get_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 callers
Function
get_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 callers
Function
get_publishable_crates
Return publishable workspace crates.
scripts/publish-crates.py:54
↓ 1 callers
Method
get_range
(&self, node: ast::AnyNodeRef<'_>, argument_index: Option<usize>)
crates/ty_python_semantic/src/types/call/bind.rs:135
↓ 1 callers
Function
get_section_contexts
( docstring: &'a Docstring<'a>, convention: Option<Convention>, )
crates/ruff_linter/src/rules/pydocstyle/helpers.rs:73
↓ 1 callers
Function
get_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 callers
Method
get_source_type_by_extension
Return a mapped [`SourceType`] for a given file extension.
crates/ruff_linter/src/settings/types.rs:526
↓ 1 callers
Function
get_str
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB166.py:15
↓ 1 callers
Method
get_string
(self)
crates/ruff_linter/resources/test/fixtures/pylint/missing_maxsplit_arg.py:169
↓ 1 callers
Function
get_symbol
( db: &'db TestDb, file_name: &str, scopes: &[&str], symbol_name: &str, )
crates/ty_python_semantic/src/types/infer/tests.rs:38
↓ 1 callers
Method
get_symbol
Return an [`Edit`] to reference an existing symbol, if it's present in the given [`SemanticModel`].
crates/ruff_linter/src/importer/mod.rs:358
↓ 1 callers
Function
get_table_data
(unicode_data: &'static str)
crates/ruff_unicode_names2_generator/src/lib.rs:28
↓ 1 callers
Function
get_test_cases
Adapted from typing/conformance/test_groups.py.
scripts/conformance.py:1010
↓ 1 callers
Function
get_test_groups
Adapted from typing/conformance/test_groups.py.
scripts/conformance.py:1001
↓ 1 callers
Function
get_toml_assertions
(source: &str)
crates/mdtest/src/assertion.rs:560
↓ 1 callers
Function
get_ty_command
(project: Project, *, ty_binary: str, venv_dir: Path)
scripts/setup_primer_project.py:81
↓ 1 callers
Method
get_v
(self)
crates/ruff_linter/resources/test/fixtures/pylint/unnecessary_dunder_call.py:59
↓ 1 callers
Function
get_value
()
crates/ruff_linter/resources/test/fixtures/pyflakes/F821_34.py:16
↓ 1 callers
Function
get_var_attr_args
(expr: &Expr)
crates/ruff_linter/src/rules/flake8_simplify/rules/zip_dict_keys_and_values.rs:143
↓ 1 callers
Function
getattr_with_constant
B009
crates/ruff_linter/src/rules/flake8_bugbear/rules/getattr_with_constant.rs:72
↓ 1 callers
Method
getters_only
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1098
↓ 1 callers
Function
gh_api
( endpoint: str, *options: str, data: dict[str, str | list[str]] | None = None )
scripts/pull_request_labels_and_title.py:25
↓ 1 callers
Function
git_head
(git_dir: &Path)
crates/ty/build.rs:118
↓ 1 callers
Function
git_head
(git_dir: &Path)
crates/ruff/build.rs:79
↓ 1 callers
Function
git_head
(git_dir: &Path)
crates/ty_wasm/build.rs:64
↓ 1 callers
Function
glob_to_regex
Converts a module glob pattern to a regex pattern, validating during parsing.
crates/ty_module_resolver/src/module_glob.rs:267
↓ 1 callers
Function
global_at_module_level
PLW0604
crates/ruff_linter/src/rules/pylint/rules/global_at_module_level.rs:30
↓ 1 callers
Method
global_mut
Returns a mutable reference to the global scope
crates/ruff_python_semantic/src/scope.rs:268
↓ 1 callers
Function
global_statement
PLW0603
crates/ruff_linter/src/rules/pylint/rules/global_statement.rs:58
↓ 1 callers
Function
global_variable_not_assigned
PLW0602
crates/ruff_linter/src/rules/pylint/rules/global_variable_not_assigned.rs:58
↓ 1 callers
Method
globals_id
Returns the globals pointer for this scope.
crates/ruff_python_semantic/src/scope.rs:150
↓ 1 callers
Function
good_multiline
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:179
↓ 1 callers
Function
good_multiline_ending
(quote: Quote)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:186
↓ 1 callers
Function
good_nested
Run to the hills.
crates/ruff_linter/resources/test/fixtures/pydocstyle/D401.py:45
↓ 1 callers
Function
google_section
( checker: &Checker, docstring: &Docstring, context: &SectionContext, next: Option<&SectionCon
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:2110
↓ 1 callers
Method
goto_definition
(&self)
crates/ty_ide/src/goto_definition.rs:2836
↓ 1 callers
Method
goto_target_for_covering_node
( &self, covering_node: &CoveringNode<'node>, )
crates/ty_ide/src/references.rs:771
↓ 1 callers
Method
gradual_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 callers
Function
group_appends
Group the given appends by the associated bindings.
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:211
↓ 1 callers
Function
group_diagnostics_by_filename
( diagnostics: &'a [Diagnostic], resolver: &'a dyn FileResolver, )
crates/ruff_db/src/diagnostic/render/grouped.rs:100
↓ 1 callers
Function
group_diagnostics_by_filename
( diagnostics: &'a [Diagnostic], resolver: &'a dyn FileResolver, )
crates/ruff_db/src/diagnostic/render/junit.rs:200
↓ 1 callers
Function
group_diagnostics_by_key
( old: list[TyDiagnostic], new: list[TyDiagnostic], expected: list[ExpectedError], )
scripts/conformance.py:537
↓ 1 callers
Function
group_for_node
(node: str)
crates/ruff_python_formatter/generate.py:73
↓ 1 callers
Method
group_modes
(&self)
crates/ruff_formatter/src/printer/mod.rs:1559
↓ 1 callers
Method
group_modes_mut
(&mut self)
crates/ruff_formatter/src/printer/mod.rs:1563
↓ 1 callers
Method
grow_stack
(&mut self, f: impl FnOnce(&mut Self) -> T)
crates/ruff_python_parser/src/parser/mod.rs:979
↓ 1 callers
Method
guideline
(&self)
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:110
↓ 1 callers
Function
h
(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 callers
Method
h
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP036_0.py:93
↓ 1 callers
Method
handle
(&self, changes: Vec<ChangeEvent>)
crates/ty_project/src/watch/watcher.rs:409
↓ 1 callers
Function
handleRenamed
(newName: string)
playground/ty/src/Editor/Files.tsx:145
↓ 1 callers
Function
handle_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 callers
Method
handle_assign
Handle, e.g., `items[0] = 1`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:274
↓ 1 callers
Function
handle_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 callers
Method
handle_aug_assign
Handle, e.g., `items += [1]`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:298
↓ 1 callers
Function
handle_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 callers
Method
handle_call
Handle, e.g., `items.append(1)`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:305
↓ 1 callers
Function
handle_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 callers
Function
handle_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 callers
Method
handle_delete
Handle, e.g., `del items[0]`.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:255
↓ 1 callers
Function
handle_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
↓ 1 callers
Function
handle_enclosed_comment
Handle a comment that is enclosed by a node.
crates/ruff_python_formatter/src/comments/placement.rs:192
↓ 1 callers
Function
handle_end_of_line_comment_around_body
Handle an end-of-line comment around a body.
crates/ruff_python_formatter/src/comments/placement.rs:399
↓ 1 callers
Function
handle_expr_if_comment
Assign comments between `if` and `test` and `else` and `orelse` as leading to the respective node. ```python x = ( "a" if # leading comment of `True`
crates/ruff_python_formatter/src/comments/placement.rs:1517
↓ 1 callers
Method
handle_implicitly_concatenated_strings
Handles implicitly concatenated strings. # Panics If the length of `strings` is less than 2.
crates/ruff_python_parser/src/parser/expression.rs:1352
↓ 1 callers
Function
handle_import_from_comment
Attach an enclosed comment to a [`ast::StmtImportFrom`]. For example, given: ```python from foo import ( # comment bar, ) ``` The comment will be a
crates/ruff_python_formatter/src/comments/placement.rs:2058
↓ 1 callers
Method
handle_indentation
(&mut self, indentation: Indentation)
crates/ruff_python_parser/src/lexer.rs:309
↓ 1 callers
Function
handle_key_value_comment
Handles comments around the `:` in a key-value pair: ```python { key # dangling : # dangling # dangling value } ```
crates/ruff_python_formatter/src/comments/placement.rs:1361
↓ 1 callers
Function
handle_keyword_comment
Handles comments between a keyword's identifier and value: ```python func( x # dangling = # dangling # dangling 1, # dangling y ) ```
crates/ruff_python_formatter/src/comments/placement.rs:1252
↓ 1 callers
Function
handle_lambda_comment
Handles comments around the `:` token in a lambda expression. For parameterized lambdas, both the comments between the `lambda` and the parameters, a
crates/ruff_python_formatter/src/comments/placement.rs:1825
↓ 1 callers
Function
handle_leading_class_with_decorators_comment
Handle comments between decorators and the decorated node. For example, given: ```python @dataclass # comment class Foo(Bar): ... ``` The comment sh
crates/ruff_python_formatter/src/comments/placement.rs:1227
↓ 1 callers
Function
handle_leading_function_with_decorators_comment
Handles own line comments between the last function decorator and the *header* of the function. It attaches these comments as dangling comments to the
crates/ruff_python_formatter/src/comments/placement.rs:1199
↓ 1 callers
Function
handle_module_level_own_line_comment_before_class_or_function_comment
Handles own line comments on the module level before a class or function statement. A comment only becomes the leading comment of a class or function
crates/ruff_python_formatter/src/comments/placement.rs:1091
↓ 1 callers
Function
handle_named_expr_comment
Handles comments around the `:=` token in a named expression (walrus operator). For example, here, `# 1` and `# 2` will be marked as dangling comment
crates/ruff_python_formatter/src/comments/placement.rs:1770
← previous
next →
9,901–10,000 of 31,766, ranked by callers