MCPcopy Create free account

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

Functions29,290 in github.com/astral-sh/ruff

↓ 38 callersMethodsource
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/symbols.rs:3387
↓ 38 callersMethodstop_watch
(&mut self, matcher: M)
crates/ty/tests/file_watching.rs:69
↓ 38 callersMethodvisit_source_order
(&'a self, visitor: &mut V)
crates/ruff_python_ast/src/node.rs:9
↓ 38 callersMethodwrite_dedented
Writes auto-dedented text to a file.
crates/ruff_db/src/system/test.rs:248
↓ 37 callersMethodbuild
Return the built diagnostic.
crates/ruff_db/src/diagnostic/render.rs:2739
↓ 37 callersMethodcurrent_statement
Return the current [`Stmt`].
crates/ruff_python_semantic/src/model.rs:1474
↓ 37 callersMethodexists
Returns `true` if the file exists.
crates/ruff_db/src/files.rs:560
↓ 37 callersMethodfunction
(&'test self, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest.rs:3151
↓ 37 callersMethodget
Get the cached results for a single file at relative `path`. This uses `key` to determine if the results are still accurate. (i.e. if the file hasn't
crates/ruff/src/cache.rs:260
↓ 37 callersMethodinto_boxed_slice
(self)
crates/ty_python_core/src/definition.rs:290
↓ 37 callersMethodis_class
(self)
crates/ty_python_core/src/scope.rs:266
↓ 37 callersMethodmodule_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:11283
↓ 37 callersMethodpush
Extends `self` with `path`. If `path` is absolute, it replaces the current path. On Windows: if `path` has a root but no prefix (e.g., `\windows`),
crates/ruff_db/src/system/path.rs:566
↓ 37 callersMethodto_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1406
↓ 37 callersMethodtrim_start
Trims the indent of `rhs` by `self`. Returns `None` if `self` is not a prefix of `rhs` or either `self` or `rhs` use mixed indentation.
crates/ruff_python_formatter/src/string/docstring.rs:1749
↓ 36 callersMethodcreate_directory_all
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:106
↓ 36 callersMethoditems
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typed_dict.rs:505
↓ 36 callersMethodmap
(self, transform: impl FnOnce(T) -> U)
crates/ty_python_semantic/src/types.rs:1711
↓ 36 callersFunctiontype
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB168.py:84
↓ 36 callersMethodvariable
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1221
↓ 36 callersMethodwrite_file_all
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`. Enclosing directorie
crates/ruff_db/src/system/memory_fs.rs:229
↓ 36 callersMethodwrite_str
(&mut self, val: &str)
crates/ty_python_semantic/src/types/display.rs:390
↓ 35 callersMethodas_ref
(&self)
crates/ty_site_packages/src/lib.rs:450
↓ 35 callersMethodcheck_type_pair
Return a constraint set indicating the conditions under which `self.relation` holds between `source` and `target`.
crates/ty_python_semantic/src/types/relation.rs:1344
↓ 35 callersFunctionglobal_scope
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:228
↓ 35 callersFunctionimport
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:42
↓ 35 callersMethodis_always_satisfied
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/constraints.rs:530
↓ 35 callersMethodknown
Create a [`NamedTupleSpec`] with the given fields.
crates/ty_python_semantic/src/types/class/named_tuple.rs:580
↓ 35 callersFunctionlex_file_exemption
Lexes file-level exemption comment, e.g. `# ruff: noqa: F401`
crates/ruff_linter/src/noqa.rs:387
↓ 35 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_simplify/rules/collapsible_if.rs:189
↓ 35 callersMethodresolver_environment
(&self)
crates/ty_module_resolver/src/db.rs:73
↓ 35 callersFunctionsetup_micro_case
(code: &str)
crates/ruff_benchmark/benches/ty_shared/mod.rs:35
↓ 35 callersMethodto_scope_id
(self, db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/scope.rs:112
↓ 34 callersMethodas_static
Returns the static class definition if this is one.
crates/ty_python_semantic/src/types/class.rs:902
↓ 34 callersMethodcurrent_token_kind
(&self)
crates/ruff_python_parser/src/parser/mod.rs:418
↓ 34 callersMethodenable_pull_diagnostics
Enable or disable pull diagnostics capability
crates/ty_server/tests/e2e/main.rs:1300
↓ 34 callersMethoderr
A convenience function for returning a builder for a diagnostic with "error" severity and canned values for its identifier and message.
crates/ruff_db/src/diagnostic/render.rs:2667
↓ 34 callersMethodfile
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:788
↓ 34 callersMethodis_none_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2466
↓ 34 callersMethoditer
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 34 callersMethodor_default
(&self)
crates/ty_project/src/metadata/options.rs:2464
↓ 34 callersMethodpush
(&mut self, segment: &'a str)
crates/ruff_python_ast/src/name.rs:462
↓ 34 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:518
↓ 34 callersMethodto
(self, unit: str)
crates/ruff_benchmark/resources/pydantic/types.py:740
↓ 33 callersMethodas_str
(self)
crates/ruff_python_ast/src/str.rs:28
↓ 33 callersMethodas_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2347
↓ 33 callersMethoddefinition
Returns the definition where this `TypedDict` is created, if it was assigned to a variable.
crates/ty_python_semantic/src/types/class/typed_dict.rs:922
↓ 33 callersMethoddocument_diagnostic_request
Send a `textDocument/diagnostic` request for the document at the given path.
crates/ty_server/tests/e2e/main.rs:941
↓ 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:514
↓ 33 callersMethoditer_non_variadic_params
Returns an iterator over all non-variadic parameters included in this [`Parameters`] node. The variadic parameters (`.vararg` and `.kwarg`) can never
crates/ruff_python_ast/src/nodes.rs:3154
↓ 33 callersMethodmodule
The module for which the types are inferred.
crates/ty_python_semantic/src/types/context.rs:202
↓ 33 callersFunctionparse
( short_title: &'s str, source: &'s str, )
crates/ty_test/src/lib.rs:612
↓ 33 callersMethodset_concise_message
Set a custom message for the concise formatting of this diagnostic. This overrides the default behavior of generating a concise message from the head
crates/ruff_db/src/diagnostic/mod.rs:258
↓ 33 callersMethodwrite_file
(&self, path: impl AsRef<Path>, content: &str)
crates/ty/tests/cli/main.rs:949
↓ 33 callersMethodwrite_files
( &self, files: impl IntoIterator<Item = (&'a str, &'a str)>, )
crates/ty/tests/cli/main.rs:906
↓ 32 callersMethodas_ref
(&self)
crates/ruff_db/src/system/path.rs:641
↓ 32 callersFunctionempty
()
crates/ty_ide/src/completion.rs:3468
↓ 32 callersFunctionf
()
crates/ty_python_semantic/resources/corpus/10_if_false.py:22
↓ 32 callersMethodinsert
Adds a typevar to this support.
crates/ty_python_semantic/src/types/constraints/support.rs:30
↓ 32 callersMethodis_equivalent_to
Return true if this type is [equivalent to] type `other`. Two equivalent types represent the same sets of values. > Two gradual types `A` and `B` ar
crates/ty_python_semantic/src/types/relation.rs:749
↓ 32 callersMethodis_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2651
↓ 32 callersMethodis_traverse
(self)
crates/ruff_python_ast/src/visitor/source_order.rs:243
↓ 32 callersMethoditer_mro
Iterate over the [method resolution order] ("MRO") of the class. If the MRO could not be accurately resolved, this method falls back to iterating ove
crates/ty_python_semantic/src/types/class/static_literal.rs:842
↓ 32 callersMethodkeys
(&self)
crates/ty_python_core/src/frozen.rs:25
↓ 32 callersMethodline_ending
(&self)
crates/ruff_source_file/src/newlines.rs:241
↓ 32 callersMethodmember
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, name: &str, )
crates/ty_python_semantic/src/types.rs:4797
↓ 32 callersMethodnever
(&self)
crates/ty_python_semantic/src/types/relation.rs:1152
↓ 32 callersFunctionparse_expression
Parses a single Python expression. This convenience function can be used to parse a single expression without having to specify the Mode or the locat
crates/ruff_python_parser/src/lib.rs:135
↓ 32 callersMethodplace
(&self, place_id: impl Into<ScopedPlaceId>)
crates/ty_python_core/src/place.rs:262
↓ 32 callersMethodresolve_name
Resolves the [`ast::ExprName`] to the [`BindingId`] of the symbol it refers to, if any.
crates/ruff_python_semantic/src/model.rs:1132
↓ 32 callersFunctionsorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 32 callersFunctiontest_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:217
↓ 31 callersMethodclass_origin
Return the class that defines this protocol, if it is class-backed.
crates/ty_python_semantic/src/types/instance.rs:1255
↓ 31 callersMethodcount
(&self)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:579
↓ 31 callersFunctiondefinition_expression_type
Infer the type of a (possibly deferred) sub-expression of a [`Definition`]. Supports expressions that are evaluated within a type-params sub-scope.
crates/ty_python_semantic/src/types.rs:342
↓ 31 callersMethodinto_iter
(self)
crates/ty_server/src/session.rs:1609
↓ 31 callersMethodinto_iter
(self)
crates/ty_python_core/src/frozen.rs:93
↓ 31 callersFunctionline_index
(db: &dyn Db, file: File)
crates/ruff_db/src/source.rs:206
↓ 31 callersMethodmap
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/constraints.rs:1856
↓ 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:1138
↓ 31 callersMethodprogram
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:263
↓ 31 callersMethodpython_version
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:105
↓ 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:380
↓ 31 callersMethodsystem_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:243
↓ 31 callersMethodto_instance_approximation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:7416
↓ 31 callersMethoduniversal_newlines
(&self)
crates/ruff_source_file/src/newlines.rs:13
↓ 31 callersFunctionunknown_rule_selector_test
()
crates/ruff/tests/cli/lint.rs:762
↓ 31 callersMethodwith_diagnostic_mode
(mut self, diagnostic_mode: DiagnosticMode)
crates/ty_server/src/session/options.rs:128
↓ 30 callersFunctionassert_fail
(result: Result<Vec<Diagnostic>, FailuresByLine>, messages: &[(usize, &[&str])])
crates/mdtest/src/matcher.rs:598
↓ 30 callersMethodbuild
Build the test server
crates/ruff_server/tests/e2e/main.rs:1146
↓ 30 callersFunctionfilter_result_id
Redact result_id values since they are hash-based and non-deterministic
crates/ty_server/tests/e2e/pull_diagnostics.rs:831
↓ 30 callersMethodis_own_line
(self)
crates/ruff_python_trivia/src/comments.rs:97
↓ 30 callersMethodkind
(&self)
crates/ruff_python_ast/src/token.rs:43
↓ 30 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:908
↓ 30 callersMethodmembers
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:447
↓ 30 callersMethodpeek
Returns the next line without advancing the cursor.
crates/ty_ide/src/docstring/document/rst.rs:87
↓ 30 callersMethodrange
(&self)
crates/ruff_linter/src/rules/flake8_commas/rules/trailing_commas.rs:41
↓ 30 callersMethodsystem
(&self)
crates/ty_module_resolver/src/db.rs:105
↓ 30 callersMethodwith_mocked_typeshed
Use a mock typeshed directory for this test case
crates/ty_module_resolver/src/testing.rs:185
↓ 30 callersMethodwith_preview_mode
(mut self)
crates/ruff_linter/src/settings/mod.rs:868
← previousnext →401–500 of 29,290, ranked by callers