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
Method
is_for_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:666
↓ 1 callers
Function
is_format_call
Return `true` if `expr` is a call to the `format` attribute, as in `s.format(...)`.
crates/ruff_linter/src/rules/flake8_gettext/rules/format_in_gettext_func_call.rs:88
↓ 1 callers
Function
is_foxtrot
(t: Kind)
crates/ruff_benchmark/resources/typeis_narrowing.py:170
↓ 1 callers
Method
is_frozen
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:87
↓ 1 callers
Function
is_frozen_dataclass
Return true if dataclass (stdlib or `attrs`) is frozen
crates/ruff_linter/src/rules/ruff/helpers.rs:171
↓ 1 callers
Function
is_full_path
Return `true` if the string appears to be a full file path. ## Examples ```python import os os.system("/bin/ls") os.system("./bin/ls") os.system(["/
crates/ruff_linter/src/rules/flake8_bandit/rules/shell_injection.rs:530
↓ 1 callers
Function
is_fully_excluded
(candidate: &str, excludes: &[String])
crates/ruff_workspace/src/options.rs:2321
↓ 1 callers
Method
is_function_def
(&self)
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:171
↓ 1 callers
Method
is_function_like
(self)
crates/ty_python_core/src/scope.rs:252
↓ 1 callers
Method
is_function_taking_pattern
(self, name: &str)
crates/ruff_linter/src/rules/ruff/rules/unraw_re_pattern.rs:98
↓ 1 callers
Method
is_functools
(self)
crates/ty_module_resolver/src/module.rs:446
↓ 1 callers
Function
is_generator_function_annotated_as_returning_none
( entries: &BodyEntries, return_annotations: &Expr, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1194
↓ 1 callers
Function
is_gettext
Returns `true` if an expression appears to be a `gettext` call. We want to avoid statement expressions and assignments related to aliases of the gett
crates/ruff_linter/src/rules/ruff/rules/missing_fstring_syntax.rs:146
↓ 1 callers
Function
is_gettext_func_call
Returns true if the [`Expr`] is an internationalization function call.
crates/ruff_linter/src/rules/flake8_gettext/mod.rs:32
↓ 1 callers
Method
is_global
Is the symbol `global` its containing scope?
crates/ty_python_core/src/symbol.rs:81
↓ 1 callers
Function
is_golf
(t: Kind)
crates/ruff_benchmark/resources/typeis_narrowing.py:182
↓ 1 callers
Function
is_guaranteed_mutable_expr
Returns `true` if the expression is guaranteed to create a mutable object.
crates/ruff_linter/src/rules/flake8_bugbear/rules/mutable_argument_default.rs:139
↓ 1 callers
Method
is_guaranteed_singleton
Return `true` if this special form is guaranteed to be a singleton at runtime. Nearly all `SpecialForm` types are singletons, but if a symbol could v
crates/ty_python_semantic/src/types/special_form.rs:208
↓ 1 callers
Function
is_guarded_by_try_except
Ignore attempts to access a `numpy` member via its deprecated name if the access takes place in an `except` block that provides compatibility with old
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:754
↓ 1 callers
Method
is_help
Returns `true` if the escape kind is help i.e., `?` or `??`.
crates/ruff_python_ast/src/nodes.rs:3981
↓ 1 callers
Method
is_hintable
Return `true` if `self` is a type that is suitable for displaying in a "Did you mean...?" hint message in diagnostics
crates/ty_python_semantic/src/types.rs:3574
↓ 1 callers
Function
is_hug_parens_with_braces_and_square_brackets_enabled
Returns `true` if the [`hug_parens_with_braces_and_square_brackets`](https://github.com/astral-sh/ruff/issues/8279) preview style is enabled.
crates/ruff_python_formatter/src/preview.rs:11
↓ 1 callers
Function
is_huggable_string_argument
Returns `true` if `string` is a multiline string that is not implicitly concatenated and there's no newline between the opening parentheses of argumen
crates/ruff_python_formatter/src/other/arguments.rs:223
↓ 1 callers
Method
is_human_readable
Returns `true` if this format is intended for users to read directly, in contrast to machine-readable or structured formats. This can be used to chec
crates/ruff_linter/src/settings/types.rs:576
↓ 1 callers
Function
is_identical_types
( response_model_arg: &Expr, return_value: &Expr, semantic: &SemanticModel, )
crates/ruff_linter/src/rules/fastapi/rules/fastapi_redundant_response_model.rs:123
↓ 1 callers
Function
is_identifier_continuation
Checks if the character c is a valid continuation character as described in https://docs.python.org/3/reference/lexical_analysis.html#identifiers
crates/ruff_python_trivia/src/tokenizer.rs:139
↓ 1 callers
Function
is_identifier_start
(c: char)
crates/ruff_python_trivia/src/tokenizer.rs:129
↓ 1 callers
Method
is_if_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1800
↓ 1 callers
Function
is_if_not_type_checking
Returns if the expression is a `not TYPE_CHECKING` expression.
crates/ty_python_core/src/builder.rs:6260
↓ 1 callers
Method
is_ignore
(self)
crates/ty_python_semantic/src/lint.rs:66
↓ 1 callers
Function
is_ignore_file
(path: &SystemPath)
crates/ty_project/src/db/changes.rs:514
↓ 1 callers
Method
is_ignored
(&mut self, path: &SystemPath, is_directory: bool)
crates/ruff_db/src/system/memory_fs.rs:572
↓ 1 callers
Method
is_ignored
(&mut self, path: &SystemPath, is_directory: bool)
crates/ruff_db/src/system/os/ignore.rs:11
↓ 1 callers
Function
is_ignored_because_of_import_convention
( asname: &str, stmt: &Stmt, alias: &Alias, checker: &Checker, )
crates/ruff_linter/src/rules/pep8_naming/rules/camelcase_imported_as_acronym.rs:96
↓ 1 callers
Method
is_ignored_from
(&self, walk_roots: &[SystemPathBuf], path: &SystemPath)
crates/ruff_db/src/system/os/ignore.rs:77
↓ 1 callers
Function
is_ignored_variable_assignment_target
(expr: &Expr)
crates/ty_ide/src/inlay_hints.rs:753
↓ 1 callers
Function
is_immediate_resolution_context
Return `true` if the current expression is evaluated during module import execution.
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/lazy_import_immediately_resolved.rs:176
↓ 1 callers
Function
is_immediately_closed
Return `true` if the current expression is immediately followed by a `.close()` call.
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:205
↓ 1 callers
Function
is_immutable_generic_type
Returns `true` if a call path represents that of an immutable, generic type from the Python standard library (e.g. `tuple`).
crates/ruff_python_stdlib/src/typing.rs:265
↓ 1 callers
Function
is_immutable_non_generic_type
Returns `true` if a call path represents that of an immutable, non-generic type from the Python standard library (e.g. `int` or `str`).
crates/ruff_python_stdlib/src/typing.rs:251
↓ 1 callers
Function
is_immutable_return_type
Returns `true` if a call path represents a function from the Python standard library that returns a immutable value (e.g., `bool`).
crates/ruff_python_stdlib/src/typing.rs:327
↓ 1 callers
Method
is_implicit_due_to_stub_body
(self)
crates/ty_python_semantic/src/types/function.rs:1164
↓ 1 callers
Function
is_implicit_import
Return `true` if `this` is implicitly loaded via importing `that`.
crates/ruff_linter/src/rules/flake8_type_checking/rules/typing_only_runtime_import.rs:588
↓ 1 callers
Function
is_import_definition
Returns `true` if a [`Stmt`] is an import.
crates/ruff_python_formatter/src/statement/suite.rs:766
↓ 1 callers
Method
is_import_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:962
↓ 1 callers
Method
is_importlib
(self)
crates/ty_module_resolver/src/module.rs:442
↓ 1 callers
Method
is_in_class_def
Whether we're in a class definition context.
crates/ty_ide/src/completion.rs:1729
↓ 1 callers
Method
is_in_comment
Whether the last token is within a comment or not.
crates/ty_ide/src/completion.rs:1012
↓ 1 callers
Method
is_in_dataclass_like_class_body
Returns whether the current scope is the body of a dataclass or dataclass-transform class. Methods and nested functions have separate scopes and are
crates/ty_python_semantic/src/types/infer/builder.rs:962
↓ 1 callers
Method
is_in_definition_place
Returns true when the tokens indicate that the definition of a new name is being introduced at the end.
crates/ty_ide/src/completion.rs:1120
↓ 1 callers
Method
is_in_for_statement_iterable
Returns true when the cursor is after the `in` keyword in a `for x in <CURSOR>` statement. `node` should be the smallest AST node fully covering the
crates/ty_ide/src/completion.rs:1581
↓ 1 callers
Method
is_in_string
Whether the last token is positioned within a string token (regular, f-string, t-string, etc). Note that this will return `false` when the last token
crates/ty_ide/src/completion.rs:1022
↓ 1 callers
Method
is_in_type_checking_block
(&self, scope_id: FileScopeId, range: TextRange)
crates/ty_python_core/src/lib.rs:614
↓ 1 callers
Method
is_in_variable_binding
Returns true when the cursor sits on a binding statement. E.g. naming a parameter, type parameter, or `for` `<name>`).
crates/ty_ide/src/completion.rs:1155
↓ 1 callers
Function
is_incorrect_dict_iterator_comprehension_enabled
https://github.com/astral-sh/ruff/pull/23473
crates/ruff_linter/src/preview.rs:311
↓ 1 callers
Function
is_incorrect_order
Returns `true` if `outer` above `inner` is a known-bad ordering.
crates/ruff_linter/src/rules/ruff/rules/incorrect_decorator_order.rs:144
↓ 1 callers
Function
is_indirect
Returns how `parameter_name` is configured by the `indirect` argument. `Some(true)` means the parameter is definitely indirect, `Some(false)` means i
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1447
↓ 1 callers
Function
is_indirect_sequence
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/pylint/rules/len_test.rs:131
↓ 1 callers
Method
is_inferable_typevar_artifact
( &self, target: BoundTypeVarInstance<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/generics.rs:3347
↓ 1 callers
Method
is_inferred
(self)
crates/ty_python_semantic/src/types/infer/type_context.rs:76
↓ 1 callers
Function
is_inferred_dict
Returns `true` if the binding is a dictionary, inferred from the type.
crates/ruff_linter/src/rules/pylint/rules/dict_index_missing_items.rs:199
↓ 1 callers
Function
is_infinity_string_literal
(expr: &ast::Expr)
crates/ruff_linter/src/linter/float.rs:31
↓ 1 callers
Function
is_inherited_method_violation
Returns whether the selected inherited method already violates this ancestor's contract. The parent can inherit the method without defining an overri
crates/ty_python_semantic/src/types/overrides.rs:1457
↓ 1 callers
Method
is_initialization_pending
Returns whether `file`'s environment is [`Pending`](ScriptEnvironmentAvailability::Pending). A `false` result does not guarantee that initialization
crates/ty_project/src/uv/environments.rs:182
↓ 1 callers
Method
is_inline
Returns `true` if this [`Insertion`] is inline.
crates/ruff_python_importer/src/insertion.rs:318
↓ 1 callers
Function
is_inplace_bin_op
Returns `true` if the method is an in-place binary operator.
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:304
↓ 1 callers
Function
is_insecure_protocol
Returns `true` if the given protocol name is insecure.
crates/ruff_linter/src/rules/flake8_bandit/rules/ssl_insecure_version.rs:91
↓ 1 callers
Function
is_insecure_protocol
Returns `true` if the given protocol name is insecure.
crates/ruff_linter/src/rules/flake8_bandit/rules/ssl_with_bad_defaults.rs:84
↓ 1 callers
Method
is_insertion
(&self)
crates/ruff_diagnostics/src/edit.rs:87
↓ 1 callers
Method
is_inside
(&self, db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_ide/src/completion.rs:1670
↓ 1 callers
Method
is_inspect
(self)
crates/ty_module_resolver/src/module.rs:438
↓ 1 callers
Method
is_instance_attribute_candidate
Return `true` if the place expression has the form `<NAME>.<MEMBER>`, indicating that it *may* be an instance attribute if we are in a method context.
crates/ty_python_core/src/member.rs:103
↓ 1 callers
Method
is_instance_attribute_named
Does the place expression have the form `self.{name}` (`self` is the first parameter of the method)?
crates/ty_python_core/src/member.rs:108
↓ 1 callers
Function
is_instance_tuple_covers
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, tuple: &TupleSpec<'db>, ty: Type<'db>, r
crates/ty_python_semantic/src/types/infer/builder/function.rs:2291
↓ 1 callers
Function
is_instance_tuple_exhaustive
Return whether a fixed `isinstance` tuple covers every possible type of an input. Each class in the tuple uses the same truthiness inference as a sin
crates/ty_python_semantic/src/types/infer/builder/function.rs:2275
↓ 1 callers
Function
is_int_constant
Returns `true` if the given expression is an integer constant.
crates/ruff_linter/src/rules/flake8_pyi/rules/unrecognized_version_info.rs:252
↓ 1 callers
Method
is_int_literal
(&self)
crates/ty_python_semantic/src/types.rs:3323
↓ 1 callers
Function
is_integer
(v: f64)
crates/ruff_python_literal/src/float.rs:1
↓ 1 callers
Method
is_internal_error
(self)
crates/ty/src/lib.rs:286
↓ 1 callers
Method
is_interpolated_string
Returns `true` if the token is a t-string.
crates/ruff_python_ast/src/token.rs:859
↓ 1 callers
Method
is_interpolated_string_end
(self)
crates/ruff_python_ast/src/token.rs:501
↓ 1 callers
Method
is_interpolation
(&self)
crates/ruff_python_ast/src/generated.rs:2941
↓ 1 callers
Method
is_invalid_all_format
Return `true` if this [`Binding`] represents an assignment to `__all__` with an invalid value (e.g., `__all__ = "Foo"`).
crates/ruff_python_semantic/src/binding.rs:100
↓ 1 callers
Method
is_invalid_all_object
Return `true` if this [`Binding`] represents an assignment to `__all__` that includes an invalid member (e.g., `__all__ = ["Foo", 1]`).
crates/ruff_python_semantic/src/binding.rs:106
↓ 1 callers
Function
is_invalid_type_expression
Returns `true` if `expr` is invalid in a type-expression position unless the source keeps it parenthesized.
crates/ruff_python_formatter/src/expression/mod.rs:1413
↓ 1 callers
Function
is_io_base_expr
Test whether the given expression can be considered a file-like object (i.e., a type that implements `io.IOBase`).
crates/ruff_python_semantic/src/analyze/typing.rs:1134
↓ 1 callers
Method
is_ipy_escape_command_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1258
↓ 1 callers
Function
is_ipython_builtin
Returns `true` if the given name is that of an IPython builtin. Intended to be kept in sync with [`IPYTHON_BUILTINS`].
crates/ruff_python_stdlib/src/builtins.rs:463
↓ 1 callers
Method
is_irrefutable
Checks if the [`Pattern`] is an [irrefutable pattern]. [irrefutable pattern]: https://peps.python.org/pep-0634/#irrefutable-case-blocks
crates/ruff_python_ast/src/nodes.rs:3068
↓ 1 callers
Function
is_iterable_initializer
(id: &str, is_builtin: F)
crates/ruff_python_ast/src/helpers.rs:35
↓ 1 callers
Function
is_iterable_or_iterator
Return `true` if the given expression resolves to `collections.abc.Iterable` or `collections.abc.Iterator`.
crates/ruff_linter/src/rules/flake8_pyi/rules/non_self_return_type.rs:347
↓ 1 callers
Method
is_join
(&self, id: ProjectedNarrowingNodeId)
crates/ty_python_semantic/src/reachability.rs:1653
↓ 1 callers
Method
is_keyword_bound
(&self, parameter_index: usize)
crates/ty_python_semantic/src/types/signatures.rs:952
↓ 1 callers
Function
is_known_class_instance
Returns whether a type is an instance of `class_name` from one of `modules`.
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:1418
↓ 1 callers
Method
is_known_function_call
Returns `true` if `expr` is a call to a known diagnostic function (e.g., `reveal_type` or `assert_type`) whose return value should not trigger the `un
crates/ty_python_semantic/src/types/infer/builder/awaitable.rs:62
↓ 1 callers
Function
is_known_future_feature
(name: &str)
crates/ruff_python_parser/src/semantic_errors.rs:1347
↓ 1 callers
Function
is_known_safe_binop_operand
(expr: &Expr)
crates/ruff_python_ast/src/helpers.rs:152
↓ 1 callers
Method
is_known_stub_only
Returns whether this module is a known typing helper with no runtime implementation.
crates/ty_module_resolver/src/module.rs:125
↓ 1 callers
Function
is_known_type
Returns `true` if the given qualified name is a known type. A known type is either a builtin type, any object from the standard library, or a type fr
crates/ruff_linter/src/rules/ruff/typing.rs:13
↓ 1 callers
Function
is_known_typevar
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_python_semantic/src/analyze/class.rs:478
← previous
next →
10,801–10,900 of 31,562, ranked by callers