MCPcopy Create free account

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

Functions27,645 in github.com/astral-sh/ruff

↓ 14 callersMethodexists
Returns a new BDD that is the _existential abstraction_ of `self` for a set of typevars. The result will return true whenever `self` returns true for
crates/ty_python_semantic/src/types/constraints.rs:3037
↓ 14 callersMethodexpect_type
(self)
crates/ty_python_semantic/src/place.rs:294
↓ 14 callersMethodextend
Extend `self` with the components of `other` # Examples ``` use ty_module_resolver::ModuleName; let mut module_name = ModuleName::new_static("foo")
crates/ty_module_resolver/src/module_name.rs:280
↓ 14 callersMethodextension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 14 callersFunctionf
()
crates/ruff_linter/resources/test/fixtures/ruff/noqa.py:1
↓ 14 callersMethodfile_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:85
↓ 14 callersFunctionfind_goto_target
( model: &'a SemanticModel, parsed: &'a ParsedModuleRef, offset: TextSize, )
crates/ty_ide/src/goto.rs:1339
↓ 14 callersMethodfirst
Peeks the next character from the input stream without consuming it. Returns [`EOF_CHAR`] if the position is past the end of the file.
crates/ruff_python_parser/src/lexer/cursor.rs:42
↓ 14 callersMethodfirst_non_type_parent_scope
Returns the first parent of the given [`Scope`] that is not of [`ScopeKind::Type`] or [`ScopeKind::DunderClassCell`], if any.
crates/ruff_python_semantic/src/model.rs:1570
↓ 14 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/pylint/unreachable.py:13
↓ 14 callersMethodformat
(&self)
crates/ruff_python_formatter/src/expression/mod.rs:496
↓ 14 callersMethodformat
(&self, file_id: &FileHandle)
crates/ty_wasm/src/lib.rs:298
↓ 14 callersMethodget
(&self, document_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:387
↓ 14 callersMethodget_all
Like [`Scope::get`], but returns all bindings with the given name, including those that were shadowed by later bindings.
crates/ruff_python_semantic/src/scope.rs:109
↓ 14 callersMethodget_or_import_builtin_symbol
For a given builtin symbol, determine whether an [`Edit`] is necessary to make the symbol available in the current scope. For example, if `zip` has be
crates/ruff_linter/src/importer/mod.rs:302
↓ 14 callersFunctionhard_line_break
()
crates/ruff_formatter/src/builders.rs:101
↓ 14 callersMethodhas_trailing
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:321
↓ 14 callersMethodignore_conflicting_declarations
(self)
crates/ty_python_semantic/src/place.rs:751
↓ 14 callersFunctionimport_from
PT013
crates/ruff_linter/src/rules/flake8_pytest_style/rules/imports.rs:52
↓ 14 callersMethodin_range
Returns a slice of [`Token`] that are within the given `range`. The start and end offset of the given range should be either: 1. Token boundary 2. Ga
crates/ruff_python_ast/src/token/tokens.rs:82
↓ 14 callersMethodinto_iter
(self)
crates/ty_project/src/lib.rs:785
↓ 14 callersMethodinto_owned
(self)
crates/ruff_python_codegen/src/stylist.rs:37
↓ 14 callersMethodis_disjoint_from
Return true if `self & other` should simplify to `Never`: if the intersection of the two types could never be inhabited by any possible runtime value.
crates/ty_python_semantic/src/types/relation.rs:686
↓ 14 callersMethodis_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 14 callersMethodis_empty
(&self)
crates/ty_python_core/src/rank.rs:73
↓ 14 callersMethodis_file
(self)
crates/ty_project/src/watch.rs:162
↓ 14 callersMethodis_implicit_concatenated
Returns `true` if the f-string is implicitly concatenated, `false` otherwise.
crates/ruff_python_ast/src/nodes.rs:513
↓ 14 callersMethodis_raw
Return true if this prefix indicates a "raw f-string", e.g. `rf"{bar}"` or `Rf"{bar}"`
crates/ruff_python_ast/src/str_prefix.rs:83
↓ 14 callersMethoditer_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1082
↓ 14 callersMethodjoin_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:288
↓ 14 callersMethodkind
(&self)
crates/ty_python_core/src/scope.rs:147
↓ 14 callersMethodlocal_range
Returns the range within this document. Only use `range` when you already have a URI context and this range is guaranteed to be within the same docum
crates/ty_server/src/document/range.rs:33
↓ 14 callersMethodmap_type
(self, f: impl FnOnce(Type<'db>) -> Type<'db>)
crates/ty_python_semantic/src/types/member.rs:47
↓ 14 callersMethodmode
(self)
crates/ruff_formatter/src/printer/call_stack.rs:42
↓ 14 callersMethodname
Returns the base symbol name for this group. Callers must ensure that all symbols in this group have the same base name. This returns `None` if and
crates/ty_ide/src/all_symbols.rs:523
↓ 14 callersMethodor
(self, other: Self)
crates/ty_python_core/src/lib.rs:976
↓ 14 callersMethodor
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:431
↓ 14 callersMethodparse_comma_separated_list
Parses a comma separated list of elements where each element is parsed using the given `parse_element` function. The difference between this function
crates/ruff_python_parser/src/parser/mod.rs:763
↓ 14 callersMethodparse_expression_list
Parses every Python expression. Matches the `expressions` rule in the [Python grammar]. The [`ExpressionContext`] can be used to match the `star_expr
crates/ruff_python_parser/src/parser/expression.rs:152
↓ 14 callersMethodparse_named_expression_or_higher
Parses every Python expression except unparenthesized tuple. Matches the `named_expression` rule in the [Python grammar]. The [`ExpressionContext`] c
crates/ruff_python_parser/src/parser/expression.rs:179
↓ 14 callersMethodpath
(&'a self, resolver: &'a dyn FileResolver)
crates/ruff_db/src/diagnostic/mod.rs:1179
↓ 14 callersMethodpersist
Applies the pending changes and persists the cache to disk, if it has been changed.
crates/ruff/src/cache.rs:157
↓ 14 callersMethodprint
(&self)
crates/ruff_formatter/src/lib.rs:324
↓ 14 callersMethodpush
(&mut self, constraint: ConstraintAssignment)
crates/ty_python_semantic/src/types/constraints.rs:6977
↓ 14 callersMethodrender_diagnostics
(&self, diagnostics: I)
crates/ty_ide/src/lib.rs:445
↓ 14 callersFunctionresolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1839
↓ 14 callersMethodrest
Returns the remaining text to lex. Use [`Cursor::text_len`] to get the length of the remaining text.
crates/ruff_python_parser/src/lexer/cursor.rs:57
↓ 14 callersMethodroot_path
(&self)
crates/ty/tests/file_watching.rs:40
↓ 14 callersMethodsecondary_code
Returns the secondary code for the diagnostic if it exists. The "primary" code for the diagnostic is its lint name. Diagnostics in ty don't have seco
crates/ruff_db/src/diagnostic/mod.rs:418
↓ 14 callersMethodsettings
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:787
↓ 14 callersMethodsnapshot
(&self)
crates/ty_ide/src/completion.rs:10910
↓ 14 callersMethodstatus
(&self)
crates/ty_python_semantic/src/lint.rs:134
↓ 14 callersMethodtrim_whitespace_start
(&self)
crates/ruff_python_trivia/src/whitespace.rs:117
↓ 14 callersMethodtry_add_root
Adds a new root for `path` and returns the root. The root isn't added nor is the file root's kind updated if a root for `path` already exists.
crates/ruff_db/src/files.rs:240
↓ 14 callersMethodtry_to_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:1203
↓ 14 callersFunctionunbound
()
crates/ty_python_core/src/use_def/place_state.rs:645
↓ 14 callersFunctionwalk_body
(visitor: &mut V, body: &'a [Stmt])
crates/ruff_python_ast/src/visitor.rs:119
↓ 14 callersMethodwhen_all
( self, db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl F
crates/ty_python_semantic/src/types/constraints.rs:214
↓ 14 callersMethodworkspace_diagnostic_request
Send a `workspace/diagnostic` request with optional previous result IDs.
crates/ty_server/tests/e2e/main.rs:955
↓ 14 callersMethodwrite_file
Stores a new file in the file system. The operation overrides the content for an existing file with the same normalized `path`.
crates/ruff_db/src/system/memory_fs.rs:192
↓ 14 callersMethodwrite_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 14 callersMethodwrite_project_file
( &self, relative_path: impl AsRef<SystemPath>, content: &str, )
crates/ty/tests/file_watching.rs:304
↓ 13 callersMethodadd_declaration_with_binding
( &mut self, node: AnyNodeRef, definition: Definition<'db>, declared_and_infer
crates/ty_python_semantic/src/types/infer/builder.rs:1633
↓ 13 callersMethodannotation
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1452
↓ 13 callersMethodas_any_import
(&self)
crates/ruff_python_semantic/src/binding.rs:297
↓ 13 callersMethodas_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1223
↓ 13 callersFunctionassert_function_query_was_not_run
( db: &Db, query: Q, input: I, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:6
↓ 13 callersMethodassert_reverse_tokenization
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:15
↓ 13 callersMethodat_expr
Returns `true` if the current token is the start of an expression.
crates/ruff_python_parser/src/parser/expression.rs:137
↓ 13 callersMethodat_ts
Returns `true` if the current token is found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:662
↓ 13 callersMethodbefore
Returns a slice of tokens before the given [`TextSize`] offset. If the given offset is between two tokens, the returned slice will end just before th
crates/ruff_python_ast/src/token/tokens.rs:144
↓ 13 callersMethodbinding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:324
↓ 13 callersMethodbinding_ids
Returns the IDs of all bindings defined in this scope.
crates/ruff_python_semantic/src/scope.rs:98
↓ 13 callersMethodcontents
(&self)
crates/ruff_server/src/edit/text_document.rs:68
↓ 13 callersFunctioncreate_diagnostics
Create Ruff-style diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:2951
↓ 13 callersMethodcurrent_statement_parent
Return the parent [`Stmt`] of the current [`Stmt`], if any.
crates/ruff_python_semantic/src/model.rs:1481
↓ 13 callersMethoddb
(&self)
crates/ty/tests/file_watching.rs:44
↓ 13 callersMethoddefinitions
Gets the definitions for this goto target. The `alias_resolution` parameter controls whether import aliases (i.e. "x" in "from a import b as x") are
crates/ty_ide/src/goto.rs:555
↓ 13 callersMethodencoding
(&self)
crates/ruff_server/src/session.rs:192
↓ 13 callersFunctionerror
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT022.py:15
↓ 13 callersMethodexpression
The source text of the expression (e.g., `0x0` in `f"{0x0=}"`).
crates/ruff_python_ast/src/nodes.rs:459
↓ 13 callersMethodexpression
(&self, expression_key: impl Into<ExpressionNodeKey>)
crates/ty_python_core/src/lib.rs:650
↓ 13 callersMethodfile
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/ide_support.rs:1359
↓ 13 callersMethodfirst_declaration
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3029
↓ 13 callersMethodfix
Returns the fix for this diagnostic if it exists.
crates/ruff_db/src/diagnostic/mod.rs:341
↓ 13 callersFunctionfoo
(a, b)
crates/ruff_linter/resources/test/fixtures/ruff/RUF069.py:18
↓ 13 callersMethodget
(&self, key: DefinitionNodeKey)
crates/ty_python_core/src/lib.rs:270
↓ 13 callersMethodget
(&self, key: &K)
crates/ty_python_core/src/frozen.rs:66
↓ 13 callersMethodget_default
Returns the most appropriate type of this argument when there is no specific declared type.
crates/ty_python_semantic/src/types/call/arguments.rs:67
↓ 13 callersMethodhas_known_decorator
(self, db: &dyn Db, decorator: FunctionDecorators)
crates/ty_python_semantic/src/types/function.rs:332
↓ 13 callersMethodid
(&self)
crates/ruff_python_ast/src/nodes.rs:2510
↓ 13 callersMethodid
(&self)
crates/ty_wasm/src/lib.rs:924
↓ 13 callersMethodinferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_ide/src/goto.rs:448
↓ 13 callersFunctionintersection
( db: &'db TestDb, tys: impl IntoIterator<Item = Type<'db>>, )
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:628
↓ 13 callersMethodinto_uri
Converts the key back into its original URI.
crates/ruff_server/src/edit.rs:55
↓ 13 callersFunctioninto_vec
(assertions: InlineFileAssertions<'_>)
crates/mdtest/src/assertion.rs:564
↓ 13 callersMethodis_empty
(&self)
crates/ruff_linter/src/noqa.rs:333
↓ 13 callersMethodis_instance_of
Return `true` if `self` is a nominal instance of the given known class.
crates/ty_python_semantic/src/types/instance.rs:141
↓ 13 callersFunctionis_override
Returns `true` if a function definition is an `@override` (PEP 698).
crates/ruff_python_semantic/src/analyze/visibility.rs:37
↓ 13 callersMethodis_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:220
← previousnext →901–1,000 of 27,645, ranked by callers