MCPcopy Create free account

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

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

↓ 10 callersMethodfallback_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/literal.rs:251
↓ 10 callersMethodfile_uri
(&self, path: impl AsRef<Path>)
crates/ruff_server/tests/e2e/main.rs:660
↓ 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:3603
↓ 10 callersMethodfinish
( mut self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/call/bind.rs:5336
↓ 10 callersMethodfix_applicability
(&self)
crates/ruff_db/src/diagnostic/mod.rs:1572
↓ 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 callersMethodget_message
Returns the message attached to this annotation, if one exists.
crates/ruff_db/src/diagnostic/mod.rs:890
↓ 10 callersFunctiongroup
(content: &impl Format<Context>)
crates/ruff_formatter/src/builders.rs:1403
↓ 10 callersMethodhas_trailing_own_line
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:330
↓ 10 callersMethodhas_typevar
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:45
↓ 10 callersMethodheader
(&mut self, original: &'a str, modified: &'a str)
crates/ruff_linter/src/source_kind.rs:306
↓ 10 callersMethodheader_range
Returns the range of the class's "header". For static classes, this is the class name and any arguments passed to the `class` statement. For dynamic
crates/ty_python_semantic/src/types/class.rs:814
↓ 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 callersMethodin_type_definition
Return `true` if the model is in a type definition.
crates/ruff_python_semantic/src/model.rs:2112
↓ 10 callersFunctioninfer_complete_scope_types
Infer all types for a [`ScopeId`], including all definitions and expressions in that scope. Use when checking a scope, or needing to provide a type fo
crates/ty_python_semantic/src/types/infer.rs:322
↓ 10 callersMethodinfer_standalone_expression
( &mut self, expression: &ast::Expr, tcx: TypeContext<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:6234
↓ 10 callersMethodintersects
Return true if `self` and `other` contain at least one shared `definition`. A symbol can resolve to multiple definitions (for example, overload group
crates/ty_ide/src/goto.rs:451
↓ 10 callersMethodinto_protocol_class
Returns the protocol class if this is a protocol.
crates/ty_python_semantic/src/types/class.rs:965
↓ 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:777
↓ 10 callersMethodis_eager
(&self)
crates/ty_python_core/src/scope.rs:175
↓ 10 callersMethodis_empty
(&self)
crates/ty_project/src/metadata/options.rs:1133
↓ 10 callersMethodis_empty
(self)
crates/ty_module_resolver/src/resolve.rs:427
↓ 10 callersMethodis_empty
Returns `true` if there are no deferred nodes.
crates/ruff_linter/src/checkers/ast/deferred.rs:20
↓ 10 callersMethodis_function_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:503
↓ 10 callersFunctionis_human_readable_names_enabled
https://github.com/astral-sh/ruff/pull/25614 TODO(brent) Remove ecosystem selector normalization when stabilizing human-readable rule names: https://g
crates/ruff_linter/src/preview.rs:341
↓ 10 callersFunctionis_keyword_only_argument_non_default
(arguments: &Arguments, name: &str)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:9
↓ 10 callersMethodis_nonlocal
Is the symbol `nonlocal` its containing scope?
crates/ty_python_core/src/symbol.rs:85
↓ 10 callersMethodis_subtype_of_class_literal
Return `true` if this class is a subtype of (any specialization of) `class_literal`.
crates/ty_python_semantic/src/types/class.rs:1272
↓ 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:437
↓ 10 callersMethodis_type_var
(self)
crates/ty_python_semantic/src/types/typevar.rs:34
↓ 10 callersMethoditems
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/typed_dict.rs:962
↓ 10 callersMethoditer_enumerated
( &self, )
crates/ty_python_core/src/use_def.rs:723
↓ 10 callersMethoditer_keys
Returns an `Iterator` over the AST nodes representing the dictionary's keys.
crates/ruff_python_ast/src/nodes.rs:176
↓ 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:322
↓ 10 callersFunctionleading_indentation
Extract the leading indentation from a line.
crates/ruff_python_trivia/src/whitespace.rs:93
↓ 10 callersMethodlen
(&self)
crates/ruff_source_file/src/newlines.rs:326
↓ 10 callersMethodline_end
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:67
↓ 10 callersMethodmake_key
Retrieve the original key that describes this document query.
crates/ruff_server/src/session/index.rs:546
↓ 10 callersMethodmatches
(self, db: &'db dyn Db, other: Self)
crates/ty_python_semantic/src/types/infer/builder.rs:386
↓ 10 callersMethodmetaclass
Returns the metaclass of this class.
crates/ty_python_semantic/src/types/class.rs:652
↓ 10 callersMethodname
(&self)
crates/ty_project/src/metadata.rs:411
↓ 10 callersMethodnext
(&mut self)
crates/ty_project/src/lib.rs:802
↓ 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:706
↓ 10 callersMethodno_name
Do not show the [`Level`]s name Useful for: - Another layer of the application will include the level (e.g. when rendering errors) - [`Message`]s tha
crates/ruff_annotate_snippets/src/level.rs:211
↓ 10 callersMethodnormalize_path
(&self, path: &'a SystemPath)
crates/ty_test/src/db.rs:435
↓ 10 callersMethodopposite
(self)
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:67
↓ 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:3093
↓ 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:781
↓ 10 callersMethodparts
Returns an iterator over the [`StringLikePart`] contained in this string-like expression.
crates/ruff_python_ast/src/expression.rs:98
↓ 10 callersMethodpath
(&self, relative_path: &str)
crates/ruff_db/src/system/os/ignore.rs:58
↓ 10 callersFunctionpending_place_state_mut
( place: ScopedPlaceId, symbol_states: &'a mut IndexVec<ScopedSymbolId, PendingPlaceState>, member
crates/ty_python_core/src/use_def.rs:1638
↓ 10 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/semantic_model.rs:80
↓ 10 callersMethodpromote
Promote (possibly nested) literals to types that these literals are instances of. Note that this function tries to promote literals to a more user-fr
crates/ty_python_semantic/src/types.rs:2596
↓ 10 callersFunctionpublic_test
(code: &str)
crates/ty_ide/src/symbols.rs:3284
↓ 10 callersMethodpush_trailing
Pushes a *trailing* part for `key`.
crates/ruff_python_formatter/src/comments/map.rs:146
↓ 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 callersMethodset
Sets the indexed files of a package to `files`.
crates/ty_project/src/files.rs:148
↓ 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 callersMethodset_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:351
↓ 10 callersMethodsettings
Get the document settings associated with this query.
crates/ruff_server/src/session/index.rs:558
↓ 10 callersMethodshrink_to_fit
(&mut self)
crates/ruff_index/src/vec.rs:74
↓ 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
Returns a fresh [`TypeInferenceBuilder`] for the current scope that can be used to speculatively infer expressions during multi-inference. The infere
crates/ty_python_semantic/src/types/infer/builder.rs:11384
↓ 10 callersMethodspeculate_without_diagnostics
Returns a speculative builder that does not construct diagnostics. Note that this method may lead to lost diagnostics if the expression cache is enab
crates/ty_python_semantic/src/types/infer/builder.rs:11450
↓ 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:655
↓ 10 callersMethodsymbol_mut
(&mut self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:308
↓ 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:108
↓ 10 callersMethodsystem
(path: impl AsRef<SystemPath>)
crates/ruff_db/src/files/path.rs:27
↓ 10 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_python_semantic/src/db.rs:115
↓ 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, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types.rs:7349
↓ 10 callersFunctiontyRangeToMonacoRange
(range: TyRange)
playground/ty/src/Editor/Editor.tsx:1041
↓ 10 callersMethodunion
Return a new tuple-spec builder that reflects the union of this tuple and another tuple. For example, if `self` is a tuple-spec builder for `tuple[Li
crates/ty_python_semantic/src/types/tuple.rs:3001
↓ 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:47
↓ 10 callersMethodupdate
Update the notebook with the given sourcemap and transformed content.
crates/ruff_notebook/src/notebook.rs:421
↓ 10 callersMethodupper_bound
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:259
↓ 10 callersMethodvalue
(self)
crates/ruff_python_formatter/src/comments/map.rs:552
↓ 10 callersMethodvirtual_file_path
Get the path for the document selected by this query, ignoring whether the file exists on disk. Returns the URI's path if this is an unsaved (untitle
crates/ruff_server/src/session/index.rs:642
↓ 10 callersMethodvisit_expr
(&mut self, expr: &'a Expr)
crates/ruff_linter/src/checkers/ast/mod.rs:1672
↓ 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 callersMethodwith_python_version
(&mut self, version: PythonVersion)
crates/ty_python_semantic/src/types/ide_support/unreachable_code.rs:121
↓ 10 callersMethodwithout_paramspec_attr
Returns a new bound typevar instance without any `ParamSpec` attribute set. This method will also remove any upper bound that was set by `with_params
crates/ty_python_semantic/src/types/typevar.rs:1089
↓ 10 callersMethodwrite_source_file
(&self, path: &str, contents: &[u8])
crates/ruff/src/cache.rs:1042
↓ 9 callersMethodabsolute
Resolves the absolute path for `self` based on its origin.
crates/ty_project/src/metadata/value.rs:65
↓ 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:1494
↓ 9 callersMethodadd_or_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:269
↓ 9 callersMethodapply_type_mapping
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, type_mapping: &TypeMap
crates/ty_python_semantic/src/types.rs:7562
↓ 9 callersMethodas_path
(&self)
crates/ty_module_resolver/src/path.rs:695
↓ 9 callersMethodas_slice
(&self)
crates/ty_python_core/src/use_def/place_state.rs:178
← previousnext →1,301–1,400 of 28,707, ranked by callers