MCPcopy Create free account

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

Functions31,562 in github.com/astral-sh/ruff

↓ 2 callersMethodnegated_divergent
Negating a divergent marker preserves the marker and flips its materialization, if any.
crates/ty_python_semantic/src/types.rs:2526
↓ 2 callersMethodnegation_is_subtype_of_cached
Return whether the negation of this type is a subtype of `target`, reusing `negated_cache` for type shapes whose negation must still be materialized.
crates/ty_python_semantic/src/types.rs:11099
↓ 2 callersFunctionnested
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF050.py:21
↓ 2 callersFunctionnested
()
crates/ruff_linter/resources/test/fixtures/pylint/await_outside_async.py:5
↓ 2 callersMethodnested_string_quote_style
(&self)
crates/ruff_python_formatter/src/options.rs:155
↓ 2 callersFunctionnested_union_members
The members in which a bare type variable from the same union occurs inside another type. For example, in `T | list[T] | None` only `list[T]` has this
crates/ty_python_semantic/src/types/call/bind.rs:8289
↓ 2 callersMethodnew_node
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, storage: &mut Constrai
crates/ty_python_semantic/src/types/constraints/variables.rs:124
↓ 2 callersFunctionnewline_diagnostic
Possible diagnostic, with fix, for too many newlines in cell or source file
crates/ruff_linter/src/rules/pycodestyle/rules/too_many_newlines_at_end_of_file.rs:103
↓ 2 callersMethodnext
(&mut self)
crates/ty_module_resolver/src/resolve.rs:1170
↓ 2 callersMethodnext
(&mut self)
crates/ruff_unicode_names2_generator/src/util.rs:33
↓ 2 callersMethodnext
(&mut self)
crates/ruff_unicode_names2_generator/src/trie.rs:77
↓ 2 callersMethodnext
(&mut self)
crates/ruff_python_ast/src/identifier.rs:220
↓ 2 callersMethodnext
(&mut self)
crates/ty_python_core/src/use_def.rs:1561
↓ 2 callersMethodnext
(&mut self)
crates/mdtest/src/parser.rs:183
↓ 2 callersMethodnext
(&mut self)
crates/ty_python_semantic/src/types/mro.rs:706
↓ 2 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:147
↓ 2 callersMethodnext_non_trivia_token
Returns the next non-trivia token without adding it to the token vector.
crates/ruff_python_parser/src/token_source.rs:186
↓ 2 callersMethodnext_non_variadic
(&mut self)
crates/ruff_python_ast/src/nodes.rs:3574
↓ 2 callersMethodnext_siblings
(&self)
crates/ruff_python_ast/src/traversal.rs:73
↓ 2 callersMethodnext_source
Move to the next parameter in the `source` parameter iterator, [`None`] if the iterator is exhausted.
crates/ty_python_semantic/src/types/signatures.rs:3143
↓ 2 callersMethodnext_token
(&mut self)
crates/ruff_python_ast/src/identifier.rs:175
↓ 2 callersMethodno_instance_fallback
Only look up the attribute on the meta-type. If false - Look up the attribute on the meta-type, but fall back to attributes on the instance if the me
crates/ty_python_semantic/src/types.rs:1408
↓ 2 callersMethodnode
Returns the underlying node.
crates/ruff_python_formatter/src/comments/node_key.rs:22
↓ 2 callersMethodnode
Returns the covering node found.
crates/ruff_python_ast/src/find_node.rs:72
↓ 2 callersMethodnode_support_id
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1659
↓ 2 callersFunctionnominal_intersection_bound
Recognize a single nominal positive and nominal exclusions, without alias, type-variable, or enum-literal operands. These classes can still inherit sp
crates/ty_python_semantic/src/types/relation.rs:268
↓ 2 callersFunctionnon_alias_assignment
( db: &'db dyn Db, definition: Definition<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/legacy_type_alias.rs:174
↓ 2 callersFunctionnon_default_follows_default
Returns `true` if a type variable without a default follows a type variable with a default. In a PEP 695 type parameter list this is a syntax error:
crates/ruff_linter/src/rules/pyupgrade/rules/pep695/mod.rs:391
↓ 2 callersFunctionnon_lowercase_variable_in_function
N806
crates/ruff_linter/src/rules/pep8_naming/rules/non_lowercase_variable_in_function.rs:55
↓ 2 callersFunctionnon_object_protocol_member_count
( db: &'db dyn Db, interface: ProtocolInterface<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:3506
↓ 2 callersFunctionnon_recursive_protocol_interface
( db: &'db dyn Db, interface: ProtocolInterface<'db>, protocol: ProtocolClass<'db>, receiver_t
crates/ty_python_semantic/src/types/instance.rs:1405
↓ 2 callersMethodnonlocal
Given a `name` that has been declared `nonlocal`, return the [`ScopeId`] and [`BindingId`] to which it refers. Unlike `global` declarations, for whic
crates/ruff_python_semantic/src/model.rs:1788
↓ 2 callersFunctionnoop
Return a no-op edit for the given name.
crates/ruff_linter/src/rules/pylint/rules/unnecessary_dict_index_lookup.rs:162
↓ 2 callersFunctionnoop
Return a no-op edit for the given name.
crates/ruff_linter/src/rules/pylint/rules/unnecessary_list_index_lookup.rs:177
↓ 2 callersMethodnormal
(self)
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP008.py:35
↓ 2 callersFunctionnormalize_field_specifiers
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, field_specifiers: &[Type<'db>], div: Type<'d
crates/ty_python_semantic/src/types.rs:2055
↓ 2 callersFunctionnormalize_none_operand
Returns the runtime union operand for `value`, replacing `None` with the `NoneType` class.
crates/ty_python_semantic/src/types/union_type_instance.rs:73
↓ 2 callersFunctionnormalize_path
Convert any path to an absolute path (based on the current working directory).
crates/ruff_linter/src/fs.rs:30
↓ 2 callersFunctionnormalize_paths
Normalize paths in diagnostics to Unix paths before comparing them against the expected type. Doing otherwise means that it's hard to write cross-plat
crates/mdtest/src/matcher.rs:297
↓ 2 callersMethodnormalize_value
Returns the scalar payload type after applying the built-in mixin's constructor. Literal conversions are preserved precisely, unions are normalized e
crates/ty_python_semantic/src/types/enums.rs:66
↓ 2 callersFunctionnot_found
()
crates/ruff_db/src/system/os.rs:471
↓ 2 callersFunctionnot_found
()
crates/ty_wasm/src/lib.rs:1720
↓ 2 callersFunctionnote_numbers_module_not_supported
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, diag: &mut Diagnostic, target_ty: Type<'db>,
crates/ty_python_semantic/src/types/diagnostic.rs:1821
↓ 2 callersMethodnotebook_or_file
Returns the salsa interned [`File`] for the document selected by this query. It returns [`None`] for the following cases: - For virtual file, if it's
crates/ty_server/src/session.rs:2003
↓ 2 callersFunctionnotebook_with_syntax_error
()
crates/ruff/tests/cli/format.rs:1973
↓ 2 callersMethodnotify_skipped_lazy_type_attributes
Notify the visitor that lazily-inferred type attributes were not visited.
crates/ty_python_semantic/src/types/visitor.rs:50
↓ 2 callersFunctionnum_digits
(n: usize)
crates/ruff/src/printer.rs:452
↓ 2 callersFunctionnum_overlap
( a_start: usize, a_end: usize, b_start: usize, b_end: usize, inclusive: bool, )
crates/ruff_annotate_snippets/src/renderer/render.rs:2420
↓ 2 callersFunctionnum_statements
(stmts: &[Stmt])
crates/ruff_linter/src/rules/pylint/helpers.rs:332
↓ 2 callersFunctiono
()
crates/ruff_linter/resources/test/fixtures/flake8_type_checking/TC001_future.py:64
↓ 2 callersFunctionobject_member_names
(db: &'db dyn Db, program: Program<'db>)
crates/ty_python_semantic/src/types/protocol_class.rs:3490
↓ 2 callersFunctionon_conditional_branch
Check if a node is part of a conditional branch.
crates/ruff_python_ast/src/helpers.rs:1284
↓ 2 callersMethodopen_all_files
(self)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:204
↓ 2 callersMethodopen_document_in_db
( &mut self, client: &Client, document: &OpenDocumentHandle, language_id: Opti
crates/ty_server/src/session.rs:1390
↓ 2 callersMethodopen_parentheses_count
Calculates the number of open parentheses for the current f-string based on the current level of nesting for the lexer.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:81
↓ 2 callersMethodopen_text_document
(&mut self, document: TextDocument)
crates/ty_server/src/session/index.rs:189
↓ 2 callersMethodopen_text_document_with_uri
(&mut self, uri: Uri, content: impl AsRef<str>, version: i32)
crates/ty_server/tests/e2e/main.rs:896
↓ 2 callersMethodoperand
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:240
↓ 2 callersMethodoperators
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:549
↓ 2 callersMethodoptional_definition
(&self, model: &SemanticModel<'db>)
crates/ty_python_semantic/src/semantic_model.rs:1166
↓ 2 callersFunctionoptional_value
(log: str, pattern: str, label: str)
scripts/collect_ty_ecosystem_run_metadata.py:83
↓ 2 callersMethodoptions
(&self)
crates/ruff_db/src/vendored.rs:506
↓ 2 callersMethodor
Combines two paths without copying one path into both outcomes of the other's predicate.
crates/ty_python_semantic/src/reachability.rs:1376
↓ 2 callersMethodor
(self, other: RecursivelyDefined)
crates/ty_python_semantic/src/types/set_theoretic.rs:1587
↓ 2 callersFunctionorganize_imports_edit
( query: &DocumentQuery, encoding: PositionEncoding, )
crates/ruff_server/src/server/api/requests/code_action_resolve.rs:143
↓ 2 callersMethodother_typevar
( self, db: &'db dyn Db, typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/constraints/variables.rs:1259
↓ 2 callersFunctionoutgoing_calls
Find the callees associated with the function, method, or class at `offset`. Calls in the item's body are reported as outgoing calls of that item. Ca
crates/ty_ide/src/call_hierarchy/outgoing_calls.rs:33
↓ 2 callersMethodoutput_format
(mut self, format: &'a str)
crates/ruff/tests/integration_test.rs:52
↓ 2 callersFunctionoutside_handlers
(offset: TextSize, semantic: &SemanticModel)
crates/ruff_linter/src/rules/flake8_logging/helpers.rs:5
↓ 2 callersMethodown_class_member
Returns the inferred type of the class member named `name`. Only bound members or those marked as `ClassVars` are considered. Returns [`Place::Undefi
crates/ty_python_semantic/src/types/class/static_literal.rs:1629
↓ 2 callersMethodown_fields_with_class_variables
( self, db: &'db dyn Db, specialization: Option<Specialization<'db>>, field_po
crates/ty_python_semantic/src/types/class/static_literal.rs:2751
↓ 2 callersFunctionown_member_definitions
Returns member definitions for `member_name` that are declared directly in `class`. ```py class Animal: def speak(self): ... class Dog(Animal): pass
crates/ty_python_semantic/src/types/ide_support.rs:594
↓ 2 callersFunctionown_model_config
(db: &dyn Db, class: StaticClassLiteral<'_>)
crates/ty_python_semantic/src/types/dedicated/pydantic.rs:783
↓ 2 callersMethodown_synthesized_member_with_kind
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, specialization: Option
crates/ty_python_semantic/src/types/class/static_literal.rs:1815
↓ 2 callersMethodowner_type
Returns the type representation of this owner.
crates/ty_python_semantic/src/types/bound_super.rs:359
↓ 2 callersMethodp_if
(&mut self, cond: bool, s: &str)
crates/ruff_python_codegen/src/generator.rs:228
↓ 2 callersFunctionpack
Packs a keyword in little-endian order at the high end of a word.
crates/ruff_python_parser/src/lexer/keywords.rs:51
↓ 2 callersFunctionpanic_message
( err: &'a Box<dyn std::any::Any + Send + 'static>, )
crates/ruff_server/src/server/api.rs:413
↓ 2 callersFunctionparameter_context_specialization
Combines the expected return type and the type arguments inferred so far into the context for the next argument-inference pass.
crates/ty_python_semantic/src/types/call/bind.rs:6017
↓ 2 callersFunctionparameter_documentation
Returns parameter documentation from recognized Google-style parameter sections. `normalized_source` must have already undergone PEP-257 trimming and
crates/ty_ide/src/docstring/document/google.rs:50
↓ 2 callersFunctionparametrize
(checker: &Checker, call: &ExprCall, qualified_name: &QualifiedName)
crates/ruff_linter/src/rules/flake8_pytest_style/rules/parametrize.rs:895
↓ 2 callersMethodparent
Returns the node's parent.
crates/ruff_python_ast/src/find_node.rs:80
↓ 2 callersMethodparent_expression_id
Given a [`NodeId`], return the [`NodeId`] of the parent expression, if any.
crates/ruff_python_semantic/src/model.rs:1614
↓ 2 callersMethodparent_id
(&self, node_id: NodeId)
crates/ruff_python_semantic/src/nodes.rs:52
↓ 2 callersFunctionparenthesis_token
Helper to return a parenthesis token only when the cursor (at `offset`) is on a parenthesis token.
crates/ty_ide/src/goto.rs:1540
↓ 2 callersFunctionparenthesize_loop_iter_if_necessary
A helper function that extracts the `iter` from a [`ast::StmtFor`] node and adds parentheses if needed. Also returns the original source range, inclu
crates/ruff_linter/src/rules/refurb/helpers.rs:436
↓ 2 callersFunctionparrot_stdin
Read bytes from `stdin` and write them to `stdout`.
crates/ruff/src/stdin.rs:12
↓ 2 callersMethodparse
(error: ParseError, path: Option<&Path>, source_kind: &SourceKind)
crates/ruff/src/commands/format.rs:839
↓ 2 callersMethodparse
Given the contents of a Python file, extract the `script` metadata block with leading comment hashes removed and map its offsets to the original Pytho
crates/ruff_python_ast/src/script.rs:65
↓ 2 callersMethodparse
Parse the attempted assertion into a [`ParsedAssertion`] structured representation.
crates/mdtest/src/assertion.rs:283
↓ 2 callersMethodparse_alias
Parses an `import` or `from` import name. See: - <https://docs.python.org/3/reference/simple_stmts.html#the-import-statement> - <https://docs.python.
crates/ruff_python_parser/src/parser/statement.rs:780
↓ 2 callersMethodparse_arguments
Parses an argument list. # Panics If the parser isn't positioned at a `(` token. See: <https://docs.python.org/3/reference/expressions.html#grammar
crates/ruff_python_parser/src/parser/expression.rs:721
↓ 2 callersMethodparse_attribute_expression
Parses an attribute expression. # Panics If the parser isn't positioned at a `.` token. See: <https://docs.python.org/3/reference/expressions.html#
crates/ruff_python_parser/src/parser/expression.rs:1129
↓ 2 callersFunctionparse_basic_str
(src: str, pos: Pos, *, multiline: bool)
crates/ruff_benchmark/resources/tomllib/_parser.py:552
↓ 2 callersFunctionparse_block
(block: &Block, strings: &mut TokenStream)
crates/ruff_macros/src/derive_message_formats.rs:22
↓ 2 callersFunctionparse_candidate
Parses a possible link at the start of `input`. Plausible wrapped labels without a closing backtick remain pending; malformed or unsupported forms re
crates/ty_ide/src/docstring/markdown/general/inline.rs:308
↓ 2 callersMethodparse_class_definition
Parses a class definition. The given `start` offset is the start of either the `def` token or the `@` token if the class definition has decorators.
crates/ruff_python_parser/src/parser/statement.rs:2139
↓ 2 callersMethodparse_clauses
Parses a sequence of clauses. The parser only continues for as long as it sees the token indicating the start of the specific clause. Unlike [`Parser
crates/ruff_python_parser/src/parser/statement.rs:4050
↓ 2 callersMethodparse_comma_separated_list_into_vec_with_capacity
Parses a comma separated list of elements into a vector with an initial capacity.
crates/ruff_python_parser/src/parser/mod.rs:768
↓ 2 callersMethodparse_dotted_name
Parses a dotted name. A dotted name is a sequence of identifiers separated by a single dot.
crates/ruff_python_parser/src/parser/statement.rs:833
← previousnext →6,501–6,600 of 31,562, ranked by callers