MCPcopy Create free account

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

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

↓ 2 callersFunctiongenerate_suppression_edit
( directive: Option<ExistingDirective<'a>>, offset: TextSize, noqa_codes: FxHashSet<&'a str>,
crates/ruff_linter/src/noqa.rs:1123
↓ 2 callersFunctiongenerate_union_fix
Generate a [`Fix`] for two or more type expressions, e.g. `typing.Union[int, float, complex]`.
crates/ruff_linter/src/rules/flake8_pyi/rules/mod.rs:122
↓ 2 callersFunctiongenerator_annotation_arguments
Returns the arguments to a generator annotation, if it exists.
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:1154
↓ 2 callersFunctiongeneric_context_has_paramspec
( db: &'db dyn Db, generic_context: GenericContext<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:292
↓ 2 callersMethodget
(&self)
crates/ruff_python_codegen/src/stylist.rs:65
↓ 2 callersMethodget
(self, key: str)
crates/ruff_linter/resources/test/fixtures/pylint/useless_return.py:54
↓ 2 callersMethodget
Return the [`Language`] for the given file.
crates/ruff_linter/src/settings/types.rs:507
↓ 2 callersMethodgetOrCreateVendoredModel
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:531
↓ 2 callersMethodgetPlaygroundFileForUri
(uri: Uri)
playground/ty/src/Editor/Editor.tsx:503
↓ 2 callersMethodget_child
(&mut self, b: u8)
crates/ruff_unicode_names2_generator/src/trie.rs:18
↓ 2 callersMethodget_clear
(&self)
crates/ruff_db/src/system/command.rs:118
↓ 2 callersFunctionget_mark_decorators
( decorators: &'a [Decorator], semantic: &'a SemanticModel, )
crates/ruff_linter/src/rules/flake8_pytest_style/helpers.rs:12
↓ 2 callersFunctionget_minimum_supported_version
Infer the minimum supported [`PythonVersion`] from a `requires-python` specifier.
crates/ruff_workspace/src/pyproject.rs:237
↓ 2 callersMethodget_names_from_wildcard
Returns the exported symbols (along with `__all__`) from the module imported in `import_from`.
crates/ty_ide/src/symbols.rs:1162
↓ 2 callersFunctionget_or_create_file
( paths: &'a mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, normalized: &Utf8Path, )
crates/ruff_db/src/system/memory_fs.rs:513
↓ 2 callersFunctionget_output
()
crates/ruff_db/src/diagnostic/render/sarif.rs:432
↓ 2 callersFunctionget_prefix_ident
Returns an identifier for the given prefix.
crates/ruff_macros/src/rule_code_prefix.rs:121
↓ 2 callersMethodget_print_mode
(&self, group_id: GroupId)
crates/ruff_formatter/src/printer/mod.rs:936
↓ 2 callersFunctionget_project_cache_dir
Get the cache directory for a project in the cargo target directory
crates/ruff_benchmark/src/checkout.rs:50
↓ 2 callersFunctionget_result_with_options
( source: &str, expected_diagnostics: Vec<ExpectedDiagnostic>, options: RunOptions,
crates/mdtest/src/matcher.rs:580
↓ 2 callersFunctionget_string_literal
( meta: &ParseNestedMeta, meta_name: &str, attribute_name: &str, )
crates/ruff_macros/src/config.rs:325
↓ 2 callersFunctionget_truncated_table_data
( unicode_data: &'static str, truncate: Option<usize>, )
crates/ruff_unicode_names2_generator/src/lib.rs:393
↓ 2 callersFunctionget_type_alias
(db: &'db TestDb, name: &str)
crates/ty_python_semantic/src/types/tests.rs:879
↓ 2 callersFunctionget_undecorated_methods
(checker: &Checker, class_stmt: &Stmt, method_type: &MethodType)
crates/ruff_linter/src/rules/pylint/rules/no_method_decorator.rs:103
↓ 2 callersMethodgetitem_dunder_call
Returns the value type of a `__getitem__` dunder call on this object. Returns `None` if `__getitem__` is undefined or results in a call error.
crates/ty_python_semantic/src/types.rs:6958
↓ 2 callersMethodglobal
(&self, _name: &str)
crates/ruff_python_parser/tests/fixtures.rs:648
↓ 2 callersMethodglobal
(&self, name: &str)
crates/ruff_linter/src/checkers/ast/mod.rs:765
↓ 2 callersMethodglobal_binding
Return a binding from the global scope, materializing it first if it is a builtin.
crates/ruff_python_semantic/src/model.rs:847
↓ 2 callersFunctionglobal_type_alias
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, )
crates/ty_python_semantic/src/types/cyclic.rs:1356
↓ 2 callersMethodgoToLocation
(location: DiagnosticDetailLocation)
playground/ty/src/Editor/Editor.tsx:953
↓ 2 callersMethodgoto_definition_request
Send a `textDocument/definition` request for the document at the given path and position.
crates/ty_server/tests/e2e/main.rs:1071
↓ 2 callersMethodhandle_message
Handle the incoming message from the server. This method will store the message as follows: - Requests are stored in `self.requests` - Responses are
crates/ty_server/tests/e2e/main.rs:749
↓ 2 callersMethodhandle_message
Handle the incoming message from the server. This method will store the message as follows: - Requests are stored in `self.requests` - Responses are
crates/ruff_server/tests/e2e/main.rs:615
↓ 2 callersMethodhandle_node_load
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:2898
↓ 2 callersFunctionhandler
(echo: str = Query(""))
crates/ruff_linter/resources/test/fixtures/fastapi/FAST002_1.py:10
↓ 2 callersFunctionhasFileNamed
(fileName: string)
playground/ty/src/Editor/Files.tsx:32
↓ 2 callersMethodhas_any_return
Returns `true` if the [`Terminal`] behavior includes at least one `return` path.
crates/ruff_python_semantic/src/analyze/terminal.rs:31
↓ 2 callersMethodhas_blank_line_between
Check if there's a blank line appearing anywhere between two positions.
crates/ty_ide/src/folding_range.rs:312
↓ 2 callersMethodhas_bound_prefix
Returns whether any tracked prefix is at least possibly bound.
crates/ty_python_semantic/src/place_load.rs:1111
↓ 2 callersMethodhas_builtin_binding_in_scope
Return `true` if `member` is bound as a builtin *in a given scope*. Note that a "builtin binding" does *not* include explicit lookups via the `builti
crates/ruff_python_semantic/src/model.rs:405
↓ 2 callersFunctionhas_conditional_body
Returns `true` if the [`With`] statement is known to have a conditional body. In other words: if the [`With`] statement's body may or may not run. Fo
crates/ruff_linter/src/rules/flake8_return/visitor.rs:234
↓ 2 callersFunctionhas_duplicate
Return true if a string or byte sequence has a duplicate.
crates/ruff_linter/src/rules/pylint/rules/bad_str_strip_call.rs:164
↓ 2 callersMethodhas_empty_text
(&self)
crates/ruff_linter/src/rules/flake8_quotes/rules/check_string_quotes.rs:209
↓ 2 callersMethodhas_errors_affecting_overload_resolution
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:9669
↓ 2 callersMethodhas_explicit_legacy_generic_base
Returns `true` if the class has a subscripted `Generic` or `Protocol` base, including an empty subscription such as `Generic[()]`.
crates/ty_python_semantic/src/types/class/static_literal.rs:443
↓ 2 callersMethodhas_explicit_metaclass
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:226
↓ 2 callersMethodhas_explicit_positional_receiver_annotation
(&self)
crates/ty_python_semantic/src/types/signatures.rs:1869
↓ 2 callersMethodhas_explicit_receiver_annotation
Returns whether an instance method has an explicit positional receiver annotation.
crates/ty_python_semantic/src/types/protocol_class.rs:2204
↓ 2 callersMethodhas_extra
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:12932
↓ 2 callersFunctionhas_indented_description
(line: &ParsedLine<'_>, following_lines: &[ParsedLine<'_>])
crates/ty_ide/src/docstring/document/numpy.rs:766
↓ 2 callersMethodhas_inference
(&self, source: EvidenceSource)
crates/ty_python_semantic/src/types/constraints.rs:1991
↓ 2 callersMethodhas_lower_inference
(&self)
crates/ty_python_semantic/src/types/constraints.rs:3557
↓ 2 callersFunctionhas_magic_trailing_comma
Returns `true` if the range ends with a magic trailing comma (and the magic trailing comma should be respected).
crates/ruff_python_formatter/src/other/commas.rs:10
↓ 2 callersMethodhas_member_declaration
Return whether `name` is declared by this protocol or one of its superclasses. Unlike [`ProtocolClass::interface`], this includes names deliberately
crates/ty_python_semantic/src/types/protocol_class.rs:263
↓ 2 callersMethodhas_named_tuple_class_in_mro
Return `true` if this class is, or inherits from, a `NamedTuple` (inherits from `typing.NamedTuple`, either directly or indirectly, including function
crates/ty_python_semantic/src/types/class/static_literal.rs:1133
↓ 2 callersMethodhas_named_tuple_slots
Returns whether this class directly inherits the synthesized named-tuple layout.
crates/ty_python_semantic/src/types/class/slots.rs:274
↓ 2 callersMethodhas_own_class_binding
Returns whether a binding for this name reaches the end of the class body.
crates/ty_python_semantic/src/types/class/slots.rs:228
↓ 2 callersMethodhas_own_comparison_methods
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:307
↓ 2 callersMethodhas_own_custom_getattribute
Return whether this class defines its own non-default `__getattribute__`. An explicit metaclass can install the method even when the class body does
crates/ty_python_semantic/src/types/class/static_literal.rs:1025
↓ 2 callersMethodhas_own_diagnostics
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:417
↓ 2 callersMethodhas_own_slot_descriptor
Whether this class creates a descriptor for `name` in its own namespace.
crates/ty_python_semantic/src/types/class/slots.rs:539
↓ 2 callersMethodhas_parameters
(&self)
crates/ty_python_semantic/src/types/signatures.rs:570
↓ 2 callersMethodhas_pending
Returns `true` if there are any line suffixes and `false` otherwise.
crates/ruff_formatter/src/printer/line_suffixes.rs:29
↓ 2 callersMethodhas_receiver_determined_method_typevar
Returns whether the receiver can determine a method type variable used elsewhere. Receiver-only variables cannot affect the rest of the signature, cl
crates/ty_python_semantic/src/types/signatures.rs:1879
↓ 2 callersMethodhas_relation_to
Check a nominal type relation directly between classes, including their specializations. Assignability allows unknown bases to supply a subclass rela
crates/ty_python_semantic/src/types/class.rs:1496
↓ 2 callersFunctionhas_star_star_kwargs
(keywords: &[Keyword])
crates/ruff_linter/src/rules/pyflakes/rules/strings.rs:564
↓ 2 callersMethodhas_staticmethod_declaration
Whether this function was declared as a staticmethod, even if descriptor access has already exposed the ordinary function. Diagnostics can still use i
crates/ty_python_semantic/src/types/function.rs:1608
↓ 2 callersFunctionhas_trailing_comma
Returns `true` if the range ends with a trailing comma.
crates/ruff_python_formatter/src/other/commas.rs:18
↓ 2 callersMethodhas_upper_inference
(&self)
crates/ty_python_semantic/src/types/constraints.rs:3561
↓ 2 callersMethodhas_value
Returns whether this annotated assignment has a right-hand-side value.
crates/ty_python_core/src/definition.rs:1521
↓ 2 callersMethodhash
(&self, state: &mut H)
crates/ruff_python_formatter/src/comments/node_key.rs:42
↓ 2 callersMethodhash
(&self, state: &mut H)
crates/ruff_db/src/system/path.rs:23
↓ 2 callersMethodhash
(&self, state: &mut H)
crates/ty_python_core/src/place.rs:193
↓ 2 callersMethodhash
(&self, state: &mut H)
crates/ty_python_semantic/src/lint.rs:348
↓ 2 callersMethodheader_span
Returns a [`Span`] pointing to the `TypedDict` call expression.
crates/ty_python_semantic/src/types/class/typed_dict.rs:962
↓ 2 callersFunctionhierarchy_handler
The subtype and supertype implementation.
crates/ty_server/src/server/api/type_hierarchy.rs:16
↓ 2 callersMethodhint
Returns details for failures whose message only identifies the failed operation.
crates/ty_project/src/metadata/options.rs:2342
↓ 2 callersFunctionhint_if_stdlib_attribute_exists_on_other_versions
This function receives an unresolved `foo.bar` attribute access, where `foo` can be resolved to have a type but that type does not have a `bar` attrib
crates/ty_python_semantic/src/types/diagnostic.rs:6176
↓ 2 callersFunctionhint_if_stdlib_submodule_exists_on_other_versions
This function receives an unresolved `from foo import bar` import, where `foo` can be resolved to a module but that module does not have a `bar` membe
crates/ty_python_semantic/src/types/diagnostic.rs:6127
↓ 2 callersMethodid_url
Provide a URL for [`Title::id`] for more information on this diagnostic <div class="warning"> This is only relevant if `id` is present </div>
crates/ruff_annotate_snippets/src/snippet.rs:205
↓ 2 callersMethodidentifier
Returns the identifier of the command.
crates/ty_server/src/capabilities.rs:62
↓ 2 callersMethodidentifies_all_bindings
Returns whether [`Self::definitions()`] identifies the Python code that binds the name on every path where the name can have a value. For example, if
crates/ty_python_semantic/src/place/definitions.rs:179
↓ 2 callersMethodidentity_comparison_type
Upcast `self` to a type that conservatively describes its possible runtime objects in an identity comparison. Python's [`is` operator][is operator] t
crates/ty_python_semantic/src/types/infer/comparisons.rs:80
↓ 2 callersMethodiff
Returns a constraint set encoding that this constraint set is equivalent to another. In the result's source order, `self` will appear before `other`.
crates/ty_python_semantic/src/types/constraints.rs:783
↓ 2 callersFunctionimplementation
( server: &mut crate::TestServer, path: impl AsRef<ruff_db::system::SystemPath>, position: Positio
crates/ty_server/tests/e2e/implementation.rs:101
↓ 2 callersMethodimplementation_deprecated
If the implementation of this function is deprecated, returns the `@warnings.deprecated`. Checking if an overload is deprecated requires deeper call
crates/ty_python_semantic/src/types/function.rs:911
↓ 2 callersMethodimplicit_attribute
Tries to find declarations/bindings of an attribute named `name` that are only "implicitly" defined (`self.x = …`, `cls.x = …`) in a method of this cl
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:522
↓ 2 callersFunctionimplicit_attribute_names
( db: &'db dyn Db, class_body_scope: ScopeId<'db>, )
crates/ty_python_semantic/src/types/class/implicit_attributes.rs:476
↓ 2 callersMethodimport
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1235
↓ 2 callersMethodimport_laziness
Classify an import using its syntax and the current `__lazy_modules__` declaration. The caller must check that the import occurs in a context where la
crates/ruff_python_semantic/src/model.rs:2409
↓ 2 callersFunctionimport_literal_for_fix
(context: &InferContext, at: TextSize)
crates/ty_python_semantic/src/types/diagnostic.rs:3337
↓ 2 callersFunctionimport_name
Helper to get the module name up to the given component index
crates/ty_ide/src/goto.rs:1526
↓ 2 callersMethodimport_owner
Returns the distribution ID to use when checking the dependency required by an import. The returned string is an opaque package-manager ID from [`Sel
crates/ty_python_semantic/src/dependency.rs:216
↓ 2 callersMethodimport_symbol
Generate an [`Edit`] to reference the given symbol. Returns the [`Edit`] necessary to make the symbol available in the current scope along with the bo
crates/ruff_linter/src/importer/mod.rs:394
↓ 2 callersMethodimported_final_candidates_at_binding
Imports that may contribute a `Final` qualifier at this binding. These imports do not declare a type. Whether their source is actually `Final` is det
crates/ty_python_core/src/use_def.rs:1330
↓ 2 callersMethodimported_from
Returns the module that this symbol was re-exported from. This is only available for symbols that have been imported into `Self::module()` *and* are
crates/ty_ide/src/all_symbols.rs:189
↓ 2 callersMethodin_assert_statement
Return `true` if the model is in an `assert` statement.
crates/ruff_python_semantic/src/model.rs:2225
↓ 2 callersMethodin_async_context
(&self)
crates/ruff_python_parser/tests/fixtures.rs:656
↓ 2 callersMethodin_builder
Returns the builder-specific order that the typevars in this bound should be added in.
crates/ty_python_semantic/src/types/constraints/variables.rs:1296
↓ 2 callersMethodin_class_base
Return `true` if the model is visiting an item in a class's bases tuple (e.g. `Foo` in `class Bar(Foo): ...`)
crates/ruff_python_semantic/src/model.rs:2326
← previousnext →5,701–5,800 of 31,562, ranked by callers