MCPcopy Create free account

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

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

↓ 10 callersMethodbottom_materialization
(&self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1454
↓ 10 callersMethodbump
Bumps the token source to the next non-trivia token. It pushes the given kind to the token vector with the current token range.
crates/ruff_python_parser/src/token_source.rs:162
↓ 10 callersMethodcanonicalize
(path: &SystemPath, system: &dyn System)
crates/ty_module_resolver/src/resolve.rs:603
↓ 10 callersMethodcmp
We sort diagnostics in a way that keeps them in source order and grouped by file. After that, we fall back to severity (with fatal messages sorting be
crates/ruff_db/src/diagnostic/mod.rs:560
↓ 10 callersMethodconstraints
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:232
↓ 10 callersMethodcurrent_place_table_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1076
↓ 10 callersMethodcurrent_statement_parent_id
Return the [`NodeId`] of the current [`Stmt`] parent, if any.
crates/ruff_python_semantic/src/model.rs:1524
↓ 10 callersMethoddefault_specialization
Returns the default specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we re
crates/ty_python_semantic/src/types/class/static_literal.rs:454
↓ 10 callersMethodend
(&self)
crates/ruff_source_file/src/newlines.rs:223
↓ 10 callersMethodevaluate
Evaluate a comparison recursively, treating `left` as the operand being constrained. For example, proving that every constraint of `EQUAL_VALUES` com
crates/ty_python_semantic/src/types/equality.rs:365
↓ 10 callersFunctionexception
()
crates/ruff_linter/resources/test/fixtures/flake8_return/RET504.py:175
↓ 10 callersMethodexplicit_bases
Return an iterator over the inferred types of this class's *explicit* bases. Note that any class (except for `object`) that has no explicit bases wil
crates/ty_python_semantic/src/types/class/static_literal.rs:489
↓ 10 callersMethodfallback_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/literal.rs:250
↓ 10 callersFunctionfile_time_now
()
crates/ruff_db/src/system.rs:343
↓ 10 callersMethodfile_uri
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:675
↓ 10 callersMethodfind_argument
Return the argument with the given name or at the given position, or `None` if no such argument exists. Used to retrieve arguments that can be provide
crates/ruff_python_ast/src/nodes.rs:3581
↓ 10 callersMethodfirst
(&self)
crates/ruff_linter/src/suppression.rs:186
↓ 10 callersMethodfix_applicability
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1568
↓ 10 callersMethodfocus_range
(&self)
crates/ty_ide/src/lib.rs:146
↓ 10 callersFunctionfun
(n)
crates/ty_python_semantic/resources/corpus/55_list_comp_nested.py:1
↓ 10 callersMethodget
Returns the value as a primitive type.
crates/ruff_source_file/src/line_index.rs:599
↓ 10 callersFunctiongroup
(content: &impl Format<Context>)
crates/ruff_formatter/src/builders.rs:1401
↓ 10 callersMethodhas_trailing_own_line
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:330
↓ 10 callersMethodheader
(&mut self, original: &'a str, modified: &'a str)
crates/ruff_linter/src/source_kind.rs:297
↓ 10 callersMethodhide_snippet
Set whether or not the snippet on this annotation should be suppressed when rendering. Such annotations are only rendered with their file name and ra
crates/ruff_db/src/diagnostic/mod.rs:921
↓ 10 callersMethodimports
When set, include the import associated with the completion. Not enabled by default.
crates/ty_ide/src/completion.rs:10837
↓ 10 callersMethodin_type_definition
Return `true` if the model is in a type definition.
crates/ruff_python_semantic/src/model.rs:2112
↓ 10 callersMethodinfer_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:5341
↓ 10 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/suppression.rs:382
↓ 10 callersMethodinto_owned
(self, parsed: &ParsedModuleRef)
crates/ty_python_core/src/definition.rs:586
↓ 10 callersMethodinto_suite
Consumes the [`Parsed`] output and returns the module body as a [`Suite`].
crates/ruff_python_parser/src/lib.rs:533
↓ 10 callersFunctionis_abstract
Returns `true` if a function definition is an abstract method based on its decorators.
crates/ruff_python_semantic/src/analyze/visibility.rs:44
↓ 10 callersFunctionis_dunder
(id: &str)
crates/ruff_python_ast/src/helpers.rs:791
↓ 10 callersMethodis_empty
(&self)
crates/ty_project/src/metadata/options.rs:1145
↓ 10 callersMethodis_empty
(self)
crates/ty_module_resolver/src/resolve.rs:364
↓ 10 callersMethodis_empty
Returns `true` if there are no deferred nodes.
crates/ruff_linter/src/checkers/ast/deferred.rs:20
↓ 10 callersFunctionis_keyword_only_argument_non_default
(arguments: &Arguments, name: &str)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:9
↓ 10 callersMethodis_protocol
Return `true` if this class is a protocol class. In an ideal world, perhaps we wouldn't hardcode this knowledge here; instead, we'd just look at the
crates/ty_python_semantic/src/types/class/known.rs:637
↓ 10 callersMethodis_required
(&self)
crates/ty_python_semantic/src/types/typed_dict.rs:3010
↓ 10 callersFunctionis_type_checking_block
Return `true` if [`ast::StmtIf`] is a guard for a type-checking block.
crates/ruff_python_semantic/src/analyze/typing.rs:419
↓ 10 callersMethoditer_keys
Returns an `Iterator` over the AST nodes representing the dictionary's keys.
crates/ruff_python_ast/src/nodes.rs:176
↓ 10 callersMethoditer_mut
(&mut self)
crates/ruff_index/src/slice.rs:89
↓ 10 callersMethoditer_suffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:931
↓ 10 callersMethodkeys
(self)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM118.py:42
↓ 10 callersMethodkind
(&self)
crates/ruff_db/src/vendored.rs:308
↓ 10 callersMethodkind
The `kind` of the section, e.g. [`SectionKind::Args`] or [`SectionKind::Returns`].
crates/ruff_linter/src/docstrings/sections.rs:302
↓ 10 callersMethodlen
(&self)
crates/ruff_source_file/src/newlines.rs:326
↓ 10 callersMethodline_end
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:79
↓ 10 callersMethodmake_key
Retrieve the original key that describes this document query.
crates/ruff_server/src/session/index.rs:546
↓ 10 callersMethodmetaclass
Returns the metaclass of this class.
crates/ty_python_semantic/src/types/class.rs:557
↓ 10 callersMethodnegate_if
(&self, db: &'db dyn Db, yes: bool)
crates/ty_python_semantic/src/types.rs:1900
↓ 10 callersMethodnext
(&mut self)
crates/ruff_python_trivia/src/tokenizer.rs:801
↓ 10 callersMethodnext_back
(&mut self)
crates/ty_python_semantic/src/types/mro.rs:680
↓ 10 callersMethodnormalize_path
(&self, path: &'a SystemPath)
crates/ty_test/src/db.rs:352
↓ 10 callersMethodopposite
(self)
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:67
↓ 10 callersMethodor
Merge the provenance from two places.
crates/ty_python_semantic/src/place.rs:119
↓ 10 callersMethodparse_body
Parses the body of the given [`Clause`]. This could either be a single statement that's on the same line as the clause header or an indented block.
crates/ruff_python_parser/src/parser/statement.rs:3078
↓ 10 callersMethodparse_identifier
Parses an identifier. For an invalid identifier, the `id` field will be an empty string. See: <https://docs.python.org/3/reference/expressions.html#
crates/ruff_python_parser/src/parser/expression.rs:569
↓ 10 callersFunctionparse_unchecked_source
Like [`ruff_python_parser::parse_unchecked_source`], but with an explicit [`PythonVersion`] and per-cell notebook parsing. Per-cell modules are merge
crates/ruff_linter/src/linter.rs:776
↓ 10 callersMethodparser_version
Return the [`PythonVersion`] to use for parsing. This will be either the Python version specified by the user or the latest supported version if unse
crates/ruff_linter/src/settings/mod.rs:926
↓ 10 callersMethodparts
Returns an iterator over the [`StringLikePart`] contained in this string-like expression.
crates/ruff_python_ast/src/expression.rs:98
↓ 10 callersFunctionpending_place_state_mut
( place: ScopedPlaceId, symbol_states: &'a mut IndexVec<ScopedSymbolId, PendingPlaceState>, member
crates/ty_python_core/src/use_def.rs:1512
↓ 10 callersMethodpredicates
(&self)
crates/ty_python_core/src/use_def.rs:865
↓ 10 callersMethodpush_trailing
Pushes a *trailing* part for `key`.
crates/ruff_python_formatter/src/comments/map.rs:146
↓ 10 callersMethodqualifiers
Get qualifiers for an annotation expression.
crates/ty_python_semantic/src/types/infer.rs:860
↓ 10 callersMethodquote_style
(&self)
crates/ruff_linter/src/docstrings/mod.rs:49
↓ 10 callersMethodrange
The range from the clause keyword up to and including the final colon.
crates/ruff_python_formatter/src/statement/clause.rs:76
↓ 10 callersMethodrange
(&self)
crates/ruff_python_parser/src/semantic_errors.rs:1449
↓ 10 callersMethodresize
( &self, db: &'db dyn Db, new_length: TupleLength, )
crates/ty_python_semantic/src/types/tuple.rs:670
↓ 10 callersMethodset
Sets the indexed files of a package to `files`.
crates/ty_project/src/files.rs:144
↓ 10 callersFunctionset_expr_ctx
Set the `ctx` for `Expr::Id`, `Expr::Attribute`, `Expr::Subscript`, `Expr::Starred`, `Expr::Tuple` and `Expr::List`. If `expr` is either `Expr::Tuple`
crates/ruff_python_parser/src/parser/helpers.rs:10
↓ 10 callersMethodsource_code
Returns the Python source code for this source kind.
crates/ruff_linter/src/source_kind.rs:105
↓ 10 callersFunctionsource_text_slice
Emits a text as it is written in the source document. Optimized to avoid allocations.
crates/ruff_formatter/src/builders.rs:375
↓ 10 callersMethodspeculate_without_diagnostics
Returns a speculative builder that does not construct diagnostics.
crates/ty_python_semantic/src/types/infer/builder.rs:10628
↓ 10 callersFunctionstr
(x)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP029_3.py:2
↓ 10 callersMethodswap_remove
Remove `ty` from the collection. Returns `true` if `ty` was previously in the collection and has now been removed. Returns `false` if `ty` was never
crates/ty_python_semantic/src/types/set_theoretic.rs:577
↓ 10 callersMethodsystem
Looks up a file by its `path`. For a non-existing file, creates a new salsa [`File`] ingredient and stores it for future lookups. The operation alwa
crates/ruff_db/src/files.rs:110
↓ 10 callersMethodsystem
(path: impl AsRef<SystemPath>)
crates/ruff_db/src/files/path.rs:27
↓ 10 callersFunctiontest_helper
(source: &str, expected_num_branches: usize)
crates/ruff_linter/src/rules/pylint/rules/too_many_branches.rs:263
↓ 10 callersMethodto_meta_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:440
↓ 10 callersFunctiontyRangeToMonacoRange
(range: TyRange)
playground/ty/src/Editor/Editor.tsx:1041
↓ 10 callersMethodunparse_expr
(&mut self, ast: &Expr, level: u8)
crates/ruff_python_codegen/src/generator.rs:921
↓ 10 callersMethodup_to
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:58
↓ 10 callersMethodupdate
Update the notebook with the given sourcemap and transformed content.
crates/ruff_notebook/src/notebook.rs:422
↓ 10 callersMethodupper_bound
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:224
↓ 10 callersMethodvalue
(self)
crates/ruff_python_formatter/src/comments/map.rs:552
↓ 10 callersMethodvalues
()
crates/ruff_linter/src/registry.rs:397
↓ 10 callersMethodvisit
(&self, item: T, compute: impl FnOnce() -> R)
crates/ty_python_semantic/src/types/cyclic.rs:74
↓ 10 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:1672
↓ 10 callersMethodwarning
Set the output style for `warning`
crates/ruff_annotate_snippets/src/renderer/mod.rs:117
↓ 10 callersMethodwhen_any
( self, db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl F
crates/ty_python_semantic/src/types/constraints.rs:194
↓ 10 callersMethodwhen_true
(self)
crates/ty_python_semantic/src/types/constraints.rs:1698
↓ 10 callersMethodwith_dangling_comments
Inserts any dangling comments that should be placed immediately after the open parenthesis. For example: ```python [ # comment 1, 2, 3, ] ```
crates/ruff_python_formatter/src/expression/parentheses.rs:144
↓ 10 callersMethodwrite_source_file
(&self, path: &str, contents: &[u8])
crates/ruff/src/cache.rs:1043
↓ 9 callersMethodadd_definition
Add a [`Definition`] associated with the `definition_node` AST node. ## Panics This method panics if `debug_assertions` are enabled and the `definit
crates/ty_python_core/src/builder.rs:1479
↓ 9 callersMethodadd_or_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:269
↓ 9 callersMethodall_end_of_scope_symbol_declarations
( &'map self, )
crates/ty_python_core/src/use_def.rs:1139
↓ 9 callersMethodapply_type_mapping
( self, db: &'db dyn Db, type_mapping: &TypeMapping<'a, 'db>, tcx: TypeContext
crates/ty_python_semantic/src/types.rs:6342
↓ 9 callersMethodas_bytes
(self)
crates/ty_python_semantic/src/types/literal.rs:186
↓ 9 callersMethodas_ipy_notebook
(&self)
crates/ruff_linter/src/source_kind.rs:34
← previousnext →1,201–1,300 of 27,349, ranked by callers