MCPcopy Create free account

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

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

↓ 44 callersMethodis_always_satisfied
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, inferable: TypeVarSet<
crates/ty_python_semantic/src/types/constraints.rs:615
↓ 44 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:990
↓ 44 callersMethodprogram_file
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:932
↓ 43 callersMethodget
(self, key: str)
crates/ruff_linter/resources/test/fixtures/flake8_return/RET501.py:8
↓ 43 callersMethodis_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:231
↓ 43 callersMethodmaterialization_kind
Returns the pending materialization of a class-based protocol, if any.
crates/ty_python_semantic/src/types/instance.rs:1817
↓ 43 callersMethodpath
(&self)
crates/ruff/src/commands/format.rs:860
↓ 43 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:580
↓ 42 callersMethodadd
Add a file with the given path and contents to this environment.
crates/ruff_db/src/diagnostic/render.rs:2612
↓ 42 callersMethodas_ref
(&self)
crates/ty_site_packages/src/lib.rs:490
↓ 42 callersMethodas_static
Returns the static class definition if this is one.
crates/ty_python_semantic/src/types/class.rs:950
↓ 42 callersMethodcontains_range
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:204
↓ 42 callersMethodcurrent_statement
Return the current [`Stmt`].
crates/ruff_python_semantic/src/model.rs:1490
↓ 42 callersMethodexact_tuple_instance_spec
If this type is an *exact* tuple type (*not* a subclass of `tuple`), returns the tuple spec. You usually don't want to use this method, as you usuall
crates/ty_python_semantic/src/types.rs:3026
↓ 42 callersMethodextend
(&mut self, iter: T)
crates/ruff_linter/src/registry/rule_set.rs:322
↓ 42 callersMethodf
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:121
↓ 42 callersFunctionglobal_scope
(db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/lib.rs:231
↓ 42 callersMethodmap
(self, provenance: ConstraintProvenance, bound: Type<'db>)
crates/ty_python_semantic/src/types/constraints/variables.rs:864
↓ 42 callersMethodname
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:177
↓ 42 callersFunctionparse
( short_title: &'s str, source: &'s str, )
crates/ty_test/src/lib.rs:612
↓ 42 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:274
↓ 42 callersMethodwrite_file
(&self, path: impl AsRef<Path>, content: &str)
crates/ty/tests/common/mod.rs:113
↓ 42 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
↓ 41 callersMethodfield
Returns the field declared directly on this dynamic named tuple, if any.
crates/ty_python_semantic/src/types/class/named_tuple.rs:481
↓ 41 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
↓ 41 callersMethodinner
( builder: &mut TypeInferenceBuilder<'db, '_>, subscript: &ast::ExprSubscript,
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2446
↓ 41 callersMethodis_class
(self)
crates/ty_python_core/src/scope.rs:265
↓ 41 callersMethodto_scope_id
(self, db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/scope.rs:112
↓ 40 callersMethodat
Returns `true` if the current token is of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:668
↓ 40 callersFunctionbind_docstring_snapshot_filters
()
crates/ty_ide/src/docstring.rs:145
↓ 40 callersMethodbuild
Return the built diagnostic.
crates/ruff_db/src/diagnostic/render.rs:2797
↓ 40 callersMethodeat
Consume the current token if it is of the given kind. Returns `true` if it matches, `false` otherwise.
crates/ruff_python_parser/src/parser/mod.rs:608
↓ 40 callersMethodformat
(&self, contents: &str)
crates/ruff_wasm/src/lib.rs:483
↓ 40 callersMethodsaturating_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:113
↓ 40 callersMethodtypes
Returns the typevars and stored bound types still reachable from the decision diagram. Source ordering can retain constraints that are no longer in t
crates/ty_python_semantic/src/types/constraints.rs:341
↓ 40 callersFunctionwrite
( output: &mut dyn Buffer<Context = Context>, args: Arguments<Context>, )
crates/ruff_formatter/src/lib.rs:858
↓ 39 callersMethodcontains
(&self, file: File)
crates/ty_project/src/files.rs:203
↓ 39 callersMethodcontains
(&self, kind: TokenKind)
crates/ruff_python_parser/src/token_set.rs:28
↓ 39 callersMethodinto_iter
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:92
↓ 39 callersMethoditer
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 39 callersMethoditer
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3772
↓ 39 callersMethodmodule_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:11761
↓ 39 callersMethodpath
(&self)
crates/ty_wasm/src/lib.rs:864
↓ 39 callersMethodroot
(&self)
crates/ty/tests/common/mod.rs:145
↓ 39 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:1470
↓ 39 callersMethodvisit_source_order
(&'a self, visitor: &mut V)
crates/ruff_python_ast/src/node.rs:9
↓ 38 callersMethodadd_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:807
↓ 38 callersMethodbuild
(&self)
crates/ty_ide/src/symbols.rs:3347
↓ 38 callersMethodchecked_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:106
↓ 38 callersFunctionempty
()
crates/ty_ide/src/completion.rs:3511
↓ 38 callersMethodenable_pull_diagnostics
Enable or disable pull diagnostics capability
crates/ty_server/tests/e2e/main.rs:1424
↓ 38 callersMethodexists
Returns `true` if the file exists.
crates/ruff_db/src/files.rs:562
↓ 38 callersMethodexpect_type
(self)
crates/ty_python_semantic/src/place.rs:311
↓ 38 callersMethodfind
(&self, node: &N)
crates/ty_python_core/src/interned_nodes.rs:53
↓ 38 callersFunctionformat_with
Creates an object implementing `Format` that calls the passed closure to perform the formatting. # Examples ``` use ruff_formatter::prelude::*; use
crates/ruff_formatter/src/builders.rs:2323
↓ 38 callersMethodis_name_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2651
↓ 38 callersMethodis_none_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2466
↓ 38 callersMethodknown
Returns the known class, if any.
crates/ty_python_semantic/src/types/class.rs:686
↓ 38 callersFunctionlex_inline_noqa
Lexes in-line `noqa` comment, e.g. `# noqa: F401`
crates/ruff_linter/src/noqa.rs:354
↓ 38 callersMethodopen
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:842
↓ 38 callersMethodopen
(self)
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:66
↓ 38 callersMethodrange
(&self)
crates/ruff_linter/src/rules/refurb/rules/repeated_append.rs:158
↓ 38 callersMethodsource
( &mut self, path: impl Into<SystemPathBuf>, contents: impl AsRef<str>,
crates/ty_ide/src/symbols.rs:3380
↓ 38 callersFunctiontest_snippet
Run [`check_path`] on a snippet of Python code.
crates/ruff_linter/src/test.rs:216
↓ 38 callersMethodwrite_files
( &self, files: impl IntoIterator<Item = (&'a str, &'a str)>, )
crates/ty/tests/common/mod.rs:82
↓ 38 callersMethodwrite_str
(&mut self, val: &str)
crates/ty_python_semantic/src/types/display.rs:438
↓ 37 callersMethodas_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2347
↓ 37 callersFunctiondefault
()
crates/ruff_db/src/diagnostic/render/grouped.rs:264
↓ 37 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:2662
↓ 37 callersFunctionimport
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:42
↓ 37 callersMethodinto_iter
(self)
crates/ty_server/src/session.rs:1838
↓ 37 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/context.rs:224
↓ 37 callersMethodto
(self, unit: str)
crates/ruff_benchmark/resources/pydantic/types.py:740
↓ 37 callersFunctiontype
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB168.py:84
↓ 37 callersMethodwith_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:138
↓ 37 callersMethodwrite_file
(&mut self, path: &'static str, source: &'static str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:4333
↓ 36 callersMethodarg
Adds an argument to the command.
crates/ruff_db/src/system/command.rs:27
↓ 36 callersMethodclass_origin
Return the class that defines this protocol, if it is class-backed.
crates/ty_python_semantic/src/types/instance.rs:1808
↓ 36 callersFunctionf
()
crates/ty_python_semantic/resources/corpus/10_if_false.py:22
↓ 36 callersMethodid
(&self)
crates/ty_python_semantic/src/suppression.rs:538
↓ 36 callersMethoditems
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typed_dict.rs:537
↓ 36 callersMethodnever
(&self)
crates/ty_python_semantic/src/types/relation.rs:1863
↓ 36 callersFunctionsorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 36 callersMethodsystem_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:299
↓ 36 callersMethodtry_upcast_to_callable
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/callable.rs:176
↓ 35 callersFunctionany_over_expr
Call `func` over every `Expr` in `expr`, returning `true` if any expression returns `true`..
crates/ruff_python_ast/src/helpers.rs:257
↓ 35 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:407
↓ 35 callersFunctionglobal_symbol
(db: &'db TestDb, file: File, name: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:33
↓ 35 callersFunctioninfer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:267
↓ 35 callersMethodis_empty
(&self)
crates/ty_site_packages/src/lib.rs:93
↓ 35 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:938
↓ 35 callersFunctionlex_file_exemption
Lexes file-level exemption comment, e.g. `# ruff: noqa: F401`
crates/ruff_linter/src/noqa.rs:387
↓ 35 callersMethodmetadata
Executes `uv workspace metadata` and parses and validates its output.
crates/ty_project/src/uv/command.rs:34
↓ 35 callersMethodpath
(&self)
crates/ty_project/src/uv/service.rs:169
↓ 35 callersMethodresolver_environment
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/context.rs:112
↓ 35 callersMethodtokens
Returns the token stream for `path` serialized as a string.
crates/ty_wasm/src/lib.rs:303
↓ 34 callersMethodadd_positive
(mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1706
↓ 34 callersMethodentry
(&mut self, item: &dyn Display)
crates/ruff_db/src/display.rs:26
↓ 34 callersMethodgeneric_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:379
↓ 34 callersMethodget
( &self, expression: ExpressionNodeKey, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:12976
← previousnext →401–500 of 31,766, ranked by callers