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
↓ 2 callers
Function
is_model
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:619
↓ 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:3299
↓ 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:1223
↓ 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:546
↓ 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:1538
↓ 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_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:3363
↓ 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
Method
is_partial_application
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:4326
↓ 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:343
↓ 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:883
↓ 2 callers
Method
is_private
(cls)
crates/ruff_linter/resources/test/fixtures/flake8_self/SLF001.py:18
↓ 2 callers
Function
is_project_file
(db: &dyn Db, file: File)
crates/ty_project/src/lib.rs:933
↓ 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:791
↓ 2 callers
Method
is_provisional
(self)
crates/ty_python_semantic/src/types/call/bind.rs:682
↓ 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_raises
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:177
↓ 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:235
↓ 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_renamed_component
(&self, component: &str)
crates/ty_ide/src/will_rename.rs:270
↓ 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:258
↓ 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:1153
↓ 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:1982
↓ 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_shutdown_requested
(&self)
crates/ty_server/src/session.rs:223
↓ 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:1558
↓ 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:1646
↓ 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:315
↓ 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:4158
↓ 2 callers
Method
is_site_packages
Is the module in a site-packages directory?
crates/ty_module_resolver/src/path.rs:722
↓ 2 callers
Function
is_standard_library_literal
Returns `true` if a call path is `Literal`.
crates/ruff_python_stdlib/src/typing.rs:142
↓ 2 callers
Method
is_star
(self)
crates/ruff_python_parser/src/parser/statement.rs:4204
↓ 2 callers
Method
is_statement
(&self)
crates/ruff_python_semantic/src/nodes.rs:108
↓ 2 callers
Function
is_stdin
Returns true if the command should read from standard input.
crates/ruff/src/lib.rs:96
↓ 2 callers
Function
is_string
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pylint/rules/missing_maxsplit_arg.rs:78
↓ 2 callers
Method
is_string_annotation
Returns whether the given expression is a string annotation (the string in `x: "int | None"`).
crates/ty_python_semantic/src/types/infer.rs:1174
↓ 2 callers
Method
is_subclass_of
Return `true` if this symbol can be resolved to a class definition `class` in its canonical module, *and* `class` is a subclass of `other`.
crates/ty_python_semantic/src/types/class/known.rs:1504
↓ 2 callers
Function
is_supported_uri_prefix
Returns whether `uri` can grow into a supported URI scheme. The empty prefix is intentionally accepted to allow a line break directly after the targe
crates/ty_ide/src/docstring/markdown/general/inline.rs:435
↓ 2 callers
Function
is_suspicious_function_reference_enabled
https://github.com/astral-sh/ruff/pull/15541
crates/ruff_linter/src/preview.rs:35
↓ 2 callers
Method
is_symlink
(self)
crates/ruff_db/src/system.rs:342
↓ 2 callers
Function
is_sys
(expr: &Expr, target: &str, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_2020/helpers.rs:5
↓ 2 callers
Method
is_system_virtual_path
(&self)
crates/ruff_db/src/files/path.rs:51
↓ 2 callers
Method
is_t_string_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2281
↓ 2 callers
Method
is_tab
Returns `true` if this is an [`IndentStyle::Tab`].
crates/ruff_formatter/src/lib.rs:76
↓ 2 callers
Method
is_terminal
(self)
crates/ty_python_core/src/reachability_constraints.rs:105
↓ 2 callers
Method
is_test_module
Returns `true` if the module name given appears to be a test module. This routine is meant to codify a Python ecosystem convention. That is, a module
crates/ty_module_resolver/src/module_name.rs:410
↓ 2 callers
Method
is_third_party
Return `true` if this module is provided by a supported third-party package.
crates/ty_module_resolver/src/module.rs:380
↓ 2 callers
Function
is_timeout_error_alias
(qualified_name: &QualifiedName, target_version: PythonVersion)
crates/ruff_linter/src/rules/pyupgrade/rules/timeout_error_alias.rs:76
↓ 2 callers
Method
is_trivia
(self)
crates/ruff_python_trivia/src/tokenizer.rs:486
↓ 2 callers
Method
is_trivial_self_relation
Detect self-relations that hold for every specialization, such as `T & X ≤ T` or `T ≤ T | X`. Propagation can introduce these even though the constrai
crates/ty_python_semantic/src/types/constraints/variables.rs:525
↓ 2 callers
Function
is_trivial_statement
Return `true` if `stmt` is a "trivial statement" that has no effect nor side effect at runtime. Statements considered trivial are `pass`, `...`, and
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:1334
↓ 2 callers
Method
is_trivially_constraint_set_assignable_to
Returns whether constraint-set assignability is known to be unconditionally satisfied before constructing the relation checker.
crates/ty_python_semantic/src/types/relation.rs:683
↓ 2 callers
Function
is_tuple
Test whether the given binding can be considered a tuple. For this, we check what value might be associated with it through it's initialization, what
crates/ruff_python_semantic/src/analyze/typing.rs:1106
↓ 2 callers
Method
is_tuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:235
↓ 2 callers
Method
is_ty_extensions
(self)
crates/ty_module_resolver/src/module.rs:444
↓ 2 callers
Method
is_ty_extensions_internal
(self)
crates/ty_module_resolver/src/module.rs:448
↓ 2 callers
Function
is_type_annotation_of
Returns `true` if `expr_range` identifies a type annotation child of `parent`, i.e. the annotation of a `StmtAnnAssign` or the return annotation of a
crates/ruff_python_formatter/src/expression/parentheses.rs:42
↓ 2 callers
Method
is_type_check_only
Is a value of this type only usable in typing contexts?
crates/ty_python_semantic/src/types.rs:2839
↓ 2 callers
Method
is_type_ignore
(self)
crates/ty_python_semantic/src/suppression.rs:558
↓ 2 callers
Function
is_type_var_default_enabled
https://github.com/astral-sh/ruff/pull/20660
crates/ruff_linter/src/preview.rs:240
↓ 2 callers
Method
is_typealias
(&self)
crates/ty_python_semantic/src/types/infer/type_context.rs:132
↓ 2 callers
Method
is_typed_dict
(&self, class_def: &ast::StmtClassDef)
crates/ruff_linter/src/checkers/ast/mod.rs:3049
↓ 2 callers
Function
is_typed_dict_runtime_domain
Return whether every value in `ty` is represented by a `TypedDict` schema at runtime.
crates/ty_python_semantic/src/types/match_pattern.rs:164
← previous
next →
6,201–6,300 of 31,766, ranked by callers