MCPcopy Create free account

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

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

↓ 8 callersMethodis_empty
(self)
crates/ruff_formatter/src/printer/mod.rs:958
↓ 8 callersMethodis_empty
(&self)
crates/ruff_server/src/edit.rs:172
↓ 8 callersMethodis_enabled
(&self)
crates/ty_python_semantic/src/types/relation_error.rs:960
↓ 8 callersFunctionis_enum_class_by_inheritance
Checks if a class is an enum class by inheritance (either a subtype of `Enum` or has a metaclass that is a subtype of `EnumType`). This is a lighter-
crates/ty_python_semantic/src/types/enums.rs:1661
↓ 8 callersFunctionis_list
Test whether the given binding can be considered a list. For this, we check what value might be associated with it through it's initialization and wh
crates/ruff_python_semantic/src/analyze/typing.rs:1044
↓ 8 callersMethodis_literal_string
(self)
crates/ty_python_semantic/src/types/literal.rs:237
↓ 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_match
(&self, path: &Path)
crates/ruff_linter/src/settings/types.rs:987
↓ 8 callersMethodis_parenthesized
(self)
crates/ruff_python_formatter/src/pattern/pattern_match_sequence.rs:151
↓ 8 callersMethodis_read_only
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:184
↓ 8 callersMethodis_statement
(self)
crates/ruff_python_ast/src/generated.rs:7305
↓ 8 callersMethodis_terminal
(self)
crates/ty_python_semantic/src/types/constraints.rs:2465
↓ 8 callersMethodis_typed_dict
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:488
↓ 8 callersMethodis_unclosed
(self)
crates/ruff_python_ast/src/nodes.rs:1321
↓ 8 callersMethodis_variadic
Returns `true` if this is a variadic parameter.
crates/ty_python_semantic/src/types/signatures.rs:6369
↓ 8 callersMethodjoinpath
(self)
crates/ruff_python_formatter/resources/test/fixtures/ruff/newlines.py:222
↓ 8 callersMethodknown_specialization
If the declared type is a specialized instance of the given `KnownClass`, returns the specialization.
crates/ty_python_semantic/src/types/infer/type_context.rs:86
↓ 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:364
↓ 8 callersMethodmap
Apply a transformation function to all elements of the union, and create a new union from the resulting set of types.
crates/ty_python_semantic/src/types/set_theoretic.rs:390
↓ 8 callersFunctionmatch_statement
(statement_text: &str)
crates/ruff_linter/src/cst/matchers.rs:18
↓ 8 callersMethodmatched_type
The type supplied to a matched parameter. Splats supply their matched element type, while ordinary arguments may be inferred using the parameter's typ
crates/ty_python_semantic/src/types/call/arguments.rs:133
↓ 8 callersMethodmember_by_name
( self, db: &'db dyn Db, name: &'a str, )
crates/ty_python_semantic/src/types/protocol_class.rs:509
↓ 8 callersFunctionmember_lookup_result
( db: &'db dyn Db, member: PlaceAndQualifiers<'db>, error: Option<MemberLookupErrorKind<'db>>,
crates/ty_python_semantic/src/types.rs:1180
↓ 8 callersFunctionmock_typeshed
()
crates/ruff_db/src/vendored.rs:523
↓ 8 callersMethodmro
Iterate over the MRO of this base
crates/ty_python_semantic/src/types/class_base.rs:498
↓ 8 callersMethodname
(&self)
crates/ruff_python_ast/src/nodes.rs:3014
↓ 8 callersMethodname
(&self)
crates/ruff_dev/src/generate_options.rs:81
↓ 8 callersMethodname
(self, python_version: PythonVersion)
crates/ty_python_semantic/src/types/class/known.rs:1096
↓ 8 callersMethodnext
(&mut self)
crates/ruff_linter/src/registry/rule_set.rs:354
↓ 8 callersFunctionnormalize
()
crates/ty_project/src/metadata/pyproject.rs:311
↓ 8 callersFunctionnotebook_path
Construct a path to a Jupyter notebook in the `resources/test/fixtures/jupyter` directory.
crates/ruff_linter/src/linter.rs:797
↓ 8 callersMethodopen_document_handle
Returns a handle to the open document specified by its URI. Returns an error if the document is not open in the index.
crates/ty_server/src/session/index.rs:49
↓ 8 callersMethodorigin
(&self)
crates/ty_python_semantic/src/types.rs:12106
↓ 8 callersMethodown_class_member
Look up a class-level member defined directly on this `TypedDict` (not inherited).
crates/ty_python_semantic/src/types/class/typed_dict.rs:1009
↓ 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:156
↓ 8 callersMethodparse_conditional_expression_or_higher_impl
( &mut self, context: ExpressionContext, )
crates/ruff_python_parser/src/parser/expression.rs:208
↓ 8 callersMethodparse_type_annotation
Parse a stringified type annotation as an AST expression, e.g. `"List[str]"` in `x: "List[str]"` This method is a wrapper around [`ruff_python_parser
crates/ruff_linter/src/checkers/ast/mod.rs:598
↓ 8 callersMethodplace
(&self, place_id: impl Into<ScopedPlaceId>)
crates/ty_python_core/src/place.rs:308
↓ 8 callersMethodplace
Returns the type, boundness, and qualifiers of the resolved place.
crates/ty_python_semantic/src/place_load.rs:239
↓ 8 callersMethodpositive_elements_or_object
Returns an iterator over the positive elements of the intersection. If there are no positive elements, returns a single `object` type.
crates/ty_python_semantic/src/types/set_theoretic.rs:1230
↓ 8 callersMethodprefix_len
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1268
↓ 8 callersMethodprepare
(&self)
crates/ty_ide/src/type_hierarchy.rs:733
↓ 8 callersMethodprogram_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:349
↓ 8 callersFunctionproject
( metadata: &'a DependencyMetadata, path: &str, )
crates/ty_project/src/uv/metadata/dependencies.rs:428
↓ 8 callersMethodproject
(&self)
crates/ruff_benchmark/src/real_world_projects.rs:106
↓ 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:478
↓ 8 callersMethodpush_dangling
Pushes a *dangling* part for `key`
crates/ruff_python_formatter/src/comments/map.rs:109
↓ 8 callersMethodpush_marker
Push a new marker to the sourcemap. ## Panics If `offset` is less than previous markers.
crates/ruff_diagnostics/src/source_map.rs:79
↓ 8 callersMethodpython_version
(&self)
crates/ty_python_semantic/src/db.rs:103
↓ 8 callersMethodrange
(&self)
crates/ruff_python_formatter/src/expression/expr_dict.rs:98
↓ 8 callersMethodrange
(&self)
crates/ruff_python_formatter/src/comments/mod.rs:184
↓ 8 callersMethodreachability_cache
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:583
↓ 8 callersMethodread
Read a JSON failure record, returning `None` if the file does not exist.
python/py-fuzzer/fuzz.py:245
↓ 8 callersMethodread_to_string
(&self, path: &SystemPath)
crates/ty_test/src/db.rs:543
↓ 8 callersMethodrelative_to
(self, path: &SystemPath)
crates/ruff_graph/src/lib.rs:88
↓ 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_deprecated_functions
Report the distinct deprecated targets of one operation in a single diagnostic. Deduplicate by source function or overload. Keep a shared deprecation
crates/ty_python_semantic/src/types/infer/builder.rs:10752
↓ 8 callersMethodreport_diagnostic
Return a [`DiagnosticGuard`] for reporting a diagnostic. The guard derefs to a [`Diagnostic`], so it can be used to further modify the diagnostic bef
crates/ruff_linter/src/checkers/ast/mod.rs:455
↓ 8 callersMethodreport_diagnostics
Report diagnostics for all of the errors that occurred when trying to match actual arguments to formal parameters. If the callable is a union, or has
crates/ty_python_semantic/src/types/call/bind.rs:1545
↓ 8 callersFunctionreport_mismatched_type_name
( context: &InferContext<'db, '_>, node: impl Ranged, constructor: &str, expected_name: &str,
crates/ty_python_semantic/src/types/diagnostic.rs:1639
↓ 8 callersMethodrequest_sync
Requests background synchronization for `file`'s environment. If this call creates the script's first `ScriptEnvironment`, `availability` determines
crates/ty_project/src/uv/environments.rs:227
↓ 8 callersMethodrequirement
Resolve the complete write requirement. Type-only queries can omit the receiver; assignment checking supplies one for `Self` substitution.
crates/ty_python_semantic/src/types/protocol_class.rs:1682
↓ 8 callersMethodresolve
Returns the re-mapped position or `position` if no mapping exists.
crates/ruff_linter/src/noqa.rs:1326
↓ 8 callersMethodresult_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, self_type: Option<Type
crates/ty_python_semantic/src/types/protocol_class.rs:1609
↓ 8 callersMethodroot
(&self)
crates/ty_project/src/metadata.rs:384
↓ 8 callersFunctionrun_single_threaded
(bencher: Bencher, benchmark: &Benchmark)
crates/ruff_benchmark/benches/ty_walltime.rs:192
↓ 8 callersMethodruntime_class
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:2070
↓ 8 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/narrow.rs:3526
↓ 8 callersMethodscoped_use_id
(&self, db: &dyn Db, file: ProgramFile<'_>)
crates/ty_python_core/src/ast_ids.rs:271
↓ 8 callersFunctionscript_tag
(db: &dyn SourceDb, file: File)
crates/ty_project/src/script.rs:165
↓ 8 callersMethodset
Set the value of the `AtomicNodeIndex`.
crates/ruff_python_ast/src/node_index.rs:177
↓ 8 callersMethodshould_check_file
(&self, file: File)
crates/ty_python_semantic/src/db.rs:161
↓ 8 callersMethodsource
(&self)
crates/ty_project/src/metadata/value.rs:56
↓ 8 callersMethodspawn
(self, f: F)
crates/ty_server/src/server/schedule/thread.rs:62
↓ 8 callersMethodstart_token
(&mut self)
crates/ruff_python_trivia/src/cursor.rs:82
↓ 8 callersMethodsubject
Create a binding that aliases the current subject.
crates/ty_python_semantic/src/types/narrow.rs:333
↓ 8 callersMethodsuffix_len
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1272
↓ 8 callersMethodsupertypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:741
↓ 8 callersMethodsync_wakeups
Returns a receiver for background synchronization wakeups. A wakeup indicates that synchronization results may be ready to process with [`poll_sync`]
crates/ty_project/src/uv/environments.rs:168
↓ 8 callersMethodto_format_options
( &self, source_type: PySourceType, source: &str, path: Option<&Path>, )
crates/ruff_workspace/src/settings.rs:214
↓ 8 callersMethodtokens
(&self)
crates/ruff_python_trivia_integration_tests/tests/simple_tokenizer.rs:30
↓ 8 callersMethodtry_await
Resolve the type of an `await …` expression where `self` is the type of the awaitable.
crates/ty_python_semantic/src/types.rs:8773
↓ 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:8442
↓ 8 callersMethodunion_type
Returns the type this union denotes, or the first error from interpreting an operand as a type expression.
crates/ty_python_semantic/src/types/union_type_instance.rs:139
↓ 8 callersMethodupdate_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:256
↓ 8 callersMethodupdated_signature
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1290
↓ 8 callersMethodvariable
( db: &'db dyn Db, origin: VarianceOrigin<'db>, typevar: BoundTypeVarIdentity<'db>,
crates/ty_python_semantic/src/types/variance/equations.rs:36
↓ 8 callersMethodvariance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1369
↓ 8 callersFunctionvendored_path_to_file
( db: &dyn Db, path: impl AsRef<VendoredPath>, )
crates/ruff_db/src/files.rs:53
↓ 8 callersMethodvisit_body
(&mut self, body: &'a [Stmt])
crates/ruff_linter/src/checkers/ast/mod.rs:2517
↓ 8 callersMethodvisit_body
(&mut self, body: &[Stmt])
crates/ruff_linter/src/rules/flake8_bugbear/rules/loop_iterator_mutation.rs:134
↓ 8 callersMethodwith_failure_code
(self, code: server::ErrorCode)
crates/ty_server/src/server/api.rs:583
↓ 8 callersMethodwith_optional_range
Returns a new `Span` with the given optional `range` attached to it.
crates/ruff_db/src/diagnostic/mod.rs:1266
↓ 8 callersMethodwrite
(&self, formatter: &mut impl std::fmt::Write)
crates/ruff_python_literal/src/escape.rs:132
↓ 7 callersMethodabsolute
Makes a path absolute and normalizes it without accessing the file system. Adapted from [cargo](https://github.com/rust-lang/cargo/blob/fede83ccf9734
crates/ruff_db/src/system/path.rs:461
↓ 7 callersMethodadd
( &mut self, pattern: &AbsolutePortableGlobPattern, )
crates/ty_project/src/glob/exclude.rs:81
↓ 7 callersMethodadd_start
(&self, amount: TextSize)
crates/ruff_text_size/src/range.rs:429
↓ 7 callersMethodadd_workspace_folder
Adds a workspace folder configuration to this wrapper's state. This is meant to roughly model VS Code's "Add Folder to Workspace" functionality. Thi
crates/ty_server/tests/e2e/main.rs:1205
← previousnext →1,901–2,000 of 31,562, ranked by callers