MCPcopy Create free account

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

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

↓ 8 callersMethodis_local
Is the symbol defined in this scope, vs referring to some enclosing scope? There are three common cases where a name refers to an enclosing scope: 1
crates/ty_python_core/src/symbol.rs:117
↓ 8 callersFunctionis_logger_candidate
Return `true` if the given `Expr` is a potential logging call. Matches `logging.error`, `logger.error`, `self.logger.error`, etc., but not arbitrary `
crates/ruff_python_semantic/src/analyze/logging.rs:19
↓ 8 callersMethodis_method
(&self)
crates/ty_python_semantic/src/types/protocol_class.rs:966
↓ 8 callersMethodis_parenthesized
(self)
crates/ruff_python_formatter/src/pattern/pattern_match_sequence.rs:151
↓ 8 callersFunctionis_pathlib_path_call
(checker: &Checker, expr: &Expr)
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:15
↓ 8 callersMethodis_preview
Returns `true` if preview mode is enabled.
crates/ruff_python_formatter/src/context.rs:126
↓ 8 callersMethodis_read_only
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:177
↓ 8 callersMethodis_subclass_of
Return `true` if `other` is present in this class's MRO.
crates/ty_python_semantic/src/types/class.rs:1361
↓ 8 callersMethodis_subscript_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2577
↓ 8 callersMethodis_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2725
↓ 8 callersMethodis_unclosed
(self)
crates/ruff_python_ast/src/nodes.rs:1147
↓ 8 callersMethoditems
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/typed_dict.rs:912
↓ 8 callersMethoditerate
Returns a tuple spec describing the elements that are produced when iterating over `self`. This method should only be used outside of type checking b
crates/ty_python_semantic/src/types/iteration.rs:73
↓ 8 callersMethodjoin_root_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:303
↓ 8 callersMethodjoinpath
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:222
↓ 8 callersMethodline_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:196
↓ 8 callersMethodload
Load the current value of the `AtomicNodeIndex`.
crates/ruff_python_ast/src/node_index.rs:169
↓ 8 callersMethodlocation
(&self)
crates/ruff_python_parser/src/error.rs:374
↓ 8 callersMethodlookup_attribute
Lookup a qualified attribute in the current scope. For example, given `["Class", "method"`], resolve the `BindingKind::ClassDefinition` associated wi
crates/ruff_python_semantic/src/model.rs:1059
↓ 8 callersFunctionmatch_statement
(statement_text: &str)
crates/ruff_linter/src/cst/matchers.rs:18
↓ 8 callersFunctionmock_typeshed
()
crates/ruff_db/src/vendored.rs:518
↓ 8 callersMethodmro
Iterate over the MRO of this base
crates/ty_python_semantic/src/types/class_base.rs:439
↓ 8 callersMethodname
(&self)
crates/ruff_python_ast/src/nodes.rs:2819
↓ 8 callersMethodnext
(&mut self)
crates/ruff_linter/src/registry/rule_set.rs:359
↓ 8 callersMethodnext_back
(&mut self)
crates/ruff_python_ast/src/nodes.rs:258
↓ 8 callersFunctionnotebook_path
Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory.
crates/ruff_linter/src/linter.rs:820
↓ 8 callersMethodoffset
(self)
crates/ty_python_core/src/member.rs:682
↓ 8 callersMethodopen_file
(&mut self, path: &str, contents: &str)
crates/ty_wasm/src/lib.rs:189
↓ 8 callersMethodown_class_member
Returns the inferred type of the class member named `name`. Only bound members or those marked as `ClassVars` are considered. You must provide the `i
crates/ty_python_semantic/src/types/class.rs:1641
↓ 8 callersFunctionparenthesize_if_expands
Adds parentheses and indents `content` if it doesn't fit on a line.
crates/ruff_python_formatter/src/builders.rs:9
↓ 8 callersMethodparse
Consumes the [`Parser`] and returns the parsed [`Parsed`].
crates/ruff_python_parser/src/parser/mod.rs:135
↓ 8 callersMethodparse_conditional_expression_or_higher_impl
( &mut self, context: ExpressionContext, )
crates/ruff_python_parser/src/parser/expression.rs:209
↓ 8 callersMethodprepare
(&self)
crates/ty_ide/src/type_hierarchy.rs:711
↓ 8 callersMethodpreview
Whether to enable preview behavior or not.
crates/ruff_db/src/diagnostic/mod.rs:1516
↓ 8 callersFunctionproject_files_in_path
Find all project files in a set of paths, following configured include/exclude settings.
crates/ruff_workspace/src/resolver.rs:434
↓ 8 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:2073
↓ 8 callersMethodpush_dangling
Pushes a *dangling* part for `key`
crates/ruff_python_formatter/src/comments/map.rs:109
↓ 8 callersMethodrange
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:184
↓ 8 callersMethodrange
(&self)
crates/ruff_python_ast/src/nodes.rs:165
↓ 8 callersMethodreachability_cache
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:406
↓ 8 callersFunctionremove_unused_imports
Generate a `Fix` to remove the specified imports from an `import` statement.
crates/ruff_linter/src/fix/edits.rs:112
↓ 8 callersMethodreport_recursion_limit_exceeded
(&mut self, ranged: R)
crates/ruff_python_parser/src/parser/mod.rs:124
↓ 8 callersFunctionresolve_assignment
Return the [`QualifiedName`] of the value to which the given [`Expr`] is assigned, if any. For example, given: ```python import asyncio loop = async
crates/ruff_python_semantic/src/analyze/typing.rs:1168
↓ 8 callersFunctionrun_single_threaded
(bencher: Bencher, benchmark: &Benchmark)
crates/ruff_benchmark/benches/ty_walltime.rs:234
↓ 8 callersMethodset_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:343
↓ 8 callersMethodsource
(&self)
crates/ty_project/src/metadata/value.rs:57
↓ 8 callersMethodspans
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:697
↓ 8 callersMethodspecialize
Creates a specialization of this generic context. Panics if the length of `types` does not match the number of typevars in the generic context. You m
crates/ty_python_semantic/src/types/generics.rs:929
↓ 8 callersMethodstart_token
(&mut self)
crates/ruff_python_trivia/src/cursor.rs:72
↓ 8 callersMethodsupertypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:715
↓ 8 callersMethodsymbol_mut
(&mut self, id: ScopedSymbolId)
crates/ty_python_core/src/place.rs:309
↓ 8 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_python_semantic/src/db.rs:82
↓ 8 callersMethodto_format_options
( &self, source_type: PySourceType, source: &str, path: Option<&Path>, )
crates/ruff_workspace/src/settings.rs:204
↓ 8 callersMethodto_meta_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:6160
↓ 8 callersMethodtoken
Creates a new token that uses this source.
crates/ruff_db/src/cancellation.rs:29
↓ 8 callersMethodtokens
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:30
↓ 8 callersMethodtry_call_dunder_with_policy
Same as `try_call_dunder`, but allows specifying a policy for the member lookup. In particular, this allows to specify `MemberLookupPolicy::MRO_NO_OBJ
crates/ty_python_semantic/src/types.rs:5474
↓ 8 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_linter/src/checkers/ast/mod.rs:2389
↓ 8 callersMethodvisit_body
(&mut self, body: &[Stmt])
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:134
↓ 8 callersFunctionwalk_pattern
(visitor: &mut V, pattern: &'a Pattern)
crates/ruff_python_ast/src/visitor.rs:763
↓ 8 callersMethodwhen_constraint_set_assignable_to_owned
Returns an _owned_ (i.e. salsa-cached) constraint set that describes when `self` is constraint-set assignable to `target`.
crates/ty_python_semantic/src/types/relation.rs:456
↓ 8 callersMethodwith_auto_import
(mut self, enabled: bool)
crates/ty_server/src/session/options.rs:123
↓ 8 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ty_server/src/server/api.rs:559
↓ 8 callersMethodwith_optional_range
Returns a new `Span` with the given optional `range` attached to it.
crates/ruff_db/src/diagnostic/mod.rs:1263
↓ 8 callersMethodwith_range
Returns a new `Span` with the given `range` attached to it.
crates/ruff_db/src/diagnostic/mod.rs:1258
↓ 8 callersMethodwith_recursion
(&mut self, f: impl FnOnce(&mut Self) -> T)
crates/ruff_python_parser/src/parser/mod.rs:111
↓ 8 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:969
↓ 8 callersMethodwrite
(&self, formatter: &mut impl std::fmt::Write)
crates/ruff_python_literal/src/escape.rs:80
↓ 7 callersMethodall_rules
Return all matching rules, regardless of rule group filters like preview and deprecated.
crates/ruff_linter/src/rule_selector.rs:255
↓ 7 callersFunctionapply_fixes
Apply a series of fixes.
crates/ruff_linter/src/fix/mod.rs:54
↓ 7 callersMethodapply_options
Combine the project options with the CLI options where the CLI options take precedence.
crates/ty_project/src/metadata.rs:316
↓ 7 callersMethodas_any_string_flags
(self)
crates/ruff_python_ast/src/nodes.rs:855
↓ 7 callersMethodas_assign_stmt
(&self)
crates/ruff_python_ast/src/generated.rs:584
↓ 7 callersMethodas_enum_literal
(self)
crates/ty_python_semantic/src/types.rs:1749
↓ 7 callersMethodas_fixed_length
Returns the inner fixed-length tuple if this is a `Tuple::Fixed` variant.
crates/ty_python_semantic/src/types/tuple.rs:1955
↓ 7 callersMethodas_int
(self)
crates/ty_python_semantic/src/types/literal.rs:218
↓ 7 callersMethodas_int_literal
(self)
crates/ty_python_semantic/src/types.rs:1734
↓ 7 callersMethodas_paramspec_with_prefix
Returns the prefix parameters and bound `ParamSpec` if this parameter list is either `P` or `Concatenate[<prefix-params>, P]`. For the narrower bare-
crates/ty_python_semantic/src/types/signatures.rs:3500
↓ 7 callersMethodas_single_part_string
Return `Some(literal)` if the string only consists of a single `StringLiteral` part (indicating that it is not implicitly concatenated). Otherwise, re
crates/ruff_python_ast/src/nodes.rs:1323
↓ 7 callersMethodas_slice
(&self)
crates/ruff_formatter/src/format_element.rs:371
↓ 7 callersMethodas_str
(&self)
crates/ruff_python_ast/src/name.rs:43
↓ 7 callersMethodas_str
(&self)
crates/mdtest/src/parser.rs:349
↓ 7 callersMethodas_utf8_path
(&self)
crates/ruff_db/src/system/path.rs:388
↓ 7 callersFunctionassert_eq_slice
( db: &dyn Db, input: &[char; N], start: Option<i32>, stop: Option<i32>,
crates/ty_python_semantic/src/subscript.rs:287
↓ 7 callersMethodat_offset
Searches the token(s) at `offset`. Returns [`TokenAt::Between`] if `offset` points directly inbetween two tokens (the left token ends at `offset` and
crates/ruff_python_ast/src/token/tokens.rs:92
↓ 7 callersMethodat_top_level
Return `true` if the model is at the top level of the module (i.e., in the module scope, and not nested within any statements).
crates/ruff_python_semantic/src/model.rs:1808
↓ 7 callersFunctionattribute_scopes
Returns all attribute assignments as scope IDs for a specific class body scope. Only call this when doing type inference on the same file as `class_b
crates/ty_python_core/src/lib.rs:171
↓ 7 callersFunctionbefore_main
()
crates/ty_wasm/src/lib.rs:44
↓ 7 callersMethodbinary_search
(&self, value: &T)
crates/ruff_index/src/slice.rs:121
↓ 7 callersMethodbool
Determine whether instances of this class are always truthy, always falsy, or have an ambiguous truthiness. Returns `None` for `KnownClass::Tuple`, s
crates/ty_python_semantic/src/types/class/known.rs:177
↓ 7 callersMethodbump_any
Bumps the current token regardless of its kind and advances to the next token. # Panics If the parser is at end of file.
crates/ruff_python_parser/src/parser/mod.rs:551
↓ 7 callersFunctioncallable
(x)
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B004.py:21
↓ 7 callersMethodcallable_type
(&self)
crates/ty_python_semantic/src/types/call/bind.rs:288
↓ 7 callersMethodcell_row
Returns the row number (1-based) in the cell (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:35
↓ 7 callersMethodcheck_types
Check types for this constructor method, and then decide (based on the resolved return types) whether we should continue considering downstream constr
crates/ty_python_semantic/src/types/call/bind/constructor.rs:81
↓ 7 callersMethodclear_salsa_events
Clears the salsa events. ## Panics If there are any pending salsa snapshots.
crates/ty_python_semantic/src/db.rs:92
↓ 7 callersMethodclient_capabilities
(&self)
crates/ty_server/src/session.rs:1314
↓ 7 callersMethodcode
(&self)
crates/ruff_benchmark/src/lib.rs:75
↓ 7 callersMethodcolumns
Returns the indentation's visual width in columns/spaces. For docstring indentation, black counts spaces as 1 and tabs by increasing the indentation
crates/ruff_python_formatter/src/string/docstring.rs:1716
↓ 7 callersFunctioncompute_replacement
(source: &str, modified: &str)
crates/ruff_server/src/edit/replacement.rs:70
← previousnext →1,501–1,600 of 27,349, ranked by callers