MCPcopy Create free account

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

Functions28,602 in github.com/astral-sh/ruff

↓ 15 callersMethodgetFileHandleForModel
(model: editor.ITextModel)
playground/ty/src/Editor/Editor.tsx:521
↓ 15 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
↓ 15 callersMethodhomogeneous_element_type
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/tuple.rs:2404
↓ 15 callersMethodinfer_maybe_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6064
↓ 15 callersMethodinto_iter
(self)
crates/ty_project/src/lib.rs:784
↓ 15 callersMethodis_empty
(&self)
crates/ty_python_core/src/rank.rs:73
↓ 15 callersMethodis_file
(self)
crates/ty_project/src/watch.rs:162
↓ 15 callersMethoditer
(&self)
crates/mdtest/src/matcher.rs:34
↓ 15 callersMethoditer
(&self)
crates/ty_python_semantic/src/types/set_theoretic.rs:586
↓ 15 callersMethoditer_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1190
↓ 15 callersMethoditer_suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1153
↓ 15 callersMethodkind
(&self)
crates/ty_python_core/src/scope.rs:159
↓ 15 callersMethodkind
Return the display kind of the function-like node.
crates/ruff_linter/src/rules/refurb/rules/reimplemented_operator.rs:189
↓ 15 callersMethodlower
(cls, my_field: str)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N805.py:30
↓ 15 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:521
↓ 15 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/string/normalize.rs:787
↓ 15 callersMethodnode_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.rs:453
↓ 15 callersMethodor
(self, other: Self)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:455
↓ 15 callersFunctionplace_from_declarations
Build a declared type from a [`DeclarationsIterator`]. If there is only one declaration, or all declarations declare the same type, returns `Ok(..)`.
crates/ty_python_semantic/src/place.rs:824
↓ 15 callersMethodpredicates
(&self)
crates/ty_python_core/src/use_def.rs:872
↓ 15 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/db.rs:103
↓ 15 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:164
↓ 15 callersFunctionquit
(e)
crates/ruff_linter/resources/test/fixtures/pylint/sys_exit_alias_6.py:9
↓ 15 callersMethodreachability_constraints
(&self)
crates/ty_python_core/src/use_def.rs:868
↓ 15 callersMethodrecursively_defined
(mut self, val: RecursivelyDefined)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:659
↓ 15 callersMethodremaining_literal_union
Expand this complement to the union of enum literals that remain possible.
crates/ty_python_semantic/src/types/enums.rs:801
↓ 15 callersMethodrender_diagnostics
(&self, diagnostics: I)
crates/ty_ide/src/lib.rs:455
↓ 15 callersMethodresolver_file
Returns the resolver key for this file.
crates/ty_python_core/src/program_file.rs:85
↓ 15 callersMethodsearch_path
(&self)
crates/ty_module_resolver/src/path.rs:86
↓ 15 callersMethodsettings
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:812
↓ 15 callersMethodsource_type
(&self)
crates/ruff_python_formatter/src/options.rs:131
↓ 15 callersMethodtext_len
(&self)
crates/ruff_source_file/src/newlines.rs:333
↓ 15 callersMethodto_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:6904
↓ 15 callersMethodtokens
Returns the [`Tokens`] for the parsed type annotation if the checker is in a typing context or the parsed source code.
crates/ruff_linter/src/checkers/ast/mod.rs:480
↓ 15 callersFunctiontrace_source_order_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/source_order.rs:158
↓ 15 callersFunctiontrace_visitation
(source: &str)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:167
↓ 15 callersMethodtuple_instance_spec
If this type is an instance type where the class has a tuple spec, returns the tuple spec. I.e., for the type `tuple[int, str]`, this will return the
crates/ty_python_semantic/src/types.rs:1949
↓ 15 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_python_ast/src/visitor.rs:33
↓ 15 callersMethodvisit_expr
(&self, expr: &mut Expr)
crates/ruff_python_ast/src/visitor/transformer.rs:20
↓ 15 callersMethodwhen_all
( self, _db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl
crates/ty_python_semantic/src/types/constraints.rs:219
↓ 15 callersMethodwrite
Write the transformed source file to the given writer. For Jupyter notebooks, this will write out the notebook as JSON.
crates/ruff_linter/src/source_kind.rs:161
↓ 14 callersMethodadd
Adds a member to the table or updates the flags of an existing member if it already exists. Members are identified by their expression, which is hash
crates/ty_python_core/src/member.rs:622
↓ 14 callersFunctionany_qualified_base_class
Return `true` if any base class matches a [`QualifiedName`] predicate.
crates/ruff_python_semantic/src/analyze/class.rs:16
↓ 14 callersMethodas_slice
Returns a slice containing the remaining comments.
crates/ruff_python_formatter/src/verbatim.rs:568
↓ 14 callersMethodas_source_code
Returns this input as a `SourceCode` for convenient querying.
crates/ruff_db/src/diagnostic/mod.rs:1222
↓ 14 callersMethodas_str
(&self)
crates/ruff_source_file/src/newlines.rs:258
↓ 14 callersMethodas_str
(self)
crates/ruff_linter/src/docstrings/mod.rs:99
↓ 14 callersMethodas_symbol
Returns `Some` if the reference is a `Symbol`, otherwise `None`.
crates/ty_python_core/src/place.rs:112
↓ 14 callersMethodas_system_path
(&self)
crates/ty_module_resolver/src/path.rs:710
↓ 14 callersFunctionassert_include
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:360
↓ 14 callersMethodbinding
(&self)
crates/ty_python_core/src/use_def/place_state.rs:324
↓ 14 callersMethodchecked_add
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:100
↓ 14 callersMethodclass_specialization
If this type is a class instance or class-backed `TypedDict`, returns its specialization.
crates/ty_python_semantic/src/types.rs:1857
↓ 14 callersMethodcontent
Returns the source between the role's backtick delimiters. For `` :class:`Model <pkg.Model>` ``, this returns `Model <pkg.Model>`.
crates/ty_ide/src/docstring/document/syntax.rs:203
↓ 14 callersMethodcover
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:249
↓ 14 callersFunctioncovering_node
Returns the node with a minimal range that fully contains `range`. If `range` is empty and falls within a parser *synthesized* node generated during
crates/ruff_python_ast/src/find_node.rs:14
↓ 14 callersMethodcurrent_scopes
Returns an iterator over all scopes, starting from the current [`Scope`].
crates/ruff_python_semantic/src/model.rs:1549
↓ 14 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:614
↓ 14 callersMethodend_of_scope_symbol_declarations
( &'map self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1103
↓ 14 callersMethodexpect_place
(&self, place_expr: &PlaceExpr)
crates/ty_python_semantic/src/types/narrow.rs:3221
↓ 14 callersMethodextension
(&self)
crates/ruff_db/src/files/path.rs:96
↓ 14 callersFunctionf
()
crates/ruff_linter/resources/test/fixtures/ruff/noqa.py:1
↓ 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:306
↓ 14 callersMethodget
(&self, document_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:391
↓ 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:875
↓ 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 callersFunctionintersection
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, tys: impl IntoIterator<Item = Type<'db>>, )
crates/ty_python_semantic/src/types/property_tests/type_generation.rs:732
↓ 14 callersMethodinto_inner
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/infer.rs:605
↓ 14 callersMethodis_empty
(&self)
crates/ruff_python_semantic/src/cfg/graph.rs:138
↓ 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 callersMethodis_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:239
↓ 14 callersMethodjoin_project_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:299
↓ 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 callersMethodoverloads_and_implementation
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/function.rs:857
↓ 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:822
↓ 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 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 callersMethodprogram_environment
(&self)
crates/ty_project/src/db.rs:738
↓ 14 callersMethodprogram_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:526
↓ 14 callersMethodprovenance
(&self)
crates/ty_python_semantic/src/types/call.rs:426
↓ 14 callersFunctionresolve_rules
( selections: impl IntoIterator<Item = RuleSelection>, preview: Option<PreviewOptions>, )
crates/ruff_workspace/src/configuration.rs:1834
↓ 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:51
↓ 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:431
↓ 14 callersMethodsnapshot
(&self)
crates/ty_ide/src/completion.rs:11277
↓ 14 callersMethodsource_code
Return the notebook content. This is the concatenation of all Python code cells.
crates/ruff_notebook/src/notebook.rs:372
↓ 14 callersMethodstatus
(&self)
crates/ty_python_semantic/src/lint.rs:134
← previousnext →901–1,000 of 28,602, ranked by callers