MCPcopy Create free account

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

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

↓ 34 callersMethodpython_version
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:106
↓ 34 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:189
↓ 34 callersMethodresolve_name
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if any.
crates/ruff_python_semantic/src/model.rs:1171
↓ 34 callersMethodresolver_environment
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:112
↓ 34 callersMethodsystem
(&self)
crates/ty_module_resolver/src/db.rs:105
↓ 33 callersMethodas_ref
(&self)
crates/ruff_db/src/system/path.rs:655
↓ 33 callersMethodborrow
(&self)
crates/ruff_index/src/vec.rs:111
↓ 33 callersMethodcurrent_token_kind
(&self)
crates/ruff_python_parser/src/parser/mod.rs:391
↓ 33 callersMethodget
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:12827
↓ 33 callersMethodindexer
The [`Indexer`] for the current file, which contains the offsets of all comments and more.
crates/ruff_linter/src/checkers/ast/mod.rs:533
↓ 33 callersMethodinsert
(&mut self, file: File, is_script: bool)
crates/ty_project/src/files.rs:247
↓ 33 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13405
↓ 33 callersMethodis_always_false
(self)
crates/ty_python_core/src/lib.rs:1001
↓ 33 callersMethoditer
Iterates over the scripts without duplicates.
crates/ty_project/src/lib.rs:884
↓ 33 callersFunctionmap_subscript
Given an [`Expr`] that can be a [`ExprSubscript`][ast::ExprSubscript] or not (like an annotation that may be generic or not), return the underlying ex
crates/ruff_python_ast/src/helpers.rs:902
↓ 33 callersMethodwrite_file
(&mut self, path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3447
↓ 32 callersMethodcount
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:579
↓ 32 callersMethodcurrent_dir
Sets the working directory for the command.
crates/ruff_db/src/system/command.rs:43
↓ 32 callersMethodget
(&self, index: usize)
crates/ty_python_semantic/src/types/call/arguments.rs:702
↓ 32 callersMethodis_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callersMethodkind
(self)
crates/ty_python_semantic/src/types/infer/type_context.rs:72
↓ 32 callersMethodline_ending
(&self)
crates/ruff_source_file/src/newlines.rs:241
↓ 32 callersFunctionline_index
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:222
↓ 32 callersMethodmembers
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:473
↓ 32 callersMethodpeek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 32 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:2161
↓ 32 callersMethodpush
(&mut self, segment: &'a str)
crates/ruff_python_ast/src/name.rs:487
↓ 32 callersMethodroot_path
(&self)
crates/ty/tests/file_watching.rs:61
↓ 32 callersFunctiontest_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:216
↓ 32 callersMethodto_instance_approximation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:9010
↓ 32 callersMethodvalues
(&self)
crates/ty_python_core/src/frozen.rs:57
↓ 31 callersMethodas_function_literal
(self)
crates/ty_python_semantic/src/types.rs:3298
↓ 31 callersMethodbinding_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1079
↓ 31 callersMethodclear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:370
↓ 31 callersMethodcontains_line_break
(&self, range: TextRange)
crates/ruff_linter/src/locator.rs:177
↓ 31 callersMethodcurrent_scope
(&self)
crates/ty_python_core/src/builder.rs:394
↓ 31 callersMethodget
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:425
↓ 31 callersMethodinner_type
Forget about type qualifiers and only return the inner type.
crates/ty_python_semantic/src/types.rs:12102
↓ 31 callersMethodis_same_typevar_as
Returns whether two bound typevars represent the same occurrence, regardless of e.g. differences in their bounds or constraints due to materialization
crates/ty_python_semantic/src/types/typevar.rs:1228
↓ 31 callersMethodkind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 31 callersMethodmetadata
Executes `uv workspace metadata` and parses and validates its output.
crates/ty_project/src/uv/command.rs:29
↓ 31 callersMethodnominal_class
If this type is a class instance, returns its class.
crates/ty_python_semantic/src/types.rs:2900
↓ 31 callersMethodonly_binding
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if it's the only binding to that name in its scope.
crates/ruff_python_semantic/src/model.rs:1177
↓ 31 callersFunctionprogram_file
(db: &TestDb, file: File)
crates/ty_python_core/src/lib.rs:1234
↓ 31 callersMethodresolve_builtin_symbol
If `expr` is a reference to a builtins symbol, return the name of that symbol. Else, return `None`. This method returns `true` both for "builtin bind
crates/ruff_python_semantic/src/model.rs:419
↓ 31 callersFunctiontest_case
(content: &str)
crates/ty_python_core/src/lib.rs:1221
↓ 31 callersMethoduniversal_newlines
(&self)
crates/ruff_source_file/src/newlines.rs:13
↓ 31 callersFunctionunknown_rule_selector_test
()
crates/ruff/tests/cli/lint.rs:919
↓ 31 callersMethodwith_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:138
↓ 30 callersMethodas_slice
(&self)
crates/ty_python_core/src/use_def/place_state.rs:267
↓ 30 callersFunctionassert_fail
(result: Result<Vec<Diagnostic>, FailuresByLine>, messages: &[(usize, &[&str])])
crates/mdtest/src/matcher.rs:598
↓ 30 callersFunctionbinding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:284
↓ 30 callersMethodbuild
Build the test server
crates/ruff_server/tests/e2e/main.rs:1152
↓ 30 callersMethodend_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1222
↓ 30 callersMethodfile_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:100
↓ 30 callersMethodfiles
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:794
↓ 30 callersFunctionfilter_result_id
Redact result_id values since they are hash-based and non-deterministic
crates/ty_server/tests/e2e/pull_diagnostics.rs:922
↓ 30 callersMethodinto_owned
(self)
crates/ty_python_semantic/src/types/signatures.rs:6010
↓ 30 callersMethodis_never_satisfied
Returns whether this constraint set never holds, without checking the type variables' declared bounds or constraints. Use [`Self::has_no_valid_solutio
crates/ty_python_semantic/src/types/constraints.rs:537
↓ 30 callersMethodis_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callersMethodlast_mut
(&mut self)
crates/ruff_index/src/slice.rs:54
↓ 30 callersFunctionmap_callable
Given an [`Expr`] that can be callable or not (like a decorator, which could be used with or without explicit call syntax), return the underlying call
crates/ruff_python_ast/src/helpers.rs:890
↓ 30 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:41
↓ 30 callersMethodstore_expression_type
(&mut self, expression: &ast::Expr, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7200
↓ 30 callersMethodsubclass_of
Return the inner [`SubclassOfInner`] value wrapped by this `SubclassOfType`.
crates/ty_python_semantic/src/types/subclass_of.rs:152
↓ 30 callersFunctionwalk_stmt
(checker: &Checker, body: &[Stmt], f: fn(&Stmt) -> bool)
crates/ruff_linter/src/rules/flake8_bugbear/rules/jump_statement_in_finally.rs:58
↓ 30 callersMethodwrite_project_file
( &self, relative_path: impl AsRef<SystemPath>, content: &str, )
crates/ty/tests/file_watching.rs:387
↓ 29 callersFunctionPython
({ height = 24, width = 24, }: { height?: number; width?: number; })
playground/shared/src/Icons.tsx:209
↓ 29 callersMethodancestors
Returns an iterator of this module name and all of its parent modules. # Examples ``` use ty_module_resolver::ModuleName; assert_eq!( ModuleName::n
crates/ty_module_resolver/src/module_name.rs:301
↓ 29 callersFunctionassert_parameter_documentation
(raw: &str, expected: &[(&str, &str)])
crates/ty_ide/src/docstring/document/google.rs:1640
↓ 29 callersFunctioncreate_constraint
( db: &'db TestDb, builder: &'c ConstraintSetBuilder<'db>, bound_typevar: BoundTypeVar
crates/ty_python_semantic/src/types/constraints.rs:5207
↓ 29 callersMethodextension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 29 callersMethodfile_name
(&self)
crates/ty_project/src/watch.rs:102
↓ 29 callersFunctionfile_to_module
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, )
crates/ty_module_resolver/src/resolve.rs:349
↓ 29 callersMethodinfer_type_expression
Infer the type of a type expression.
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:202
↓ 29 callersMethodinterface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:2049
↓ 29 callersMethodis_dynamic
(self)
crates/ty_python_semantic/src/types/subclass_of.rs:176
↓ 29 callersMethodis_typevartuple
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:335
↓ 29 callersMethodline_start
Compute the start position of the docstring's opening line
crates/ruff_linter/src/docstrings/mod.rs:40
↓ 29 callersMethodnode
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:42
↓ 29 callersMethodor
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:539
↓ 29 callersMethodreference
(&self, id: ResolvedReferenceId)
crates/ruff_python_semantic/src/model.rs:265
↓ 29 callersMethodsignature
Typed internally-visible signature for this function. This represents the annotations on the function itself, unmodified by decorators and overloads.
crates/ty_python_semantic/src/types/function.rs:551
↓ 29 callersMethodstarts_with
(&self, other: &QualifiedName<'_>)
crates/ruff_python_ast/src/name.rs:373
↓ 29 callersMethodtake_watch_changes
(&self, matcher: M)
crates/ty/tests/file_watching.rs:193
↓ 29 callersMethodto_comments
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:578
↓ 29 callersFunctiontoken
(text: &'static str)
crates/ruff_formatter/src/builders.rs:254
↓ 29 callersFunctiontokenize
(source: &'static str)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:45
↓ 29 callersMethodwith_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:272
↓ 29 callersMethodwith_mocked_typeshed
Use a mock typeshed directory for this test case
crates/ty_module_resolver/src/testing.rs:202
↓ 28 callersMethodalways
(&self)
crates/ty_python_semantic/src/types/relation.rs:1810
↓ 28 callersMethodas_attribute_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2569
↓ 28 callersMethodas_class_literal
(self)
crates/ty_python_semantic/src/types.rs:3078
↓ 28 callersMethodas_single
Returns `(left, operator, right)` if there is exactly one operator and two operands.
crates/ruff_python_ast/src/nodes.rs:148
↓ 28 callersMethodas_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:91
↓ 28 callersMethodas_system_path
(&self)
crates/ty_module_resolver/src/path.rs:826
↓ 28 callersMethodbindings
(&self)
crates/ty_python_semantic/src/types/infer.rs:385
↓ 28 callersMethodenter_node
(&mut self, _node: AnyNodeRef<'a>)
crates/ruff_python_ast/src/visitor/source_order.rs:15
↓ 28 callersFunctionexit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:5
↓ 28 callersMethodextend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:497
← previousnext →501–600 of 31,562, ranked by callers