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_collection_literal
(expr: &ast::Expr)
crates/ty_python_core/src/builder.rs:6289
↓ 2 callers
Method
is_comment_only
Returns `true` if this is a comment only line
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:126
↓ 2 callers
Method
is_complete
Returns whether all type attributes were inspected while collecting this support.
crates/ty_python_semantic/src/types/constraints/support.rs:120
↓ 2 callers
Method
is_complex
(self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:362
↓ 2 callers
Function
is_constant
Returns `true` if the given expression is a constant in the context of the dictionary comprehension.
crates/ruff_linter/src/rules/flake8_bugbear/rules/static_key_dict_comprehension.rs:78
↓ 2 callers
Function
is_constant_non_singleton
Return `true` if the [`Expr`] is a non-singleton constant.
crates/ruff_python_ast/src/helpers.rs:833
↓ 2 callers
Method
is_constraint_set_assignable_to
Return true if this type is assignable to type `target` using constraint-set typevar rules.
crates/ty_python_semantic/src/types/relation.rs:573
↓ 2 callers
Method
is_constraint_set_equivalent_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, other: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:1052
↓ 2 callers
Function
is_constructor_like_method
(name: &str)
crates/ty_python_semantic/src/types/overrides.rs:1945
↓ 2 callers
Method
is_contravariant
(self)
crates/ty_python_semantic/src/types/variance.rs:191
↓ 2 callers
Method
is_data
(self)
crates/ty_python_semantic/src/types.rs:820
↓ 2 callers
Method
is_data_descriptor_impl
( self, db: &'db dyn Db, program: Program<'db>, any_of_union: bool, )
crates/ty_python_semantic/src/types.rs:5659
↓ 2 callers
Function
is_dataclass_field
Return `true` if `func` represents a `field()` call corresponding to the `dataclass_kind` variant passed in. I.e., if `DataclassKind::Attrs` is passe
crates/ruff_linter/src/rules/ruff/helpers.rs:46
↓ 2 callers
Function
is_debugger_call
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_debugger/rules/debugger.rs:92
↓ 2 callers
Function
is_default_pytest_test_file
(db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:466
↓ 2 callers
Method
is_deferred
Are we currently in a context where name resolution should be deferred (`__future__.annotations`, stub file, or stringified annotation)?
crates/ty_python_semantic/src/types/infer/builder.rs:1048
↓ 2 callers
Method
is_directory_included
( &self, path: &SystemPath, mode: GlobFilterCheckMode, )
crates/ty_project/src/walk.rs:101
↓ 2 callers
Method
is_directory_maybe_included
Returns whether this directory is included in this filter. Note, this function never returns [`IncludeResult::Included`] for a path that is not inclu
crates/ty_project/src/glob.rs:38
↓ 2 callers
Method
is_disabled
(self)
crates/ruff_formatter/src/printer/printer_options/mod.rs:114
↓ 2 callers
Method
is_docstring
Checks if this string literal is a docstring.
crates/ruff_python_formatter/src/other/string_literal.rs:34
↓ 2 callers
Function
is_document_excluded
Return `true` if the document at the given [`Path`] should be excluded. The tool-specific settings should be provided if the request for the document
crates/ruff_server/src/resolve.rs:53
↓ 2 callers
Function
is_document_excluded_for_formatting
Return `true` if the document at the given [`Path`] should be excluded from formatting.
crates/ruff_server/src/resolve.rs:26
↓ 2 callers
Method
is_dry_run
(self)
crates/ruff_dev/src/generate_all.rs:36
↓ 2 callers
Function
is_dunder_method
(name: &str)
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_unary_op.rs:144
↓ 2 callers
Function
is_dunder_operator_method
(method: &str)
crates/ruff_linter/src/rules/pylint/helpers.rs:180
↓ 2 callers
Function
is_empty
(expr: &Expr, semantic: &SemanticModel)
crates/ruff_linter/src/rules/ruff/rules/in_empty_collection.rs:52
↓ 2 callers
Method
is_empty
Returns true when this group is empty.
crates/ty_ide/src/all_symbols.rs:506
↓ 2 callers
Method
is_empty
Returns `true` if this node has no renderable content.
crates/ty_python_semantic/src/types/relation_error.rs:846
↓ 2 callers
Method
is_empty
(&self)
crates/ty_python_semantic/src/types/context.rs:486
↓ 2 callers
Function
is_empty_interpolated_elements
( mut elements: impl Iterator<Item = &'a InterpolatedStringElement>, )
crates/ruff_python_ast/src/helpers.rs:1620
↓ 2 callers
Function
is_empty_string
Check if an expression is a constant empty string.
crates/ruff_linter/src/rules/refurb/rules/print_empty_string.rs:202
↓ 2 callers
Method
is_enabled
(&self, meta: &Metadata<'_>)
crates/ty_server/src/logging.rs:111
↓ 2 callers
Method
is_enclosing_list_element_or_terminator
(&self)
crates/ruff_python_parser/src/parser/mod.rs:907
↓ 2 callers
Method
is_end
Returns `true` if `self` is any end tag.
crates/ruff_formatter/src/format_element/tag.rs:125
↓ 2 callers
Function
is_end_of_scope_reachable
Returns whether control flow can reach the end of `scope`. This can be used to check if a function can implicitly return `None`.
crates/ty_python_semantic/src/reachability.rs:2126
↓ 2 callers
Method
is_enum
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:2727
↓ 2 callers
Method
is_exact
Returns true if this selector is exact i.e. selects a single rule by code
crates/ruff_linter/src/rule_selector.rs:291
↓ 2 callers
Function
is_exception_check
(stmt: &Stmt)
crates/ruff_linter/src/rules/flake8_simplify/rules/ast_unary_op.rs:151
↓ 2 callers
Function
is_executable
(filepath: &Path)
crates/ruff_linter/src/rules/flake8_executable/helpers.rs:9
↓ 2 callers
Method
is_exempt_from_return_type_inference
Constructor methods are exempt from return type inference; see `return_type_inference.md`.
crates/ty_python_semantic/src/types/function.rs:376
↓ 2 callers
Function
is_expanded_import_conventions_enabled
https://github.com/astral-sh/ruff/pull/21373
crates/ruff_linter/src/preview.rs:301
↓ 2 callers
Method
is_explicit
(&self)
crates/mdtest/src/parser.rs:358
↓ 2 callers
Method
is_explicit
(self)
crates/ty_python_semantic/src/types/function.rs:1160
↓ 2 callers
Method
is_expression
(&self)
crates/ruff_python_semantic/src/nodes.rs:112
↓ 2 callers
Function
is_expression_huggable
Returns `true` if the expression can hug directly to enclosing parentheses, as in Black's `hug_parens_with_braces_and_square_brackets` or `multiline_s
crates/ruff_python_formatter/src/expression/mod.rs:1267
↓ 2 callers
Method
is_external
Return `true` if this [`Binding`] represents an external symbol (e.g., `FastAPI` in `from fastapi import FastAPI`).
crates/ruff_python_semantic/src/binding.rs:65
↓ 2 callers
Method
is_extra
Is this a user-provided extra search path?
crates/ty_module_resolver/src/path.rs:711
↓ 2 callers
Function
is_fastapi_route_call
(call_expr: &ast::ExprCall, semantic: &SemanticModel)
crates/ruff_linter/src/rules/fastapi/rules/mod.rs:33
↓ 2 callers
Method
is_fatal
(self)
crates/ruff_db/src/diagnostic/mod.rs:1308
↓ 2 callers
Function
is_file_excluded
Return `true` if the given top-level [`Path`] should be excluded.
crates/ruff_workspace/src/resolver.rs:821
↓ 2 callers
Function
is_file_in_project
Helper function to check if a file is included in the project.
crates/ty_ide/src/rename.rs:93
↓ 2 callers
Function
is_final_attribute_initializer
Whether this method can initialize a `Final` instance attribute of its defining class.
crates/ty_python_semantic/src/types/annotation_target.rs:35
↓ 2 callers
Method
is_first_party_definition
(&self, definition: Definition<'db>)
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/diagnostic.rs:993
↓ 2 callers
Function
is_float
Test whether the given binding can be considered an instance of `float`.
crates/ruff_python_semantic/src/analyze/typing.rs:1079
↓ 2 callers
Method
is_formatted
If the comment has already been formatted
crates/ruff_python_formatter/src/comments/mod.rs:156
↓ 2 callers
Method
is_formatted
(&self, path: &RelativePath, key: &FileCacheKey)
crates/ruff/src/cache.rs:276
↓ 2 callers
Function
is_frozen_dataclass_instantiation
Checks that the passed function is an instantiation of the class, retrieves the ``StmtClassDef`` and verifies that it is a frozen dataclass
crates/ruff_linter/src/rules/ruff/rules/function_call_in_dataclass_default.rs:174
↓ 2 callers
Function
is_fstring_with_quoted_debug_expression
Returns `true` if `string` is an f-string part that contains a debug expression that uses quotes and the format target is pre Python 312 We can't join
crates/ruff_python_formatter/src/string/normalize.rs:924
↓ 2 callers
Function
is_fstring_with_triple_quoted_literal_expression_containing_quotes
Tests if the `fstring` contains any triple quoted string, byte, or f-string literal that contains a quote character opposite to its own quote characte
crates/ruff_python_formatter/src/string/normalize.rs:949
↓ 2 callers
Method
is_fully_gradual
Returns whether the entire parameter list is gradual, with no fixed parameters.
crates/ty_python_semantic/src/types/signatures.rs:5241
↓ 2 callers
Function
is_function_definition
( db: &'db dyn Db, scope: ScopeId<'db>, symbol: ScopedSymbolId, )
crates/ty_python_semantic/src/types/overrides.rs:1801
↓ 2 callers
Function
is_hangul_syllable
(c: char)
crates/ruff_unicode_names2/src/jamo.rs:17
↓ 2 callers
Function
is_hidden
(path: &SystemPath)
crates/ruff_db/src/system/memory_fs.rs:733
↓ 2 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/ty_project/src/metadata/options.rs:1628
↓ 2 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
↓ 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:385
↓ 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:1109
↓ 2 callers
Method
is_initialized
(&self)
crates/ty_server/src/session.rs:1875
↓ 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:57
↓ 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:2333
↓ 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:772
↓ 2 callers
Function
is_item_name_part
(name: &str)
crates/ty_ide/src/docstring/document/numpy.rs:791
↓ 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:234
↓ 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:108
↓ 2 callers
Function
is_mixed_case
(name: &str)
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:12
← previous
next →
6,101–6,200 of 31,766, ranked by callers