MCPcopy Create free account

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

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

↓ 43 callersMethodis_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:231
↓ 43 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:991
↓ 43 callersMethodmaterialization_kind
Returns the pending materialization of a class-based protocol, if any.
crates/ty_python_semantic/src/types/instance.rs:1772
↓ 43 callersMethodnegate
Returns the negation of this constraint set.
crates/ty_python_semantic/src/types/constraints.rs:721
↓ 43 callersMethodpath
(&self)
crates/ruff/src/commands/format.rs:857
↓ 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
↓ 43 callersMethodwith_diagnostic_mode
(mut self, diagnostic_mode: DiagnosticMode)
crates/ty_server/src/session/options.rs:144
↓ 42 callersMethodadd
Add a file with the given path and contents to this environment.
crates/ruff_db/src/diagnostic/render.rs:2583
↓ 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:1475
↓ 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:3027
↓ 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 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:615
↓ 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 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:271
↓ 41 callersMethodto_scope_id
(self, db: &'db dyn Db, file: ProgramFile<'db>)
crates/ty_python_core/src/scope.rs:112
↓ 40 callersMethodas_ref
(&self)
crates/ty_site_packages/src/lib.rs:490
↓ 40 callersMethodas_static
Returns the static class definition if this is one.
crates/ty_python_semantic/src/types/class.rs:931
↓ 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:2768
↓ 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 callersMethodis_class
(self)
crates/ty_python_core/src/scope.rs:265
↓ 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:345
↓ 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 callersMethodfunction
(&'test self, name: &str)
crates/ty_python_semantic/src/types/dedicated/pytest/fixtures.rs:3453
↓ 39 callersMethodinto_iter
(self)
crates/ruff_linter/src/rules/pycodestyle/rules/logical_lines/mod.rs:92
↓ 39 callersMethoditer
(&mut self)
crates/ruff_linter/src/checkers/ast/mod.rs:3753
↓ 39 callersMethodmodule_names
When set, the module name for each symbol is included in the snapshot (if available).
crates/ty_ide/src/completion.rs:11683
↓ 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
↓ 39 callersFunctionwrite
( output: &mut dyn Buffer<Context = Context>, args: Arguments<Context>, )
crates/ruff_formatter/src/lib.rs:859
↓ 38 callersMethodadd_in_place
Adds a type to this union.
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:794
↓ 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 callersFunctiondefault
()
crates/ruff_db/src/diagnostic/render/grouped.rs:267
↓ 38 callersMethodenable_pull_diagnostics
Enable or disable pull diagnostics capability
crates/ty_server/tests/e2e/main.rs:1417
↓ 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:307
↓ 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 callersMethoditer
Iterates over the entries in the directory in name order.
crates/ruff_db/src/files/directory.rs:52
↓ 38 callersMethodknown
Returns the known class, if any.
crates/ty_python_semantic/src/types/class.rs:667
↓ 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:843
↓ 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 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 callersFunctionempty
()
crates/ty_ide/src/completion.rs:3501
↓ 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:2633
↓ 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:1810
↓ 37 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/context.rs:222
↓ 37 callersFunctiontype
(*args)
crates/ruff_linter/resources/test/fixtures/refurb/FURB168.py:84
↓ 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:536
↓ 36 callersMethodnever
(&self)
crates/ty_python_semantic/src/types/relation.rs:1814
↓ 36 callersMethodsystem_file
(&self, path: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:298
↓ 36 callersMethodto
(self, unit: str)
crates/ruff_benchmark/resources/pydantic/types.py:740
↓ 36 callersMethodtry_upcast_to_callable
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/callable.rs:176
↓ 35 callersMethodarg
Adds an argument to the command.
crates/ruff_db/src/system/command.rs:27
↓ 35 callersMethodclass_origin
Return the class that defines this protocol, if it is class-backed.
crates/ty_python_semantic/src/types/instance.rs:1763
↓ 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:406
↓ 35 callersFunctionglobal_symbol
(db: &'db TestDb, file: File, name: &str)
crates/ty_python_semantic/src/types/infer/tests.rs:33
↓ 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:937
↓ 35 callersFunctionlex_file_exemption
Lexes file-level exemption comment, e.g. `# ruff: noqa: F401`
crates/ruff_linter/src/noqa.rs:387
↓ 35 callersMethodpath
(&self)
crates/ty_project/src/uv/service.rs:169
↓ 35 callersFunctionsingle
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 35 callersFunctionsorted
()
crates/ruff_linter/resources/test/fixtures/refurb/FURB192.py:44
↓ 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:1666
↓ 34 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
↓ 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:380
↓ 34 callersMethodget
(&self, index: I)
crates/ruff_index/src/slice.rs:111
↓ 34 callersFunctioninfer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:268
↓ 34 callersMethodinto_iter
(self)
crates/ty_python_core/src/frozen.rs:121
↓ 34 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:3327
↓ 34 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
↓ 34 callersMethodplace
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:234
↓ 34 callersMethodprogram
(self, db: &dyn Db)
crates/ty_project/src/lib.rs:278
← previousnext →401–500 of 31,562, ranked by callers