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
↓ 1 callers
Function
is_known_valid_separator
(expr: &Expr)
crates/ruff_linter/src/rules/refurb/rules/print_empty_string.rs:210
↓ 1 callers
Function
is_kwarg_parameter
Finds the parameter definition for a given name expression in a function.
crates/ruff_linter/src/rules/airflow/rules/removal_in_3.rs:520
↓ 1 callers
Function
is_label_continuation
(line: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:443
↓ 1 callers
Method
is_lbrace
(self)
crates/ruff_python_ast/src/token.rs:342
↓ 1 callers
Function
is_legacy_namespace_package
Determines whether a package is a legacy namespace package. Before PEP 420 introduced implicit namespace packages, the ecosystem developed its own fo
crates/ty_module_resolver/src/resolve.rs:1620
↓ 1 callers
Function
is_legacy_type_comment_in_non_stub_enabled
https://github.com/astral-sh/ruff/issues/4460
crates/ruff_linter/src/preview.rs:50
↓ 1 callers
Function
is_likely_pytest_test
Whether the currently checked `func` is likely to be a Pytest test. A normal Pytest test function is one whose name starts with `test` and is either:
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:88
↓ 1 callers
Function
is_link_start
Returns whether the backtick at `index` may begin inline markup. Uses the supported ASCII subset of reStructuredText's [inline markup recognition rul
crates/ty_ide/src/docstring/markdown/general/inline.rs:484
↓ 1 callers
Function
is_link_suffix
Returns whether `input` may follow a phrase hyperlink's `_` or `__` suffix. Uses the supported ASCII subset of reStructuredText's [inline markup reco
crates/ty_ide/src/docstring/markdown/general/inline.rs:503
↓ 1 callers
Method
is_lint
Returns `true` if this `DiagnosticId` represents a lint.
crates/ruff_db/src/diagnostic/mod.rs:1106
↓ 1 callers
Method
is_list
Returns `true` if the parentheses are for a list pattern e.g., `case [a, b]: ...`.
crates/ruff_python_parser/src/parser/mod.rs:1042
↓ 1 callers
Method
is_list_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2688
↓ 1 callers
Function
is_list_set_or_dict
(func: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_comprehensions/rules/unnecessary_map.rs:189
↓ 1 callers
Method
is_list_terminator
Returns `true` if the parser is at a token that terminates the list as per the context. This token could either end the list or is only present for b
crates/ruff_python_parser/src/parser/mod.rs:1274
↓ 1 callers
Function
is_literal_key
(expr: &Expr)
crates/ruff_linter/src/rules/pyflakes/rules/repeated_keys.rs:215
↓ 1 callers
Function
is_literal_member
Returns `true` if a name matches that of the `Literal` generic.
crates/ruff_python_stdlib/src/typing.rs:245
↓ 1 callers
Method
is_literal_or_union_of_literals
Detects types which are valid to appear inside a `Literal[…]` type annotation.
crates/ty_python_semantic/src/types.rs:3376
↓ 1 callers
Function
is_locals_call
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_django/rules/locals_in_render_function.rs:71
↓ 1 callers
Method
is_logical_line_start
(self)
crates/ruff_python_parser/src/parser/mod.rs:1012
↓ 1 callers
Function
is_lone_child
Determine if a child is the only statement in its body.
crates/ruff_linter/src/fix/edits.rs:488
↓ 1 callers
Method
is_magic
Returns `true` if the escape kind is magic i.e., `%` or `%%`.
crates/ruff_python_ast/src/nodes.rs:3986
↓ 1 callers
Function
is_magic_value
( literal_expr: LiteralExpressionRef, unary_op: Option<&UnaryOp>, settings: &Settings, )
crates/ruff_linter/src/rules/pylint/rules/magic_value_comparison.rs:84
↓ 1 callers
Function
is_main_check
Returns `true` if an expression is an `if __name__ == "__main__":` check.
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:275
↓ 1 callers
Function
is_markup_call
(qualified_name: &QualifiedName, settings: &LinterSettings)
crates/ruff_linter/src/rules/flake8_bandit/rules/unsafe_markup_use.rs:125
↓ 1 callers
Method
is_match_exact
(&self, name: &str)
crates/ty_ide/src/completion.rs:1628
↓ 1 callers
Method
is_match_symbol
(&self, symbol: &SymbolInfo<'_>)
crates/ty_ide/src/symbols.rs:71
↓ 1 callers
Function
is_matplotlib_activation
Returns `true` if a [`Stmt`] is a `matplotlib.use` activation, as in: ```python import matplotlib matplotlib.use("Agg") ```
crates/ruff_python_semantic/src/analyze/imports.rs:102
↓ 1 callers
Method
is_metaclass_instance
Is `target` a metaclass instance (a nominal instance of a subclass of `builtins.type`)? This does not include all types that are subtypes of `builtin
crates/ty_python_semantic/src/types/relation.rs:1933
↓ 1 callers
Function
is_method_call_on_literal
Return `true` if `call_expr` is a method call on an [`ast::ExprStringLiteral`] in which `literal` is one of the [`ast::StringLiteral`] parts. For exa
crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs:177
↓ 1 callers
Function
is_method_receiver
Return `true` if `name` resolves to the first parameter of a syntactic method receiver, including class methods and `__new__`.
crates/ruff_linter/src/rules/flake8_self/rules/private_member_access.rs:215
↓ 1 callers
Function
is_migration_file
Return `true` if a [`Path`] refers to a migration file.
crates/ruff_linter/src/rules/pep8_naming/rules/invalid_module_name.rs:102
↓ 1 callers
Function
is_migration_name
Returns `true` if a string appears to be a valid migration file name (e.g., `0001_initial.py`).
crates/ruff_python_stdlib/src/identifiers.rs:80
↓ 1 callers
Method
is_mock_patch_parameter
Returns whether `parameter` is supplied by `unittest.mock.patch`.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:535
↓ 1 callers
Function
is_model_abstract
Check if class is abstract, in terms of Django model inheritance.
crates/ruff_linter/src/rules/flake8_django/rules/model_without_dunder_str.rs:92
↓ 1 callers
Function
is_model_field
Return `true` if the expression is constructor for a Django model field.
crates/ruff_linter/src/rules/flake8_django/helpers.rs:26
↓ 1 callers
Function
is_module_name
Returns `true` if a string is a PEP 8-compliant module name (i.e., consists of lowercase letters, numbers, underscores, and is not a keyword).
crates/ruff_python_stdlib/src/identifiers.rs:56
↓ 1 callers
Method
is_more_than_one
(self)
crates/ruff_python_formatter/src/builders.rs:105
↓ 1 callers
Function
is_mutable_default_in_dataclass_field_enabled
https://github.com/astral-sh/ruff/pull/23046
crates/ruff_linter/src/preview.rs:259
↓ 1 callers
Function
is_mutable_iterable_initializer
Return `true` if the [`Expr`] is a mutable iterable initializer, like `{}` or `[]`.
crates/ruff_python_ast/src/helpers.rs:854
↓ 1 callers
Function
is_mutating_function
Returns `true` if the method mutates when called on an iterator.
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:177
↓ 1 callers
Function
is_name_or_stringized_name
Return `true` if the given expression resolves to the given name,
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:332
↓ 1 callers
Function
is_nan_float
Returns `true` if the expression is a call to `float("NaN")`.
crates/ruff_linter/src/rules/pylint/rules/nan_comparison.rs:105
↓ 1 callers
Function
is_negative_integer
Returns `true` if the given expression is a negative integer.
crates/ruff_linter/src/rules/pylint/rules/invalid_length_return.rs:107
↓ 1 callers
Method
is_nested
Returns `true` if the interpolated string state is [`Self::NestedInterpolatedElement`].
crates/ruff_python_formatter/src/context.rs:196
↓ 1 callers
Method
is_nested
Return whether the comment is nested within a wider comment token.
crates/ruff_linter/src/suppression.rs:84
↓ 1 callers
Function
is_nested_block
Returns `true` if the given statement is a nested block.
crates/ruff_linter/src/rules/pylint/rules/too_many_nested_blocks.rs:89
↓ 1 callers
Function
is_new
Returns `true` if a function is a `__new__`.
crates/ruff_python_semantic/src/analyze/visibility.rs:132
↓ 1 callers
Method
is_no
(self)
crates/ruff_python_formatter/src/range.rs:605
↓ 1 callers
Method
is_no
(self)
crates/ruff_python_ast/src/str.rs:84
↓ 1 callers
Method
is_no
(self)
crates/ruff_python_parser/src/parser/pattern.rs:808
↓ 1 callers
Method
is_no
(self)
crates/ty_python_semantic/src/diagnostic/levenshtein.rs:22
↓ 1 callers
Function
is_no_return
(expr: &ast::Expr, checker: &Checker)
crates/ruff_linter/src/rules/flake8_pyi/rules/no_return_argument_annotation.rs:84
↓ 1 callers
Function
is_non_abstract_model
Returns `true` if the class is a non-abstract Django model.
crates/ruff_linter/src/rules/flake8_django/rules/model_without_dunder_str.rs:83
↓ 1 callers
Function
is_non_callable_value
Returns `true` if a value is definitively not callable (e.g., `1` or `[]`).
crates/ruff_linter/src/rules/ruff/rules/default_factory_kwarg.rs:116
↓ 1 callers
Method
is_non_generic
(&self)
crates/ty_python_semantic/src/types/signatures.rs:2344
↓ 1 callers
Method
is_non_lambda_function
(self)
crates/ty_python_core/src/scope.rs:277
↓ 1 callers
Method
is_non_shadowable
Returns `true` if the module name refers to a standard library module which can't be shadowed by a first-party module. This includes "builtin" module
crates/ty_module_resolver/src/resolve.rs:230
↓ 1 callers
Method
is_non_standard
Returns `true` if this is a non-standard qualifier. Non-standard qualifiers are internal implementation details like `IMPLICIT_INSTANCE_ATTRIBUTE` an
crates/ty_python_semantic/src/types.rs:12051
↓ 1 callers
Function
is_non_trivial_with_body
(body: &[Stmt])
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:181
↓ 1 callers
Function
is_non_trivial_with_body
(body: &[Stmt])
crates/ruff_linter/src/rules/flake8_pytest_style/rules/warns.rs:166
↓ 1 callers
Function
is_none
Returns `true` if the given expression is equivalent to checking if the object type is `None` when used with the `isinstance` builtin.
crates/ruff_linter/src/rules/refurb/rules/isinstance_type_none.rs:82
↓ 1 callers
Method
is_none_return
(&self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:854
↓ 1 callers
Function
is_none_returning
(body: &[Stmt])
crates/ruff_linter/src/rules/flake8_annotations/rules/definition.rs:549
↓ 1 callers
Function
is_nonempty_collection_literal_with_empty_peer
An empty literal cannot provide element types for the other branch. Infer the nonempty branch first so the empty branch can use those types as context
crates/ty_python_semantic/src/types/infer/builder.rs:13149
↓ 1 callers
Method
is_nontrivial
Returns `true` if this constraint set's root is not a terminal.
crates/ty_python_semantic/src/types/constraints.rs:316
↓ 1 callers
Method
is_nontrivial_intersection
Returns whether this is a "real" intersection type. (Negated types are represented by an intersection containing a single negative branch, which this
crates/ty_python_semantic/src/types.rs:3291
↓ 1 callers
Method
is_not_required
Returns `true` if the place has a `NotRequired` type qualifier.
crates/ty_python_semantic/src/place.rs:1115
↓ 1 callers
Function
is_notebook
Returns whether a file is a notebook without reading its contents.
crates/ruff_db/src/source.rs:55
↓ 1 callers
Method
is_notimplemented
Returns true when this completion refers to the `NotImplemented` builtin.
crates/ty_ide/src/completion.rs:645
↓ 1 callers
Function
is_nullable_field
(value: &'a Expr, semantic: &'a SemanticModel)
crates/ruff_linter/src/rules/flake8_django/rules/nullable_model_string_field.rs:84
↓ 1 callers
Function
is_number_literal
(expr: &Expr, value: i8)
crates/ruff_linter/src/rules/refurb/rules/redundant_log_base.rs:138
↓ 1 callers
Function
is_number_or_bool_constant
Returns `true` if `expr` evaluates to a number or a boolean, looking through any unary operators applied to a number or boolean literal.
crates/ruff_linter/src/rules/pylint/rules/non_augmented_assignment.rs:147
↓ 1 callers
Method
is_object
(&self)
crates/ty_python_semantic/src/types/instance.rs:53
↓ 1 callers
Function
is_octal_digit
(char: char)
crates/ruff_linter/src/rules/pyupgrade/rules/unnecessary_encode_utf8.rs:347
↓ 1 callers
Function
is_one_line
(docstring: &Docstring)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1217
↓ 1 callers
Function
is_one_line_return_bool
(stmts: &[Stmt])
crates/ruff_linter/src/rules/flake8_simplify/rules/needless_bool.rs:335
↓ 1 callers
Method
is_one_or_more
(self)
crates/ruff_python_formatter/src/builders.rs:101
↓ 1 callers
Function
is_only
Determine if a vector contains only one, specific element.
crates/ruff_linter/src/fix/edits.rs:483
↓ 1 callers
Function
is_open
If a function is a call to `open`, returns the kind of `open` call.
crates/ruff_linter/src/rules/pylint/rules/bad_open_mode.rs:89
↓ 1 callers
Function
is_open_call
Return `true` if the expression is a call to `open()`, or a call to some other standard-library function that opens a file.
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:148
↓ 1 callers
Function
is_open_call
Returns `true` if the expression resolves to a blocking open call, like `open` or `Path().open()`.
crates/ruff_linter/src/rules/flake8_async/rules/blocking_open_call.rs:62
↓ 1 callers
Method
is_open_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:211
↓ 1 callers
Function
is_open_file_impl
(db: &dyn Db, file: File)
crates/ty_project/src/db.rs:86
↓ 1 callers
Method
is_open_files_only
Returns `true` if the diagnostic mode is set to check only currently open files.
crates/ty_server/src/session/options.rs:466
↓ 1 callers
Function
is_operator_method
Returns `true` if a function defines a binary operator. This only includes operators, i.e., functions that are usually not called directly. See: <ht
crates/ruff_linter/src/rules/flake8_boolean_trap/helpers.rs:88
↓ 1 callers
Function
is_operator_task_method
Returns `true` if the function is a task-execution-time method (`execute`, `pre_execute`, or `post_execute`) defined inside a class that inherits from
crates/ruff_linter/src/rules/airflow/rules/variable_get_outside_task.rs:156
↓ 1 callers
Function
is_operator_token
(token: TokenKind)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/space_around_operator.rs:305
↓ 1 callers
Method
is_optional
(self)
crates/ruff_python_formatter/src/expression/parentheses.rs:85
↓ 1 callers
Function
is_optional_named_tuple
Return `true` if this is an `Optional[typing.NamedTuple]` annotation.
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:348
↓ 1 callers
Function
is_optional_none
Return `true` if this is an `Optional[None]` annotation.
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:367
↓ 1 callers
Function
is_optional_type
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_pyi/rules/duplicate_union_member.rs:204
↓ 1 callers
Method
is_ordered_dataclass
Returns `true` if this class is decorated with `@dataclass(order=True)`.
crates/ty_python_semantic/src/types/class/static_literal.rs:265
↓ 1 callers
Function
is_os_environ_modification
Returns `true` if a [`Stmt`] is an `os.environ` modification, as in: ```python import os os.environ["CUDA_VISIBLE_DEVICES"] = "4" ```
crates/ruff_python_semantic/src/analyze/imports.rs:54
↓ 1 callers
Function
is_overload_impl
Return `true` if the definition is the implementation for an overloaded function.
crates/ruff_linter/src/rules/flake8_annotations/helpers.rs:33
↓ 1 callers
Function
is_own_line_comment
Returns `true` if line contains an own-line comment.
crates/ruff_linter/src/rules/eradicate/rules/commented_out_code.rs:143
↓ 1 callers
Function
is_p_wait
(call: &ast::ExprCall, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_async/rules/blocking_process_invocation.rs:177
↓ 1 callers
Function
is_package_with_cache
A wrapper around `is_package` to cache filesystem lookups.
crates/ruff_workspace/src/resolver.rs:287
↓ 1 callers
Method
is_parenthesized
Returns `true` if the with items are parenthesized.
crates/ruff_python_parser/src/parser/mod.rs:1100
↓ 1 callers
Method
is_part_of_library_interface
This routine determines whether the given symbol should be considered part of the public API of this module. The given symbol should defined or import
crates/ty_ide/src/symbols.rs:1254
↓ 1 callers
Function
is_partial_path
Return `true` if the [`Expr`] is a string literal or list of string literals that starts with a partial path.
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:555
← previous
next →
10,901–11,000 of 31,562, ranked by callers