MCPcopy Create free account

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

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

↓ 26 callersMethodenclosing_node
The closest parent node that fully encloses the comment. A node encloses a comment when the comment is between two of its direct children (ignoring l
crates/ruff_python_formatter/src/comments/visitor.rs:206
↓ 26 callersMethodentry
(&'a mut self, code: &'a SecondaryCode)
crates/ruff_linter/src/linter.rs:73
↓ 26 callersMethodexception
(self)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:135
↓ 26 callersMethodfull_display
Return the full snippet for user-facing display, or `None` if the snippet should be truncated.
crates/ruff_linter/src/fix/snippet.rs:18
↓ 26 callersMethodinferred_type
(&self, model: &SemanticModel<'db>)
crates/ty_python_semantic/src/semantic_model.rs:691
↓ 26 callersMethodinner_type
Forget about type qualifiers and only return the inner type.
crates/ty_python_semantic/src/types.rs:8032
↓ 26 callersMethodinto_iter
(self)
crates/ruff_python_ast/src/token/tokens.rs:233
↓ 26 callersMethodis_expression_parenthesized
(&self, expression: ExprRef)
crates/ruff_python_formatter/src/context.rs:89
↓ 26 callersFunctionnew_tokens
Helper function to create [`Tokens`] from an iterator of (kind, range).
crates/ruff_python_ast/src/token/tokens.rs:439
↓ 26 callersMethodopen
Open or create a new cache. `package_root` is the path to root of the package that is contained within this cache and must be canonicalized (to avoid
crates/ruff/src/cache.rs:94
↓ 26 callersFunctionsetup_micro_case
(code: &str)
crates/ruff_benchmark/benches/ty.rs:226
↓ 26 callersMethodwith_python_version
(mut self, python_version: PythonVersion)
crates/ty_module_resolver/src/db.rs:64
↓ 25 callersMethodannotation
(&self)
crates/ruff_python_ast/src/nodes.rs:2823
↓ 25 callersMethodas_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:75
↓ 25 callersMethodassert_indexed_project_files
(&self, expected: impl IntoIterator<Item = File>)
crates/ty/tests/file_watching.rs:213
↓ 25 callersMethodcmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/literal.rs:336
↓ 25 callersFunctioncollect_unused_names
(source: &str)
crates/ty_python_semantic/src/types/ide_support/unused_bindings.rs:220
↓ 25 callersMethodcurrent_expression_parent
Return the parent [`Expr`] of the current [`Expr`], if any.
crates/ruff_python_semantic/src/model.rs:1500
↓ 25 callersMethodextend
(&mut self, segments: impl IntoIterator<Item = &'a str>)
crates/ruff_python_ast/src/name.rs:409
↓ 25 callersMethodget
(&self, index: I)
crates/ruff_index/src/slice.rs:111
↓ 25 callersMethodid
(&self)
crates/ty_python_semantic/src/suppression.rs:433
↓ 25 callersMethodlen
(&self)
crates/ty_python_core/src/rank.rs:69
↓ 25 callersMethodplace
(&self, place_id: impl Into<ScopedPlaceId>)
crates/ty_python_core/src/place.rs:263
↓ 25 callersMethodrange
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3197
↓ 25 callersMethodrange
(&self)
crates/ruff_linter/src/rules/pyflakes/rules/unused_import.rs:551
↓ 25 callersMethodto_class_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:208
↓ 25 callersMethodvalue
Return the numeric value for this [`LineWidth`]
crates/ruff_formatter/src/lib.rs:111
↓ 25 callersMethodvisit_body
(&mut self, body: &[ruff_python_ast::Stmt])
crates/ruff_linter/src/rules/numpy/helpers.rs:42
↓ 25 callersMethodvisit_node
(&mut self, node: &'ast T)
crates/ruff_db/src/parsed.rs:610
↓ 24 callersMethodadd_negative
(self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1296
↓ 24 callersMethodas_class_literal
(self)
crates/ty_python_semantic/src/types.rs:1552
↓ 24 callersMethodcontext
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 24 callersMethodfile_name
(&self)
crates/ruff_db/src/system/path.rs:265
↓ 24 callersFunctionfmt
(old: int, new: int, *, greater_is_better: bool = True)
scripts/conformance.py:749
↓ 24 callersMethodfull_line_end
(&self, offset: TextSize)
crates/ruff_linter/src/locator.rs:191
↓ 24 callersMethodinto_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:116
↓ 24 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:627
↓ 24 callersMethodis_end_of_line
(self)
crates/ruff_python_trivia/src/comments.rs:101
↓ 24 callersMethodis_match
(&self, banned_module: &str)
crates/ruff_linter/src/rules/flake8_tidy_imports/matchers.rs:10
↓ 24 callersMethodisolate
(mut self, isolation: IsolationLevel)
crates/ruff_diagnostics/src/fix.rs:168
↓ 24 callersMethodmembers
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/protocol_class.rs:265
↓ 24 callersMethodoptions
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callersMethodpython_version
(&self)
crates/ty_python_semantic/src/db.rs:121
↓ 24 callersMethodreferences
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:486
↓ 24 callersMethodskip_builtins
When set, builtins from completions are skipped. This is useful in tests to reduce noise for scope based completions. Not enabled by default.
crates/ty_ide/src/completion.rs:10792
↓ 24 callersMethodskip_keywords
When set, keywords from completions are skipped. This is useful in tests to reduce noise for scope based completions. Not enabled by default. Note t
crates/ty_ide/src/completion.rs:10807
↓ 24 callersMethodsort
(&mut self)
crates/ruff_linter/src/rules/ruff/rules/invalid_formatter_suppression_comment.rs:202
↓ 24 callersMethodsource
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callersFunctionsum
()
crates/ruff_text_size/tests/main.rs:15
↓ 24 callersMethodtests
(&self)
crates/mdtest/src/parser.rs:50
↓ 24 callersMethodtuple_spec
If this is an instance type where the class has a tuple spec, returns the tuple spec. I.e., for the type `tuple[int, str]`, this will return the tupl
crates/ty_python_semantic/src/types/instance.rs:273
↓ 24 callersMethodvalues
(&self)
crates/ty_python_core/src/frozen.rs:29
↓ 23 callersMethodadd_unsupported_syntax_error
Add an [`UnsupportedSyntaxError`] with the given [`UnsupportedSyntaxErrorKind`] and [`TextRange`] if its minimum version is less than [`Parser::target
crates/ruff_python_parser/src/parser/mod.rs:620
↓ 23 callersMethodancestors
Returns an iterator of this module name and all of its parent modules. # Examples ``` use ty_module_resolver::ModuleName; assert_eq!( ModuleName::n
crates/ty_module_resolver/src/module_name.rs:301
↓ 23 callersMethodcomponents
(&self)
crates/ty_module_resolver/src/module_name.rs:82
↓ 23 callersMethodcontains
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:165
↓ 23 callersMethodcontains
Return `true` if the given version is required.
crates/ruff_linter/src/settings/types.rs:661
↓ 23 callersMethoddefinition
Returns the definition where this `TypedDict` is created, if it was assigned to a variable.
crates/ty_python_semantic/src/types/class/typed_dict.rs:856
↓ 23 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callersMethodinfo
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callersMethodinsert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 23 callersMethodis_directory
(&self, resolver: &ResolverContext)
crates/ty_module_resolver/src/path.rs:91
↓ 23 callersMethodis_empty
(&self)
crates/ruff_python_ast/src/name.rs:394
↓ 23 callersMethodis_known
Return `true` if this class represents `known_class`
crates/ty_python_semantic/src/types/class/static_literal.rs:115
↓ 23 callersFunctionis_python_whitespace
Returns `true` for [whitespace](https://docs.python.org/3/reference/lexical_analysis.html#whitespace-between-tokens) characters.
crates/ruff_python_trivia/src/whitespace.rs:40
↓ 23 callersMethoditer
( &'a self, db: &'a dyn Db, mode: ModuleResolveMode, )
crates/ty_module_resolver/src/resolve.rs:790
↓ 23 callersMethodkind
(&self)
crates/ty_ide/src/lib.rs:211
↓ 23 callersMethodleading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:281
↓ 23 callersMethodmatch_typing_qualified_name
Return `true` if the call path is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:251
↓ 23 callersMethodmetadata
(&self, path: impl AsRef<VendoredPath>)
crates/ruff_db/src/vendored.rs:74
↓ 23 callersMethodnext
Advances the cursor and returns the next line.
crates/ty_ide/src/docstring/document/rst.rs:91
↓ 23 callersFunctionparse_unchecked
Parse the given Python source code using the specified [`ParseOptions`]. This is same as the [`parse`] function except that it doesn't check for any
crates/ruff_python_parser/src/lib.rs:289
↓ 23 callersMethodposition
Creates a new buffer snapshot that points to the specified position.
crates/ruff_formatter/src/buffer.rs:95
↓ 23 callersMethodprimary_span
Returns the "primary" span of this diagnostic if one exists. When there are multiple primary spans, then the first one that was added to this diagnos
crates/ruff_db/src/diagnostic/mod.rs:293
↓ 23 callersFunctionresolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:58
↓ 23 callersMethodsignature_help
(&self)
crates/ty_ide/src/signature_help.rs:1443
↓ 23 callersFunctionsingle
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 23 callersMethodspan
Conveniently create a `Span` that points into a file in this environment. The path given must have been added via `TestEnvironment::add`. The offset
crates/ruff_db/src/diagnostic/render.rs:2672
↓ 23 callersMethodsub
Adds a "sub" diagnostic to this diagnostic. This is useful when a sub diagnostic has its own annotations attached to it. For the simpler case of a su
crates/ruff_db/src/diagnostic/mod.rs:184
↓ 23 callersMethodto_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:5864
↓ 23 callersMethodwith_target_version
(mut self, target_version: PythonVersion)
crates/ruff_linter/src/settings/mod.rs:874
↓ 23 callersMethodwrite_dedented
Writes auto-dedented text to a file.
crates/ruff_db/src/system/test.rs:244
↓ 22 callersMethodadd_primary_tag
Adds a tag on the primary annotation for this diagnostic. This tag is associated with the primary annotation created for every `Diagnostic` that uses
crates/ruff_linter/src/checkers/ast/mod.rs:3668
↓ 22 callersMethodall_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:648
↓ 22 callersMethodbases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
↓ 22 callersMethodclear
Clears state such that this group is indistinguishable from an empty group.
crates/ty_ide/src/all_symbols.rs:377
↓ 22 callersMethodcurrent_use_def_map_mut
(&mut self)
crates/ty_python_core/src/builder.rs:1081
↓ 22 callersMethodeat_while
Eats symbols while predicate returns true or until the end of file is reached.
crates/ruff_python_trivia/src/cursor.rs:147
↓ 22 callersMethodfiles
(&self)
crates/mdtest/src/parser.rs:147
↓ 22 callersMethodinsert
(&mut self, file: File)
crates/ty_project/src/files.rs:217
↓ 22 callersMethodinto_class
(self)
crates/ty_python_semantic/src/types/class_base.rs:339
↓ 22 callersMethodis_object
Return `true` if this class represents the builtin class `object`
crates/ty_python_semantic/src/types/class.rs:1151
↓ 22 callersMethoditer_mro
Iterate over the [method resolution order] ("MRO") of the class. If the MRO could not be accurately resolved, this method falls back to iterating ove
crates/ty_python_semantic/src/types/class/static_literal.rs:682
↓ 22 callersMethodkeys
(&self)
crates/ruff_linter/src/linter.rs:83
↓ 22 callersMethodlen_utf8
(self)
crates/ty_python_semantic/src/suppression.rs:449
↓ 22 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:573
↓ 22 callersMethodopenness
Returns whether this `TypedDict` is implicitly open, closed, or has explicit extra items. A class-based `TypedDict` inherits the first explicit polic
crates/ty_python_semantic/src/types/typed_dict.rs:235
↓ 22 callersFunctionpad
Add leading or trailing whitespace to a snippet, if it's immediately preceded or followed by an identifier or keyword.
crates/ruff_linter/src/fix/edits.rs:615
↓ 22 callersMethodpath
(&self)
crates/ruff_db/src/system.rs:333
↓ 22 callersMethodquery
(&self)
crates/ruff_server/src/session.rs:226
← previousnext →501–600 of 27,349, ranked by callers