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
↓ 2 callers
Function
is_if_type_checking
Returns if the expression is a `TYPE_CHECKING` expression.
crates/ty_python_core/src/builder.rs:6249
↓ 2 callers
Method
is_ignore
(self)
crates/ty_project/src/glob/exclude.rs:188
↓ 2 callers
Method
is_ignore
(self)
crates/ruff_python_formatter/src/options.rs:324
↓ 2 callers
Method
is_ignore
Returns whether or not the suppression is a standalone `ruff: ignore` comment.
crates/ruff_linter/src/suppression.rs:140
↓ 2 callers
Function
is_immutable_func
Return `true` if `func` is a function that returns an immutable value.
crates/ruff_python_semantic/src/analyze/typing.rs:351
↓ 2 callers
Function
is_immutable_newtype_call
Return `true` if `name` is bound to the `typing.NewType` call where the original type is immutable. For example: ```python from typing import NewType
crates/ruff_python_semantic/src/analyze/typing.rs:375
↓ 2 callers
Function
is_implicit_staticmethod
Whether a function should implicitly be treated as a staticmethod based on its name.
crates/ty_python_semantic/src/types/function.rs:254
↓ 2 callers
Function
is_in_annotation_expression
Returns whether `range` is syntactically enclosed by a parameter, return, or assignment annotation; an explicit type alias value; or a type parameter'
crates/ty_ide/src/annotation_expression.rs:20
↓ 2 callers
Method
is_in_decorator_name
(&self)
crates/ty_ide/src/completion.rs:1096
↓ 2 callers
Method
is_in_format_spec
Returns `true` if the lexer is in a f-string format spec i.e., after a colon.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:92
↓ 2 callers
Method
is_in_interpolation
Returns `true` if the lexer is in an f-string expression or t-string interpolation i.e., between two curly braces.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:87
↓ 2 callers
Method
is_in_no_type_check
(&self)
crates/ty_python_semantic/src/types/context.rs:366
↓ 2 callers
Function
is_in_type_checking_block
(checker: &Checker, node_id: NodeId)
crates/ruff_linter/src/rules/pyflakes/rules/redefined_while_unused.rs:357
↓ 2 callers
Function
is_indent_whitespace
Returns `true` for a space or tab character. This is different than [`is_python_whitespace`](ruff_python_trivia::is_python_whitespace) in that it ret
crates/ruff_python_formatter/src/verbatim.rs:720
↓ 2 callers
Function
is_infinite_iterable
Return `true` if the [`Expr`] appears to be an infinite iterator (e.g., a call to `itertools.cycle` or similar).
crates/ruff_linter/src/rules/flake8_bugbear/helpers.rs:34
↓ 2 callers
Method
is_init_var
Returns `true` if the place has a `InitVar` type qualifier.
crates/ty_python_semantic/src/place.rs:1105
↓ 2 callers
Method
is_initialized
(&self)
crates/ty_server/src/session.rs:1847
↓ 2 callers
Function
is_instance_attribute_assignment
The index marks attributes on the first parameter of the enclosing method, provided the parameter is visible through any intervening scopes. Static me
crates/ty_python_semantic/src/types/annotation_target.rs:34
↓ 2 callers
Function
is_instance_truthiness
Evaluate an `isinstance` call. Return `Truthiness::AlwaysTrue` if we can definitely infer that this will return `True` at runtime, `Truthiness::Always
crates/ty_python_semantic/src/types/infer/builder/function.rs:2335
↓ 2 callers
Function
is_interpolated_string_with_quoted_format_spec_and_debug
Returns `true` if `string` has any f/t-string interpolation element (direct or nested) with a debug expression and a format spec that contains the opp
crates/ruff_python_formatter/src/string/normalize.rs:1035
↓ 2 callers
Function
is_io_base
Test whether the given binding can be considered a file-like object (i.e., a type that implements `io.IOBase`).
crates/ruff_python_semantic/src/analyze/typing.rs:1128
↓ 2 callers
Function
is_item_name
Returns whether `name` is a valid NumPy-style item name or comma-separated name list.
crates/ty_ide/src/docstring/document/numpy.rs:774
↓ 2 callers
Function
is_item_name_part
(name: &str)
crates/ty_ide/src/docstring/document/numpy.rs:793
↓ 2 callers
Method
is_known
(self, db: &'db dyn Db, known_function: KnownFunction)
crates/ty_python_semantic/src/types/function.rs:1566
↓ 2 callers
Function
is_known_dunder_method
Returns `true` if a method is a known dunder method.
crates/ruff_linter/src/rules/pylint/helpers.rs:231
↓ 2 callers
Method
is_list_comp_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1911
↓ 2 callers
Function
is_logger_method_name
(attr: &str)
crates/ruff_linter/src/rules/flake8_logging/helpers.rs:23
↓ 2 callers
Function
is_lowercase_allowed
Returns whether the given environment variable is allowed to be lowercase. References: - <https://unix.stackexchange.com/a/212972/> - <https://about.
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_expr.rs:136
↓ 2 callers
Function
is_metaclass
Returns `IsMetaclass::Yes` if the given class is definitely a metaclass, `IsMetaclass::No` if it's definitely *not* a metaclass, and `IsMetaclass::May
crates/ruff_python_semantic/src/analyze/class.rs:403
↓ 2 callers
Method
is_method
Returns `true` if the [`Definition`] is a method definition.
crates/ruff_python_semantic/src/definition.rs:144
↓ 2 callers
Function
is_method_in_subclass
This is a helper function to check if the given function definition is a method that inherits from a base class.
crates/ruff_linter/src/rules/airflow/helpers.rs:281
↓ 2 callers
Method
is_method_or_eagerly_executed_in_method
Returns the scope ID of the current scope if the current scope is a method inside a class body or an eagerly executed scope inside a method. Returns `
crates/ty_python_core/src/builder.rs:435
↓ 2 callers
Method
is_method_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:67
↓ 2 callers
Function
is_method_type
Whether every alternative has method binding behavior rather than only a call signature.
crates/ty_python_semantic/src/types/overrides/attributes.rs:105
↓ 2 callers
Function
is_mixed_case
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:12
↓ 2 callers
Function
is_model
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:576
↓ 2 callers
Function
is_model
Return `true` if a Python class appears to be a Django model, based on its base classes.
crates/ruff_linter/src/rules/flake8_django/helpers.rs:6
↓ 2 callers
Function
is_model_form
Return `true` if a Python class appears to be a Django model form, based on its base classes.
crates/ruff_linter/src/rules/flake8_django/helpers.rs:16
↓ 2 callers
Function
is_module_file
Return `true` if a [`Path`] should use the name of its parent directory as its module name.
crates/ruff_python_stdlib/src/path.rs:5
↓ 2 callers
Method
is_multiline
(self)
crates/ruff_formatter/src/format_element.rs:552
↓ 2 callers
Method
is_multiline
(&self, context: &PyFormatContext)
crates/ruff_python_formatter/src/string/mod.rs:87
↓ 2 callers
Function
is_mutable_func
Return `true` if `func` is a function that returns a mutable value.
crates/ruff_python_semantic/src/analyze/typing.rs:415
↓ 2 callers
Function
is_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:324
↓ 2 callers
Function
is_name_like_token
Returns `true` if the token is an `Identifier` or a keyword. Keywords are included because the lexer will lex a partially-typed attribute name as a k
crates/ty_ide/src/completion.rs:3290
↓ 2 callers
Function
is_named_tuple
Return `true` if this is a `typing.NamedTuple` annotation.
crates/ruff_linter/src/rules/pyupgrade/rules/use_pep604_annotation.rs:362
↓ 2 callers
Method
is_neutral_dataclass
Whether dataclass-transform inheritance permits both frozen and non-frozen children. Unlike an ordinary non-dataclass, this class explicitly imposes n
crates/ty_python_semantic/src/types/class/static_literal.rs:1224
↓ 2 callers
Method
is_never_satisfied_bounded
Like [`Self::is_never_satisfied`], but returns `None` if the default solution budget is exhausted before the result is known.
crates/ty_python_semantic/src/types/constraints.rs:550
↓ 2 callers
Method
is_new_logical_line
(self)
crates/ruff_python_parser/src/lexer.rs:1480
↓ 2 callers
Method
is_non_ascii_identifier
(self)
crates/ruff_python_ast/src/token.rs:875
↓ 2 callers
Function
is_non_empty_f_string
Returns `true` if the expression definitely resolves to a non-empty string, when used as an f-string expression, or `false` if the expression may reso
crates/ruff_python_ast/src/helpers.rs:1542
↓ 2 callers
Function
is_non_terminal_call
Shares terminal-call classification between scope reachability and defensive-check exemptions. The result type is only needed when overload selection,
crates/ty_python_semantic/src/reachability.rs:1940
↓ 2 callers
Function
is_noqa_uncased
(text: &str)
crates/ruff_linter/src/noqa.rs:706
↓ 2 callers
Function
is_not_implemented_stub_with_variable
Returns `true` if a function appears to be a base class stub. In other words, if it matches the following syntax: ```text variable = <string | f-stri
crates/ruff_linter/src/rules/flake8_unused_arguments/rules/unused_arguments.rs:383
↓ 2 callers
Method
is_not_in
(self)
crates/ty_python_semantic/src/types/infer/comparisons.rs:681
↓ 2 callers
Method
is_notebook_cell
Returns `true` if this snapshot represents a notebook cell.
crates/ruff_server/src/session.rs:258
↓ 2 callers
Function
is_notebook_path
(system: &dyn System, path: &FilePath)
crates/ruff_db/src/source.rs:66
↓ 2 callers
Method
is_old_module_last_component
(&self, component: &str)
crates/ty_ide/src/will_rename.rs:222
↓ 2 callers
Method
is_opaque
(self)
crates/ty_python_semantic/src/types/enums.rs:110
↓ 2 callers
Function
is_open_call_from_pathlib
Returns `true` if an expression resolves to a call to `pathlib.Path.open`.
crates/ruff_linter/src/rules/flake8_async/rules/blocking_open_call.rs:74
↓ 2 callers
Method
is_operator
(self)
crates/ruff_python_ast/src/token.rs:386
↓ 2 callers
Function
is_os_error_alias
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/pyupgrade/rules/os_error_alias.rs:67
↓ 2 callers
Method
is_own_dataclass_instance_field
Returns `true` if `name` is a non-init-only field directly declared on this dataclass (i.e., a field that corresponds to an instance attribute). This
crates/ty_python_semantic/src/types/class/static_literal.rs:3320
↓ 2 callers
Method
is_package_file
( &self, db: &dyn Db, file: ProgramFile<'_>, project: &DependencyProject,
crates/ty_python_semantic/src/dependency.rs:300
↓ 2 callers
Method
is_parameter
(&self)
crates/ty_python_core/src/symbol.rs:131
↓ 2 callers
Function
is_parenthesized
(expr: &Expr, context: &PyFormatContext)
crates/ruff_python_formatter/src/expression/mod.rs:584
↓ 2 callers
Function
is_pathlib_path
Test whether the given binding can be considered a `pathlib.PurePath` or an instance of a subclass thereof.
crates/ruff_python_semantic/src/analyze/typing.rs:1140
↓ 2 callers
Method
is_pending
Returns `true` if the request with the given id is still pending.
crates/ty_server/src/session/request_queue.rs:79
↓ 2 callers
Function
is_pep604_future_annotations_fix_enabled
https://github.com/astral-sh/ruff/pull/23259
crates/ruff_linter/src/preview.rs:338
↓ 2 callers
Method
is_pow
(self)
crates/ruff_python_formatter/src/expression/binary_like.rs:1017
↓ 2 callers
Method
is_present
(self)
crates/ruff_python_ast/src/helpers.rs:56
↓ 2 callers
Method
is_preserve
(self)
crates/ruff_python_formatter/src/options.rs:273
↓ 2 callers
Method
is_primary
(&self)
crates/ruff_db/src/diagnostic/mod.rs:912
↓ 2 callers
Method
is_private
(cls)
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001.py:18
↓ 2 callers
Method
is_protocol
Determine if this class is a protocol. This method relies on the accuracy of the [`KnownClass::is_protocol`] method, which hardcodes knowledge about
crates/ty_python_semantic/src/types/class/static_literal.rs:792
↓ 2 callers
Method
is_provisional
(self)
crates/ty_python_semantic/src/types/call/bind.rs:671
↓ 2 callers
Function
is_pytest_fixture
(decorator: &Decorator, checker: &Checker)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:26
↓ 2 callers
Function
is_pytest_or_subpackage
(imported_name: &str)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:37
↓ 2 callers
Function
is_pytest_warns
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/warns.rs:162
↓ 2 callers
Function
is_pytest_yield_fixture
(decorator: &Decorator, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:40
↓ 2 callers
Method
is_ref
Determine whether an expression is a reference to the file handle, by comparing their ranges. If two expressions have the same range, they must be the
crates/ruff_linter/src/rules/refurb/helpers.rs:135
↓ 2 callers
Function
is_refined_submodule_import_match_enabled
https://github.com/astral-sh/ruff/pull/20200
crates/ruff_linter/src/preview.rs:230
↓ 2 callers
Method
is_regular
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:894
↓ 2 callers
Method
is_regular_list_terminator
(self, p: &Parser)
crates/ruff_python_parser/src/parser/mod.rs:1282
↓ 2 callers
Method
is_relevant_for_partial_application
Returns whether this error is relevant to `functools.partial(...)` construction. These errors are used both to filter incompatible wrapped overloads
crates/ty_python_semantic/src/types/call/bind.rs:10294
↓ 2 callers
Method
is_rescan
(&self)
crates/ty_project/src/watch.rs:116
↓ 2 callers
Method
is_respect
(self)
crates/ruff_python_formatter/src/options.rs:320
↓ 2 callers
Method
is_runtime_checkable
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/protocol_class.rs:245
↓ 2 callers
Function
is_same_enum_domain
Return whether every possible value of `ty` belongs to the same enum as `right`.
crates/ty_python_semantic/src/types/equality.rs:1124
↓ 2 callers
Function
is_same_enum_pattern_domain
Return whether every possible value of `ty` belongs to the same enum as `right`, including bounded type variables nested inside unions or intersection
crates/ty_python_semantic/src/types/match_pattern.rs:1265
↓ 2 callers
Function
is_same_expr
Return `true` if two `Expr` instances are equivalent names.
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:304
↓ 2 callers
Method
is_same_sentinel
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/known_instance.rs:706
↓ 2 callers
Method
is_satisfied_by
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, source: EvidenceSourc
crates/ty_python_semantic/src/types/constraints.rs:2053
↓ 2 callers
Function
is_sequence
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pylint/rules/len_test.rs:166
↓ 2 callers
Function
is_short_circuit
( expr: &Expr, expected_op: BoolOp, checker: &Checker, )
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_bool_op.rs:736
↓ 2 callers
Method
is_simple
Returns `true` if the annotation kind is simple.
crates/ruff_python_parser/src/typing.rs:48
↓ 2 callers
Method
is_simple_negation
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1540
↓ 2 callers
Function
is_single_member_enum
Return whether the enum has exactly one possible runtime value.
crates/ty_python_semantic/src/types/enums.rs:1643
↓ 2 callers
Function
is_singledispatch_implementation
Returns `true` if a function is registered as a `singledispatch` or `singledispatchmethod` implementation. For example, `_` below is a `singledispatc
crates/ruff_linter/src/rules/flake8_type_checking/helpers.rs:312
↓ 2 callers
Method
is_singleton
Return true if there is just a single inhabitant for this type. Note: This function aims to have no false positives, but might return `false` for mor
crates/ty_python_semantic/src/types.rs:4159
↓ 2 callers
Method
is_site_packages
Is the module in a site-packages directory?
crates/ty_module_resolver/src/path.rs:722
← previous
next →
6,101–6,200 of 31,562, ranked by callers