MCPcopy Create free account

hub / github.com/astral-sh/ruff / functions

Functions31,562 in github.com/astral-sh/ruff

↓ 3 callersFunctionis_fastapi_route_decorator
Returns `true` if the decorator is indicative of a FastAPI route.
crates/ruff_linter/src/rules/fastapi/rules/mod.rs:25
↓ 3 callersMethodis_fatal
(self)
crates/ruff_db/src/diagnostic/mod.rs:1337
↓ 3 callersMethodis_file_included
Returns whether `path` is part of the project and included (see `included_paths_list`). Unlike [Self::files], this method does not respect `.gitignor
crates/ty_project/src/lib.rs:391
↓ 3 callersMethodis_first_statement_in_alternate_body
Returns `true` if `statement` is the first statement in an alternate `body` (e.g. the else of an if statement)
crates/ruff_python_ast/src/node.rs:727
↓ 3 callersMethodis_fixable
Whether or not the diagnostic for this message is fixable. This is rendered as a `[*]` indicator after the `id` in an annotation header, if the annot
crates/ruff_annotate_snippets/src/snippet.rs:224
↓ 3 callersMethodis_function_literal
(&self)
crates/ty_python_semantic/src/types.rs:3312
↓ 3 callersMethodis_generic
(self)
crates/ty_python_semantic/src/types/class.rs:1192
↓ 3 callersMethodis_hierarchical
(self)
crates/ruff_workspace/src/resolver.rs:71
↓ 3 callersFunctionis_implicit_classmethod
Whether a function should implicitly be treated as a classmethod based on its name.
crates/ty_python_semantic/src/types/function.rs:259
↓ 3 callersMethodis_imported_qualifier
(self)
crates/ty_python_core/src/use_def/place_state.rs:126
↓ 3 callersMethodis_in_excluded
Returns `true` if the `in` keyword should be excluded from a comparison expression.
crates/ruff_python_parser/src/parser/expression.rs:3214
↓ 3 callersMethodis_included
(self)
crates/ty_project/src/glob.rs:143
↓ 3 callersMethodis_init
(self)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:794
↓ 3 callersMethodis_instance_attribute
Is the place an instance attribute?
crates/ty_python_core/src/member.rs:61
↓ 3 callersFunctionis_int
Test whether the given binding can be considered an integer.
crates/ruff_python_semantic/src/analyze/typing.rs:1074
↓ 3 callersFunctionis_invalid_typed_dict_literal
We avoid emitting invalid assignment diagnostic for literal assignments to a `TypedDict`, as they can only occur if we already failed to validate the
crates/ty_python_semantic/src/types/diagnostic.rs:1808
↓ 3 callersMethodis_known
Does this module represent the given known module?
crates/ty_module_resolver/src/module.rs:96
↓ 3 callersFunctionis_known_standard_library
This file is generated by `scripts/generate_known_standard_library.py`
crates/ruff_python_stdlib/src/sys/known_stdlib.rs:3
↓ 3 callersFunctionis_known_to_be_of_type_dict
(semantic: &SemanticModel, expr: &ExprName)
crates/ruff_python_semantic/src/analyze/typing.rs:50
↓ 3 callersMethodis_lambda_expr
(&self)
crates/ruff_python_ast/src/generated.rs:1763
↓ 3 callersMethodis_last
Whether this is the last line in the docstring or not.
crates/ruff_python_formatter/src/string/docstring.rs:629
↓ 3 callersMethodis_lazy
(&self)
crates/ty_project/src/files.rs:57
↓ 3 callersMethodis_lazy
(self)
crates/ty_python_core/src/scope.rs:210
↓ 3 callersFunctionis_literal_fallthrough_arm
(index: usize)
crates/ruff_benchmark/benches/ty.rs:1833
↓ 3 callersFunctionis_logical_line
(node: AnyNodeRef)
crates/ruff_python_formatter/src/range.rs:580
↓ 3 callersMethodis_match_star
(&self)
crates/ruff_python_ast/src/generated.rs:3295
↓ 3 callersMethodis_member
(self)
crates/ty_python_core/src/place.rs:477
↓ 3 callersFunctionis_named_tuple_assignment
Returns `true` if the statement is an assignment to a named tuple.
crates/ruff_linter/src/rules/pep8_naming/helpers.rs:27
↓ 3 callersMethodis_never_satisfied_with_limits
Budget exhaustion leaves satisfiability unknown and must not be cached as a result.
crates/ty_python_semantic/src/types/constraints.rs:2587
↓ 3 callersFunctionis_ngettext_call
Returns true if the function call is ngettext
crates/ruff_linter/src/rules/flake8_gettext/mod.rs:12
↓ 3 callersMethodis_non_divergent_dynamic
(&self)
crates/ty_python_semantic/src/types.rs:2811
↓ 3 callersMethodis_number_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2392
↓ 3 callersFunctionis_object_or_unused
Return `true` if the [`Expr`] is the `object` builtin or the `_typeshed.Unused` type.
crates/ruff_linter/src/rules/flake8_pyi/rules/exit_annotations.rs:501
↓ 3 callersMethodis_off
(self)
crates/ty_server/src/session/options.rs:481
↓ 3 callersFunctionis_package
Return `true` if the directory at the given `Path` appears to be a Python package.
crates/ruff_linter/src/packaging.rs:28
↓ 3 callersMethodis_parameter_def
(&self)
crates/ty_python_core/src/definition.rs:1011
↓ 3 callersMethodis_pass_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:1147
↓ 3 callersFunctionis_pattern_parenthesized
( pattern: &Pattern, comment_ranges: &CommentRanges, contents: &str, )
crates/ruff_python_formatter/src/pattern/mod.rs:110
↓ 3 callersMethodis_pending_narrowing
(&self)
crates/ty_python_semantic/src/types.rs:2470
↓ 3 callersFunctionis_pep_593_generic_type
Returns `true` if a call path is a [PEP 593] generic (e.g. `Annotated`). See: <https://docs.python.org/3/library/typing.html> [PEP 593]: https://pep
crates/ruff_python_stdlib/src/typing.rs:127
↓ 3 callersMethodis_positionally_bound
Returns `true` if the parameter at `parameter_index` is removed from the reduced signature because it was already supplied positionally to `functools.
crates/ty_python_semantic/src/types/signatures.rs:944
↓ 3 callersMethodis_private
(self)
crates/ty_python_core/src/scope.rs:192
↓ 3 callersFunctionis_private_attribute
Pydantic treats underscore-prefixed annotations as private instance attributes.
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:37
↓ 3 callersFunctionis_property_method
Identifies the actual implementation, rather than a method with the same name on a subclass.
crates/ty_python_semantic/src/types.rs:1585
↓ 3 callersMethodis_provisional_marker
(self)
crates/ty_python_semantic/src/types/typevar.rs:157
↓ 3 callersFunctionis_pytest_raises
(qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/raises.rs:177
↓ 3 callersFunctionis_python_builtin
Returns `true` if the given name is that of a Python builtin. Intended to be kept in sync with [`python_builtins`].
crates/ruff_python_stdlib/src/builtins.rs:264
↓ 3 callersMethodis_python_notebook
Check if it's a Python notebook. This is determined by checking the `language_info` or `kernelspec` in the notebook metadata. If neither is present,
crates/ruff_notebook/src/notebook.rs:466
↓ 3 callersMethodis_range_reachable
Check whether a diagnostic emitted at `range` is in reachable code. This checks both whether the scope itself is reachable and whether the specific s
crates/ty_python_semantic/src/types/context.rs:402
↓ 3 callersFunctionis_reexported
Returns `true` if the `definition` is re-exported. This will first check if the definition is using the "redundant alias" pattern like `import foo as
crates/ty_python_semantic/src/place.rs:2384
↓ 3 callersMethodis_reexported
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:108
↓ 3 callersFunctionis_root_model
(db: &'db dyn Db, class: StaticClassLiteral<'db>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:665
↓ 3 callersMethodis_single
Returns whether both delimiters consist of one backtick.
crates/ty_ide/src/docstring/document/syntax.rs:305
↓ 3 callersMethodis_single
Returns true if this is a single callable (not a union or intersection).
crates/ty_python_semantic/src/types/call/bind.rs:1474
↓ 3 callersMethodis_single_paramspec
( &self, )
crates/ty_python_semantic/src/types/signatures.rs:596
↓ 3 callersMethodis_singleton
(self)
crates/ruff_python_ast/src/token.rs:446
↓ 3 callersMethodis_singleton
Is this class a singleton class? A singleton class is a class where it is known that only one instance can ever exist at runtime.
crates/ty_python_semantic/src/types/class/known.rs:1675
↓ 3 callersFunctionis_special_cased_condition_expression
Return `true` if `expression` is recognized as "tainted" by being defined (directly or indirectly) with respect to `sys.version_info`, `sys.platform`,
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/exemptions.rs:334
↓ 3 callersMethodis_specialized_generic
Returns whether this type represents a specialization of a generic type. For example, whereas `<class 'list'>` is a generic type, `<class 'list[int]'
crates/ty_python_semantic/src/types.rs:2767
↓ 3 callersMethodis_standard_library_stub
(&self)
crates/ty_module_resolver/src/path.rs:38
↓ 3 callersFunctionis_staticmethod
Returns `true` if a function is a "static method".
crates/ruff_python_semantic/src/analyze/visibility.rs:16
↓ 3 callersMethodis_staticmethod_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:902
↓ 3 callersMethodis_string_literal
(&self)
crates/ty_python_semantic/src/types.rs:3370
↓ 3 callersMethodis_subclass_of
(&self)
crates/ty_python_semantic/src/types.rs:3207
↓ 3 callersFunctionis_subject_to_liskov_substitution_principle
Return `true` if this function is subject to the Liskov Substitution Principle. Type checkers will check nearly all methods for compliance with the L
crates/ruff_python_semantic/src/analyze/function_type.rs:54
↓ 3 callersMethodis_suppression_off_comment
(&self, text: &str)
crates/ruff_python_formatter/src/comments/mod.rs:169
↓ 3 callersMethodis_terminal
(self)
crates/ty_python_semantic/src/reachability.rs:1056
↓ 3 callersMethodis_todo
(&self)
crates/ty_python_semantic/src/types.rs:2746
↓ 3 callersMethodis_triple_quoted
Is the string triple-quoted, i.e., does it begin and end with three consecutive quote characters?
crates/ruff_python_ast/src/nodes.rs:985
↓ 3 callersMethodis_triple_quoted_string
Returns `true` if the current token is a triple-quoted string of any kind. # Panics If it isn't a string or any f/t-string tokens.
crates/ruff_python_ast/src/token.rs:58
↓ 3 callersMethodis_trivially_always_satisfied
(&self)
crates/ty_python_semantic/src/types/signatures.rs:778
↓ 3 callersMethodis_tuple
Returns whether this class is `builtins.tuple` exactly
crates/ty_python_semantic/src/types/class.rs:840
↓ 3 callersMethodis_type_alias_annotation
Returns whether `annotation` declares a PEP 613 type alias.
crates/ty_python_semantic/src/semantic_model.rs:630
↓ 3 callersMethodis_type_alias_definition
Returns whether `definition` defines a PEP 613 or PEP 695 type alias.
crates/ty_python_semantic/src/semantic_model.rs:638
↓ 3 callersMethodis_type_param
(self)
crates/ruff_python_ast/src/generated.rs:7410
↓ 3 callersMethodis_typed_dict
(&self)
crates/ty_python_semantic/src/types.rs:3229
↓ 3 callersMethodis_unbound
(self)
crates/ty_python_core/src/use_def/place_state.rs:76
↓ 3 callersMethodis_unfolded_and
(self, predicate: impl FnOnce(T) -> bool)
crates/ty_python_semantic/src/types/recursive.rs:731
↓ 3 callersMethodis_unformatted
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:160
↓ 3 callersMethodis_unparenthesized_named_expr
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3050
↓ 3 callersMethodis_used
(&self, suppression_id: FileSuppressionId)
crates/ty_python_semantic/src/types/diagnostic.rs:1699
↓ 3 callersMethodis_user_defined
(self)
crates/ty_python_semantic/src/types/enums.rs:106
↓ 3 callersMethodis_variable
(self)
crates/ty_python_semantic/src/types/tuple.rs:54
↓ 3 callersMethodis_variadic
(self)
crates/ruff_python_ast/src/nodes.rs:3275
↓ 3 callersFunctionis_warn_on_unknown_selectors_enabled
https://github.com/astral-sh/ruff/pull/26113
crates/ruff_linter/src/preview.rs:350
↓ 3 callersFunctionis_wrapped_in_markdown_code_span
Returns whether `text` is wrapped in a Markdown code span. For example, this returns `true` for ``"`value`"`` and `false` for ``"`value` trailing"``.
crates/ty_ide/src/docstring/document/syntax.rs:65
↓ 3 callersFunctionis_wsl
Returns `true` if the current process is running under WSL. Adapted from is-wsl by Sean Larkin, MIT License.
crates/ruff_linter/src/rules/flake8_executable/helpers.rs:18
↓ 3 callersMethodis_yes
(self)
crates/ruff_python_ast/src/str.rs:79
↓ 3 callersFunctionisort_settings_with_all_headings
Helper to create a standard isort Settings with all section headings and `known_modules` configured for `my_first_party`.
crates/ruff_linter/src/rules/isort/mod.rs:1299
↓ 3 callersMethoditer
Returns an iterator over the rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let set = RuleSet::from_rules(&[Ru
crates/ruff_linter/src/registry/rule_set.rs:280
↓ 3 callersMethoditer
(&self)
crates/ruff_linter/src/docstrings/sections.rs:242
↓ 3 callersMethoditer
(&self)
crates/ruff_index/src/slice.rs:69
↓ 3 callersMethoditer_bases
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/newtype.rs:101
↓ 3 callersMethoditer_chunks
(&self)
crates/ty_python_semantic/src/types/constraints/support.rs:74
↓ 3 callersMethoditer_evidence
( &self, source: EvidenceSource, )
crates/ty_python_semantic/src/types/constraints.rs:1967
↓ 3 callersMethoditer_matching
( &self, include: impl Fn(ConstraintProvenance) -> bool + Clone, )
crates/ty_python_semantic/src/types/constraints.rs:1954
↓ 3 callersMethoditer_negative
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1482
↓ 3 callersMethoditer_with_context
Returns an iterator over all the tokens that provides context.
crates/ruff_python_ast/src/token/tokens.rs:21
↓ 3 callersMethodkey
(&self)
crates/ty_server/src/session.rs:1952
↓ 3 callersMethodkey
Returns the annotation pattern in definition order. A repeated symbol shadows an earlier parameter, so the annotation pattern alone cannot describe th
crates/ty_python_core/src/use_def.rs:904
← previousnext →4,201–4,300 of 31,562, ranked by callers