MCPcopy Create free account

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

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

↓ 1 callersMethodbump_soft_keyword_as_identifier
Bumps the soft keyword token as an `Identifier` token. # Panics If the current token is not a soft keyword.
crates/ruff_python_parser/src/parser/mod.rs:600
↓ 1 callersMethodbump_string_value
(&mut self)
crates/ruff_python_parser/src/parser/mod.rs:476
↓ 1 callersMethodbump_ts
Bumps the current token assuming it is found in the given token set. # Panics If the current token is not found in the given token set.
crates/ruff_python_parser/src/parser/mod.rs:576
↓ 1 callersFunctionbyteOffsetToCharOffset
(content: string, byteOffset: number)
playground/ruff/src/Editor/Editor.tsx:335
↓ 1 callersFunctionbytes_has_duplicate_char
(bytes: &ast::BytesLiteralValue)
crates/ruff_linter/src/rules/pylint/rules/bad_str_strip_call.rs:159
↓ 1 callersMethodbytes_repr
(&'a self, triple_quotes: TripleQuotes)
crates/ruff_python_literal/src/escape.rs:496
↓ 1 callersFunctionbytes_str_func
()
crates/ruff_linter/resources/test/fixtures/flake8_use_pathlib/full_name.py:69
↓ 1 callersFunctionbytestring_attribute
PYI057
crates/ruff_linter/src/rules/flake8_pyi/rules/bytestring_usage.rs:63
↓ 1 callersFunctionbytestring_import
PYI057
crates/ruff_linter/src/rules/flake8_pyi/rules/bytestring_usage.rs:84
↓ 1 callersFunctionc
()
crates/ruff_python_formatter/resources/test/fixtures/ruff/statement/return_type_parameters.py:145
↓ 1 callersFunctionc
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF059_0.py:49
↓ 1 callersFunctionc
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B012.py:16
↓ 1 callersFunctionc
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP032_0.py:121
↓ 1 callersMethodc
(cls)
crates/ruff_linter/resources/test/fixtures/pyupgrade/future_annotations.py:26
↓ 1 callersMethodcache_dir
(&self)
crates/ty_test/src/db.rs:578
↓ 1 callersMethodcache_dir
Returns an absolute cache directory on the system. On Linux and macOS, uses `$XDG_CACHE_HOME/ty` or `.cache/ty`. On Windows, uses `C:\Users\User\AppD
crates/ruff_db/src/system/os.rs:161
↓ 1 callersMethodcache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_cache/src/cache_key.rs:89
↓ 1 callersMethodcache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_linter/src/settings/types.rs:312
↓ 1 callersFunctioncache_key_field_attribute
(field: &Field)
crates/ruff_macros/src/cache_key.rs:114
↓ 1 callersMethodcached_expand_aliases
(self, db: &'db dyn Db, program: Program<'db>)
crates/ty_python_semantic/src/types/set_theoretic.rs:237
↓ 1 callersFunctioncached_instance_method
B019
crates/ruff_linter/src/rules/flake8_bugbear/rules/cached_instance_method.rs:87
↓ 1 callersMethodcached_materialization
( self, db: &'db dyn Db, program: Program<'db>, materialization_kind: Material
crates/ty_python_semantic/src/types.rs:2994
↓ 1 callersFunctioncached_predicate_truthiness
(db: &'db dyn Db, expression: Expression<'db>)
crates/ty_python_semantic/src/types/infer.rs:618
↓ 1 callersFunctioncached_protocol_interface
( db: &'db dyn Db, class: ClassType<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:3581
↓ 1 callersFunctioncached_tz
(hour_str: str, minute_str: str, sign_str: str)
crates/ruff_benchmark/resources/tomllib/_re.py:88
↓ 1 callersFunctioncached_vendored_path
Get the cached version of a vendored path in the cache, ensuring the file is written to disk.
crates/ty_ide/src/lib.rs:362
↓ 1 callersMethodcall
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, value_ty: Type<'db>,
crates/ty_python_semantic/src/types/subscript.rs:75
↓ 1 callersFunctioncall_applicability
Returns `Some` if `call` in `int(call(...))` is a method that returns an `int` and `None` otherwise.
crates/ruff_linter/src/rules/ruff/rules/unnecessary_cast_to_int.rs:126
↓ 1 callersFunctioncall_argument_forms
Returns the form of each call-site argument in source order. `CallArgumentForm::Unknown` indicates that an argument is unmatched or its form cannot b
crates/ty_python_semantic/src/types/ide_support.rs:1320
↓ 1 callersFunctioncall_date_fromtimestamp
DTZ012
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_date_fromtimestamp.rs:64
↓ 1 callersFunctioncall_date_today
DTZ011
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_date_today.rs:64
↓ 1 callersFunctioncall_datetime_fromtimestamp
DTZ006
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_fromtimestamp.rs:77
↓ 1 callersFunctioncall_datetime_now_without_tzinfo
DTZ005
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_now_without_tzinfo.rs:75
↓ 1 callersFunctioncall_datetime_strptime_without_zone
DTZ007
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_strptime_without_zone.rs:91
↓ 1 callersFunctioncall_datetime_today
DTZ002
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_today.rs:69
↓ 1 callersFunctioncall_datetime_utcfromtimestamp
DTZ004
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_utcfromtimestamp.rs:66
↓ 1 callersFunctioncall_datetime_utcnow
DTZ003
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_utcnow.rs:65
↓ 1 callersFunctioncall_datetime_without_tzinfo
DTZ001
crates/ruff_linter/src/rules/flake8_datetimez/rules/call_datetime_without_tzinfo.rs:74
↓ 1 callersMethodcall_expr
(self)
crates/ruff_python_ast/src/generated.rs:2212
↓ 1 callersFunctioncall_matches_name
Given a function call, check if the expression is the "same name" as the function being called. This allows us to filter out repetitive inlay hints l
crates/ty_ide/src/inlay_hints.rs:701
↓ 1 callersMethodcall_signature
Try to get a call signature for this target.
crates/ty_ide/src/goto.rs:616
↓ 1 callersFunctioncall_sites_for_file
Walk one file's AST and record every call whose callee resolves to one of `target_definitions`.
crates/ty_ide/src/call_hierarchy/incoming_calls.rs:168
↓ 1 callersFunctioncall_type_simplified_by_overloads
Given a call expression that has overloads, and whose overload is resolved to a single option by its arguments, return the type of the Signature. Thi
crates/ty_python_semantic/src/types/ide_support.rs:1398
↓ 1 callersFunctioncall_with_qualified_name
Run rules that need the qualified name of the function being called. Include each rule in the initial check so it also runs when enabled on its own.
crates/ruff_linter/src/checkers/ast/analyze/expression.rs:1717
↓ 1 callersFunctioncallable_has_only_non_never_returns
Return `true` if a callable has at least one overload and none return `Never`. Return-type disjointness is a pragmatic approximation for method membe
crates/ty_python_semantic/src/types/protocol_class.rs:3721
↓ 1 callersMethodcallable_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:317
↓ 1 callersFunctioncallable_paramspec_and_return
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, ty: Type<'db>, )
crates/ty_python_semantic/src/types/infer/builder.rs:456
↓ 1 callersMethodcallables_mut
(&mut self)
crates/ty_python_semantic/src/types/call/bind.rs:506
↓ 1 callersMethodcalled_functions
(&self)
crates/ty_python_semantic/src/types/infer.rs:389
↓ 1 callersFunctioncaller
(string: str)
crates/ruff_linter/resources/test/fixtures/pycodestyle/E501.py:19
↓ 1 callersFunctioncamelcase_imported_as_acronym
N817
crates/ruff_linter/src/rules/pep8_naming/rules/camelcase_imported_as_acronym.rs:61
↓ 1 callersFunctioncamelcase_imported_as_constant
N814
crates/ruff_linter/src/rules/pep8_naming/rules/camelcase_imported_as_constant.rs:70
↓ 1 callersFunctioncamelcase_imported_as_lowercase
N813
crates/ruff_linter/src/rules/pep8_naming/rules/camelcase_imported_as_lowercase.rs:55
↓ 1 callersMethodcan_be_bound_for
Returns whether this typevar can be the lower or upper bound of another typevar in a constraint set. We enforce an (arbitrary) ordering on typevars,
crates/ty_python_semantic/src/types/constraints.rs:1801
↓ 1 callersMethodcan_bind_self_to
Returns `true` if this signature's first parameter can accept the bound `self` type. This is used to prune impossible overloads when a method is boun
crates/ty_python_semantic/src/types/signatures.rs:1807
↓ 1 callersMethodcan_complete
Check completion without testing the result object's truthiness.
crates/ty_python_semantic/src/types/infer/expression_truthiness.rs:78
↓ 1 callersMethodcan_contain_line_breaks
(self)
crates/ruff_python_formatter/src/context.rs:185
↓ 1 callersMethodcan_contain_third_party_code
Is it plausible that this search path contains third-party code?
crates/ty_module_resolver/src/path.rs:732
↓ 1 callersMethodcan_continue_with
Returns whether `line` can remain part of the candidate.
crates/ty_ide/src/docstring/markdown/general/inline.rs:243
↓ 1 callersMethodcan_delete_subscript
Check if a type supports subscript deletion (has `__delitem__`).
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:2512
↓ 1 callersMethodcan_infer_generic_typed_dict_constructor
Returns whether constructor arguments can safely constrain a generic `TypedDict`. Mapping arguments, unresolved nested `TypedDict` fields, and gradua
crates/ty_python_semantic/src/types/infer/builder/typed_dict.rs:505
↓ 1 callersMethodcan_infer_typevartuple_arguments
Returns whether a type variable tuple can be inferred from its variadic arguments. The old solver stores one specialization per pack, so it can merge
crates/ty_python_semantic/src/types/call/bind.rs:7453
↓ 1 callersFunctioncan_interact_without_shared_typevars
Whether two constraints with disjoint, complete supports can still derive sequents. A concrete lower/upper, lower/equality, or upper/equality pair ca
crates/ty_python_semantic/src/types/constraints/paths.rs:113
↓ 1 callersFunctioncan_pattern_omit_optional_parentheses
This function is very similar to [`can_omit_optional_parentheses`](crate::expression::can_omit_optional_parentheses) with the only difference that it
crates/ruff_python_formatter/src/pattern/mod.rs:225
↓ 1 callersMethodcan_render_as_continuation
( &self, section_kind: HeaderKind, line_indent: TextSize, item_indent: TextSiz
crates/ty_ide/src/docstring/document/google.rs:682
↓ 1 callersMethodcan_retain
(self, has_literal_string_origin: bool)
crates/ty_python_semantic/src/types/infer/comparisons.rs:161
↓ 1 callersMethodcan_safely_assume_reflexivity
(self, ty: Type<'_>)
crates/ty_python_semantic/src/types/relation.rs:183
↓ 1 callersMethodcan_suppress_exceptions
Returns whether this context manager can suppress an exception raised inside its suite. Following the [typing specification], only exit methods retur
crates/ty_python_semantic/src/types/context_manager.rs:62
↓ 1 callersMethodcan_validate_with_value_annotation
Returns whether a member value can be checked directly against an explicit `_value_` annotation. User-defined data types and constructor methods may
crates/ty_python_semantic/src/types/enums.rs:135
↓ 1 callersMethodcancel
(&self, session: &mut Session, id: RequestId)
crates/ty_server/src/session/client.rs:260
↓ 1 callersMethodcancel
(&self, session: &mut Session, id: RequestId)
crates/ruff_server/src/session/client.rs:206
↓ 1 callersFunctioncancel_scope_no_checkpoint
ASYNC100
crates/ruff_linter/src/rules/flake8_async/rules/cancel_scope_no_checkpoint.rs:65
↓ 1 callersMethodcancellation_token
Returns the cancellation token for the given request id if the request is still pending.
crates/ruff_server/src/session/request_queue.rs:85
↓ 1 callersMethodcandidate_count
Returns the number of overloads considered diagnostic candidates.
crates/ty_python_semantic/src/types/call/bind.rs:11349
↓ 1 callersFunctioncandidate_has_overlap
( candidate: &str, left_excludes: &[String], right_excludes: &[String], )
crates/ruff_workspace/src/options.rs:2303
↓ 1 callersMethodcandidate_overload_indices
Returns the set of overload candidates that may contribute to the call evaluation. Overloads removed by provisional arity matching are typically igno
crates/ty_python_semantic/src/types/call/bind.rs:4271
↓ 1 callersMethodcandidate_overloads
Iterates the overload literals that remain diagnostic candidates, paired with their source overload-definition index.
crates/ty_python_semantic/src/types/call/bind.rs:11335
↓ 1 callersMethodcandidates
( &self, context: &ResolverContext<'db>, )
crates/ty_module_resolver/src/resolve/search.rs:634
↓ 1 callersMethodcanonical_value
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/union_type_instance.rs:154
↓ 1 callersMethodcanonicalize_path
(&self, path: &SystemPath)
crates/ruff_db/src/system/test.rs:116
↓ 1 callersMethodcanonicalize_path
(&self, path: &SystemPath)
crates/ty_wasm/src/lib.rs:1629
↓ 1 callersFunctioncapitalized
D403
crates/ruff_linter/src/rules/pydocstyle/rules/capitalized.rs:62
↓ 1 callersFunctioncargo_command
( target: str, *, debug: bool = False, instrumented: bool = False )
scripts/build_ruff_pgo.py:541
↓ 1 callersFunctioncargo_target_directory
()
crates/ruff_benchmark/src/checkout.rs:67
↓ 1 callersFunctioncase
()
crates/ruff_annotate_snippets/tests/color/simple.rs:6
↓ 1 callersMethodcategorize
Return the [`ImportSection`] for a given module, if it's been categorized as a known module by the user.
crates/ruff_linter/src/rules/isort/categorize.rs:369
↓ 1 callersFunctioncategorize_imports
( block: ImportBlock<'a>, src: &[PathBuf], package: Option<PackageRoot<'_>>, detect_same_packa
crates/ruff_linter/src/rules/isort/categorize.rs:189
↓ 1 callersMethodcategorize_submodule
(&self, submodule: &str)
crates/ruff_linter/src/rules/isort/categorize.rs:393
↓ 1 callersMethodcell_by_uri_mut
(&mut self, uri: &lsp_types::Uri)
crates/ruff_server/src/edit/notebook.rs:232
↓ 1 callersMethodcell_content_range
Returns the text range in the concatenated document of the contents of the cell with index `cell`, excluding the synthetic newline that separates it f
crates/ruff_notebook/src/notebook.rs:422
↓ 1 callersMethodcell_ranges
(&self)
crates/ruff_db/src/diagnostic/render/full.rs:283
↓ 1 callersFunctioncell_to_lsp_cell
( cell: &ruff_notebook::Cell, cell_uri: lsp_types::Uri, )
crates/ruff_server/tests/e2e/notebook.rs:450
↓ 1 callersFunctionchange_detected
Return the [`ChangeKind`] based on the list of modified file paths. Returns `None` if no relevant changes were detected.
crates/ruff/src/lib.rs:66
↓ 1 callersFunctionchanged_files
(pull_request: int)
scripts/pull_request_reviewers.py:51
↓ 1 callersMethodchanged_version
Returns the Python version when the syntax associated with this error was changed, and the type of [`Change`] (added or removed).
crates/ruff_python_parser/src/error.rs:1097
↓ 1 callersFunctioncharOffsetToByteOffset
(content: string, charOffset: number)
playground/ruff/src/Editor/Editor.tsx:349
↓ 1 callersFunctionchar_is_regex_metacharacter
(c: char)
crates/ruff_linter/src/rules/ruff/rules/pytest_raises_ambiguous_pattern.rs:160
↓ 1 callersFunctioncharacter_by_alias
Get alias value from alias name, returns `None` if the alias is not found.
crates/ruff_unicode_names2/src/lib.rs:287
↓ 1 callersMethodcharge_type_inner
( &mut self, db: &'db dyn Db, ty: Type<'db>, seen_aliases: &mut FxHashSet<Type
crates/ty_python_semantic/src/types/constraints/projection.rs:81
↓ 1 callersFunctioncheck
(args: CheckCommand, global_options: GlobalConfigArgs)
crates/ruff/src/lib.rs:237
← previousnext →8,101–8,200 of 31,562, ranked by callers