MCPcopy Create free account

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

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

↓ 12 callersFunctiontest_helper
(source: &str, members_to_remove: &[&str])
crates/ruff_linter/src/rules/pyupgrade/fixes.rs:75
↓ 12 callersMethodto_file_path
Returns the corresponding [`AnySystemPath`] for this document key. Note, calling this method on a `DocumentKey::Opaque` representing a cell document
crates/ty_server/src/document.rs:94
↓ 12 callersMethodto_subclass_of
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class and all possible subclasses of the class. If the class
crates/ty_python_semantic/src/types/class/known.rs:1208
↓ 12 callersMethodtoken_range
(&self)
crates/ruff_python_parser/src/lexer.rs:1421
↓ 12 callersMethodtokens
(&self)
crates/ruff_python_formatter/src/context.rs:85
↓ 12 callersMethodtry_bool
Resolves the boolean value of a type. This is used to determine the value that would be returned when `bool(x)` is called on an object `x`. Returns
crates/ty_python_semantic/src/types/bool.rs:32
↓ 12 callersMethodty
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:494
↓ 12 callersMethodunion
(self, other: TokenSet)
crates/ruff_python_parser/src/token_set.rs:20
↓ 12 callersMethodverify_builder
(self, builder: &'c ConstraintSetBuilder<'db>)
crates/ty_python_semantic/src/types/constraints.rs:411
↓ 12 callersMethodwhen_all
( self, db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, mut f: impl F
crates/ty_python_semantic/src/types/constraints.rs:212
↓ 12 callersMethodwith_default_type
(mut self, default: Type<'db>)
crates/ty_python_semantic/src/types/signatures.rs:4084
↓ 12 callersMethodwith_extension
(&self, extension: &str)
crates/ruff_db/src/system/path.rs:365
↓ 12 callersMethodwith_site_packages
Convert to a builder that supports site-packages (third-party dependencies).
crates/ty_ide/src/lib.rs:611
↓ 12 callersMethodwrite
(&self, f: &mut std::fmt::Formatter, start_range: bool)
crates/ruff/src/args.rs:1329
↓ 12 callersMethodwrite_element
(&mut self, element: FormatElement)
crates/ruff_formatter/src/buffer.rs:139
↓ 12 callersMethodwrite_file
(&self, path: impl AsRef<Path>, content: &str)
crates/ty/tests/cli/main.rs:962
↓ 12 callersMethodwrite_project_file
( &self, relative_path: impl AsRef<SystemPath>, content: &str, )
crates/ty/tests/file_watching.rs:307
↓ 11 callersMethodadd_token
( &mut self, ranged: impl Ranged, token_type: SemanticTokenType, modifiers: Se
crates/ty_ide/src/semantic_tokens.rs:224
↓ 11 callersMethodas_char
(self)
crates/ruff_python_ast/src/str.rs:20
↓ 11 callersMethodas_char
Get the character used to represent this quote.
crates/ruff_linter/src/rules/flake8_quotes/settings.rs:75
↓ 11 callersMethodas_notebook
(&self)
crates/ty_server/src/session/index.rs:262
↓ 11 callersMethodas_ref
(&self)
crates/ruff_db/src/files/path.rs:106
↓ 11 callersMethodas_typed_dict
(self)
crates/ty_python_semantic/src/types.rs:1644
↓ 11 callersFunctionassert_no_match
(set: &ModuleGlobSet, name: &str)
crates/ty_module_resolver/src/module_glob.rs:380
↓ 11 callersMethodbindings
(&self)
crates/ty_python_core/src/use_def/place_state.rs:588
↓ 11 callersMethodbuild
(self)
crates/ruff_db/src/testing.rs:196
↓ 11 callersMethodcache_key
(&self, state: &mut CacheKeyHasher)
crates/ruff_cache/src/globset.rs:6
↓ 11 callersMethodcell
Returns the (raw) cell number (1-based) for the given row (1-based).
crates/ruff_notebook/src/index.rs:29
↓ 11 callersMethodchange_text_document
Send a `textDocument/didChange` notification with the given content changes
crates/ty_server/tests/e2e/main.rs:826
↓ 11 callersMethodclear
Clear the parsed module, dropping the AST once all references to it are dropped.
crates/ruff_db/src/parsed.rs:153
↓ 11 callersMethodcloser_len
The total length of the string's closer. This is always equal to `self.quote_len()`, except when the string is unclosed, in which case the length is z
crates/ruff_python_ast/src/nodes.rs:847
↓ 11 callersMethodcontext
Return the [`LintContext`] for the current analysis. Note that you should always prefer calling methods like `settings`, `report_diagnostic`, or `is_
crates/ruff_linter/src/checkers/ast/mod.rs:665
↓ 11 callersMethodcreate_directory_all
Creates a directory at `path`. All enclosing directories are created if they don't exist.
crates/ruff_db/src/system/memory_fs.rs:324
↓ 11 callersMethoddb
(&self)
crates/ty/tests/file_watching.rs:46
↓ 11 callersFunctionenum_metadata
( db: &'db dyn Db, class: ClassLiteral<'db>, )
crates/ty_python_semantic/src/types/enums.rs:920
↓ 11 callersMethodexplicit_bases
Returns all of the explicit base class types for this class. Note that when this is a namedtuple this always returns a sequence of length one corresp
crates/ty_python_semantic/src/types/class.rs:947
↓ 11 callersMethodfile
Returns the `UnifiedFile` attached to this `Span`.
crates/ruff_db/src/diagnostic/mod.rs:1244
↓ 11 callersMethodfile
(self, db: &'db dyn Db)
crates/ty_python_core/src/expression.rs:70
↓ 11 callersMethodfile_path
(&self, path: impl AsRef<SystemPath>)
crates/ty_server/tests/e2e/main.rs:788
↓ 11 callersFunctionfile_system
()
crates/ty_vendored/src/lib.rs:18
↓ 11 callersMethodfiles
(&self)
crates/ruff_db/src/lib.rs:182
↓ 11 callersMethodfilter_union
If the type is a union (or a type alias that resolves to a union), filters union elements based on the provided predicate. Otherwise, returns the typ
crates/ty_python_semantic/src/types.rs:2024
↓ 11 callersMethodfinish
(self)
crates/ty_python_semantic/src/types/call/bind.rs:4684
↓ 11 callersFunctionglobal_symbol
( db: &'db dyn Db, file: File, name: &str, )
crates/ty_python_semantic/src/place.rs:498
↓ 11 callersMethodhide_severity
Whether to hide a diagnostic's severity or not.
crates/ruff_db/src/diagnostic/mod.rs:1528
↓ 11 callersMethodincludes
Returns `true` if the string list of `codes` includes `code` (or an alias thereof).
crates/ruff_linter/src/noqa.rs:121
↓ 11 callersMethodinfer_definition
(&mut self, node: impl Into<DefinitionNodeKey> + std::fmt::Debug + Copy)
crates/ty_python_semantic/src/types/infer/builder.rs:1881
↓ 11 callersMethodis_assignment
(&self, expr: &Expr)
crates/ruff_linter/src/rules/pylint/helpers.rs:91
↓ 11 callersFunctionis_const_true
Return `true` if an [`Expr`] is a literal `True`.
crates/ruff_python_ast/src/helpers.rs:849
↓ 11 callersMethodis_empty
(&self)
crates/mdtest/src/matcher.rs:48
↓ 11 callersMethodis_function_like
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:479
↓ 11 callersMethodis_implicitly_open
(self)
crates/ty_python_semantic/src/types/typed_dict.rs:115
↓ 11 callersMethodis_keyword
(self)
crates/ruff_python_ast/src/token.rs:344
↓ 11 callersMethodis_required
(&self)
crates/ty_python_semantic/src/types/class.rs:2471
↓ 11 callersMethodis_variadic
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1962
↓ 11 callersMethoditem
Returns the field exposed by a literal key. Undeclared keys synthesize a field only for explicit extra items. Hidden items on an implicitly open `Typ
crates/ty_python_semantic/src/types/typed_dict.rs:358
↓ 11 callersMethoditer_flat
Returns an iterator over all `CallableBinding`s, flattening the two-level structure. Note: This loses the union/intersection distinction. The returne
crates/ty_python_semantic/src/types/call/bind.rs:730
↓ 11 callersMethoditer_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1043
↓ 11 callersMethodjoin_comma_separated
( &'fmt mut self, sequence_end: TextSize, )
crates/ruff_python_formatter/src/builders.rs:73
↓ 11 callersMethodjoin_with
Joins the objects by placing the specified separator between every two items. ## Examples Joining different tokens by separating them with a comma a
crates/ruff_formatter/src/formatter.rs:101
↓ 11 callersFunctionknown_module_symbol
Lookup the type of `symbol` in a given known module. Returns `Place::Undefined` if the given known module cannot be resolved for some reason.
crates/ty_python_semantic/src/place.rs:618
↓ 11 callersMethodleading_dangling_trailing
Returns an iterator over the [leading](self#leading-comments), [dangling](self#dangling-comments), and [trailing](self#trailing) comments of `node`.
crates/ruff_python_formatter/src/comments/mod.rs:349
↓ 11 callersFunctionleading_indentation
Extract the leading indentation from a line.
crates/ruff_python_trivia/src/whitespace.rs:49
↓ 11 callersMethodlen
(&self)
crates/ty_server/src/server/schedule/thread/pool.rs:133
↓ 11 callersMethodlen
(&self)
crates/ruff_server/src/server/schedule/thread/pool.rs:130
↓ 11 callersMethodmark_formatted
Marks the comment as formatted
crates/ruff_python_formatter/src/comments/mod.rs:146
↓ 11 callersMethodmatches
(self, db: &'db dyn Db, class: ClassLiteral<'db>)
crates/ty_python_semantic/src/types/class.rs:226
↓ 11 callersMethodnext
(&mut self)
crates/ty_project/src/lib.rs:801
↓ 11 callersMethodnext
(&mut self)
crates/ruff_python_semantic/src/analyze/class.rs:99
↓ 11 callersMethodparent_statement_id
Given a [`NodeId`], return the [`NodeId`] of the parent statement, if any.
crates/ruff_python_semantic/src/model.rs:1647
↓ 11 callersFunctionparenthesized
Formats `content` enclosed by the `left` and `right` parentheses. The implementation also ensures that expanding the parenthesized expression (or any
crates/ruff_python_formatter/src/expression/parentheses.rs:109
↓ 11 callersMethodpermissions
(&self)
crates/ruff_db/src/system.rs:288
↓ 11 callersMethodpop
(&mut self)
crates/ty_module_resolver/src/path.rs:82
↓ 11 callersMethodquote
(&self)
crates/ruff_python_codegen/src/stylist.rs:25
↓ 11 callersMethodrange
Returns the range of the configuration setting.
crates/ty_site_packages/src/version.rs:66
↓ 11 callersMethodreport_context
If error context collection is enabled, returns the current error context tree. You will typically use [`push`][ErrorContextTree::push] to add additio
crates/ty_python_semantic/src/types/relation.rs:890
↓ 11 callersMethodrestore
Restore the semantic model to the given [`Snapshot`].
crates/ruff_python_semantic/src/model.rs:2064
↓ 11 callersMethodrevision
(&self)
crates/ruff_db/src/system.rs:284
↓ 11 callersMethodrun
(self, username)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S602.py:34
↓ 11 callersMethodshow_error_message
Sends a request to display an error to the client with a formatted message. The error is sent in a `window/showMessage` notification. Logs an error i
crates/ruff_server/src/session/client.rs:215
↓ 11 callersMethodslice
Returns the location of the comment in the original source code. Allows retrieving the text of the comment.
crates/ruff_python_formatter/src/comments/mod.rs:137
↓ 11 callersMethodsubtypes
(&self)
crates/ty_ide/src/type_hierarchy.rs:722
↓ 11 callersMethodtake_snapshot
Creates a document snapshot with the URI referencing the document to snapshot.
crates/ruff_server/src/session.rs:97
↓ 11 callersFunctiontest_resource_path
(path: impl AsRef<Path>)
crates/ruff_linter/src/test.rs:121
↓ 11 callersMethodtext_len
(&self)
crates/ruff_python_parser/src/lexer/cursor.rs:66
↓ 11 callersMethodto_intersection
Reconstruct the equivalent set-theoretic intersection.
crates/ty_python_semantic/src/types/enums.rs:842
↓ 11 callersMethodto_location
Converts this range into an LSP location. Returns `None` if the URI for this file couldn't be resolved.
crates/ty_server/src/document/range.rs:40
↓ 11 callersMethodto_text_size
( self, text: &str, index: &LineIndex, position_encoding: PositionEncoding,
crates/ty_wasm/src/lib.rs:1159
↓ 11 callersMethodtoken_len
(&self)
crates/ruff_python_trivia/src/cursor.rs:68
↓ 11 callersMethodwith_definition
Create a new signature with the given definition.
crates/ty_python_semantic/src/types/signatures.rs:1384
↓ 11 callersMethodwith_preview_mode
(mut self)
crates/ruff_linter/src/settings/mod.rs:880
↓ 11 callersMethodwith_quote_style
(mut self, quote_style: Quote)
crates/ruff_python_ast/src/nodes.rs:953
↓ 11 callersMethodwrite
(&mut self, buf: &[u8])
crates/ruff_db/src/diagnostic/render/junit.rs:174
↓ 10 callersMethodabsolute
Resolves the absolute path for `self` based on its origin.
crates/ty_project/src/metadata/value.rs:76
↓ 10 callersMethodadd
(&mut self, line_range: TextRange)
crates/ruff_linter/src/rules/pycodestyle/rules/blank_lines.rs:563
↓ 10 callersMethodadd_and_constraint
( &mut self, a: ScopedNarrowingConstraint, b: ScopedNarrowingConstraint, )
crates/ty_python_core/src/narrowing_constraints.rs:332
↓ 10 callersMethodas_str
Returns the string representation of the quote style.
crates/ruff_python_formatter/src/options.rs:278
↓ 10 callersFunctionassert_notebook_path
( path: impl AsRef<Path>, expected: impl AsRef<Path>, settings: &LinterSettings, )
crates/ruff_linter/src/test.rs:169
↓ 10 callersMethodattach_to
Render the error context tree as info sub-diagnostics on `diag`.
crates/ty_python_semantic/src/types/relation_error.rs:536
↓ 10 callersFunctionbefore_main
()
crates/ruff_wasm/src/lib.rs:206
← previousnext →1,101–1,200 of 27,349, ranked by callers