MCPcopy Create free account

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

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

↓ 78 callersMethodintersects
Returns `true` if the given range intersects with any comment range.
crates/ruff_python_trivia/src/comment_ranges.rs:79
↓ 78 callersMethodset
Overwrite the error context tree with a new root context and child nodes.
crates/ty_python_semantic/src/types/relation_error.rs:988
↓ 78 callersMethodto_owned
(&self)
crates/ty_ide/src/symbols.rs:278
↓ 77 callersMethodexpression_type
Get the already-inferred type of an expression node, or Unknown.
crates/ty_python_semantic/src/types/infer/builder.rs:1085
↓ 77 callersMethodfile
(&self)
crates/ty_ide/src/lib.rs:153
↓ 77 callersMethodlock
(mut self)
crates/ty/src/printer.rs:135
↓ 77 callersFunctionopen
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:75
↓ 77 callersMethodsaturating_sub
(self, rhs: TextSize)
crates/ruff_text_size/src/size.rs:123
↓ 77 callersMethodtake
Return the full tree, replacing it with an empty tree.
crates/ty_python_semantic/src/types/relation_error.rs:1008
↓ 76 callersMethodfind
Returns the [`ParameterWithDefault`] with the given name, or `None` if no such [`ParameterWithDefault`] exists.
crates/ruff_python_ast/src/nodes.rs:3348
↓ 76 callersMethodgenerator
Create a [`Generator`] to generate source code based on the current AST state.
crates/ruff_linter/src/checkers/ast/mod.rs:343
↓ 76 callersMethodinsert
Inserts a new AST node into the tree and returns its unique ID.
crates/ruff_python_semantic/src/nodes.rs:37
↓ 76 callersMethodproject
(&self)
crates/ty_project/src/db.rs:705
↓ 75 callersMethodand
( mut self, db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, other: im
crates/ty_python_semantic/src/types/constraints.rs:729
↓ 75 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/call/bind.rs:4998
↓ 75 callersFunctionparse_suite
(source: &str)
crates/ruff_python_parser/src/string.rs:536
↓ 74 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/call/arguments.rs:704
↓ 74 callersMethodpush
(&mut self, data: T)
crates/ruff_index/src/vec.rs:62
↓ 74 callersMethodread
(self)
crates/ty_python_semantic/src/types/protocol_class.rs:1484
↓ 73 callersFunctionlist
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C400.py:31
↓ 73 callersMethodnode
Return the original [`ast::StmtClassDef`] node associated with this class ## Note Only call this function from queries in the same file or your query
crates/ty_python_semantic/src/types/class/static_literal.rs:621
↓ 73 callersMethodpython_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:345
↓ 73 callersMethodtarget_version
Return the [`PythonVersion`] to use for version-related lint rules. If the user did not provide a target version, this defaults to the lowest support
crates/ruff_linter/src/checkers/ast/mod.rs:644
↓ 73 callersMethodwrite_file
Writes a file to the test directory. Parent directories are created automatically if they don't exist. Content is dedented to remove common leading w
crates/ruff/tests/cli/main.rs:148
↓ 72 callersMethodas_call_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2236
↓ 72 callersMethodbump
Bumps the current token assuming it is of the given kind. # Panics If the current token is not of the given kind.
crates/ruff_python_parser/src/parser/mod.rs:412
↓ 72 callersMethodcontents
The contents of the docstring, including the opening and closing quotes.
crates/ruff_linter/src/docstrings/mod.rs:30
↓ 72 callersMethodfind
(&self, policy: &NameMatchPolicy)
crates/ruff_linter/src/rules/flake8_tidy_imports/settings.rs:152
↓ 72 callersFunctionparenthesized_range
Returns the [`TextRange`] of a given expression including parentheses, if the expression is parenthesized; or `None`, if the expression is not parenth
crates/ruff_python_ast/src/parenthesize.rs:64
↓ 72 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:949
↓ 72 callersMethodwrite_dedented
Writes auto-dedented text to a file.
crates/ruff_db/src/system/test.rs:290
↓ 71 callersMethodinto_iter
(self)
crates/ty_ide/src/lib.rs:122
↓ 71 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:13509
↓ 71 callersMethodmap
(self, f: &F)
crates/ty_python_semantic/src/types/call/bind/constructor.rs:323
↓ 70 callersMethodcurrent_scope
Returns the current top-most [`Scope`].
crates/ruff_python_semantic/src/model.rs:1569
↓ 70 callersMethodentry
(&mut self, item: &dyn FmtDetailed<'db>)
crates/ty_python_semantic/src/types/display.rs:501
↓ 69 callersMethodadd_error
(&mut self, error: ParseErrorType, ranged: T)
crates/ruff_python_parser/src/parser/mod.rs:634
↓ 69 callersMethodappend
For given `line` inserts `string` with `style` after old content of that line, adding lines if needed
crates/ruff_annotate_snippets/src/renderer/styled_buffer.rs:109
↓ 69 callersMethodas_str
(self)
crates/ruff_linter/src/rules/pylint/rules/if_stmt_min_max.rs:198
↓ 69 callersMethoditer
(&self)
crates/ty_python_core/src/place.rs:378
↓ 69 callersMethodproject_path
(&self, relative: impl AsRef<SystemPath>)
crates/ty/tests/file_watching.rs:58
↓ 68 callersFunctionassert_lexed_ranges_match_slices
( directive: Result<Option<NoqaLexerOutput>, LexicalError>, source: &str, )
crates/ruff_linter/src/noqa.rs:1508
↓ 68 callersMethodhas_builtin_binding
Return `true` if `member` is bound as a builtin *in the scope we are currently visiting*. Note that a "builtin binding" does *not* include explicit l
crates/ruff_python_semantic/src/model.rs:381
↓ 68 callersMethodignore_possibly_undefined
Returns the inner type, unless it is definitely undefined.
crates/ty_python_semantic/src/types/member.rs:45
↓ 68 callersFunctionparse_module
Parse a full Python module usually consisting of multiple lines. This is a convenience function that can be used to parse a full Python program witho
crates/ruff_python_parser/src/lib.rs:112
↓ 68 callersMethodwith_range
Returns a new `Span` with the given `range` attached to it.
crates/ruff_db/src/diagnostic/mod.rs:1232
↓ 67 callersFunctionevent_for_file
(name: &str)
crates/ty/tests/file_watching.rs:330
↓ 67 callersMethodlen
Returns the total number of symbols in this collection.
crates/ty_ide/src/symbols.rs:141
↓ 67 callersMethodlen
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:13504
↓ 67 callersMethodor
Returns the union of this constraint set and another. The other constraint set is provided as a thunk, to implement short-circuiting: the thunk is not
crates/ty_python_semantic/src/types/constraints.rs:749
↓ 67 callersMethodpython_file
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:608
↓ 67 callersMethodwith_target_version
(mut self, target_version: PythonVersion)
crates/ruff_linter/src/settings/mod.rs:856
↓ 66 callersMethodbuild
(self)
crates/ty_python_semantic/src/types/tuple.rs:3081
↓ 66 callersMethodremove
(&mut self, file: File)
crates/ty_project/src/files.rs:258
↓ 65 callersMethoddefinition
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class.rs:460
↓ 65 callersMethodimporter
The [`Importer`] for the current file, which enables importing of other modules.
crates/ruff_linter/src/checkers/ast/mod.rs:543
↓ 65 callersMethodjoin
(self, other: Self)
crates/ty_python_semantic/src/types/variance.rs:117
↓ 65 callersMethodmatch_typing_expr
Return `true` if the `Expr` is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:270
↓ 65 callersMethodnot_contains
(&self, unexpected: &str)
crates/ty_ide/src/completion.rs:11860
↓ 65 callersMethodstylist
The [`Stylist`] for the current file, which detects the current line ending, quote, and indentation style.
crates/ruff_linter/src/checkers/ast/mod.rs:533
↓ 65 callersMethodto_specialized_instance
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, specialization: T,
crates/ty_python_semantic/src/types/class/known.rs:1362
↓ 65 callersMethodto_usize
Returns current raw `offset` as usize. # Examples ```rust # use ruff_text_size::*; assert_eq!(TextSize::from(4).to_usize(), 4); ```
crates/ruff_text_size/src/size.rs:90
↓ 64 callersMethodas_bytes
(&self)
crates/ruff_python_trivia/src/cursor.rs:39
↓ 64 callersMethodinsert
Inserts `rule` into the set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; let mut set = RuleSet::empty(); assert!(!set.contains
crates/ruff_linter/src/registry/rule_set.rs:203
↓ 64 callersMethodis_empty
(&self)
crates/ruff_python_formatter/src/statement/stmt_assign.rs:1191
↓ 64 callersMethodis_empty
(&self)
crates/ty_ide/src/docstring/markdown/structured.rs:178
↓ 64 callersMethodis_empty
(&self)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:764
↓ 64 callersMethodis_never
(&self)
crates/ty_python_semantic/src/types.rs:2567
↓ 64 callersMethodjoin
(mut self)
crates/ty_server/src/server/schedule/thread.rs:88
↓ 64 callersFunctionset
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C401.py:49
↓ 64 callersFunctionsetup
(setup_files: F)
crates/ty/tests/file_watching.rs:469
↓ 64 callersMethodsyntax
Returns the syntax node represented by this parsed output.
crates/ruff_python_parser/src/lib.rs:404
↓ 63 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:933
↓ 63 callersMethodfilter
Apply arbitrary filtering to completions.
crates/ty_ide/src/completion.rs:11767
↓ 63 callersMethodpush
(&mut self, value: T)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:24
↓ 62 callersMethodclone
(this: &Self)
crates/ruff_server/src/session/request_queue.rs:154
↓ 62 callersMethodextend
Extend the current region with the results of a speculative [`TypeInferenceBuilder`].
crates/ty_python_semantic/src/types/infer/builder.rs:12874
↓ 62 callersMethodis_empty
Returns `true` if the module imports are empty.
crates/ruff_graph/src/lib.rs:77
↓ 62 callersMethodnode_start
Returns the start position for a node that starts at the current token.
crates/ruff_python_parser/src/parser/mod.rs:280
↓ 62 callersMethodpatch
Suggest to the user an edit to the [`source`][Self::source]
crates/ruff_annotate_snippets/src/snippet.rs:333
↓ 62 callersMethodplace_table
(&self, scope_id: FileScopeId)
crates/ty_python_core/src/lib.rs:387
↓ 61 callersMethodannotated_type
Annotated type of the parameter. If no annotation was provided, this is `Unknown`.
crates/ty_python_semantic/src/types/signatures.rs:6322
↓ 61 callersFunctionany
(exp)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM111.py:121
↓ 61 callersMethodget
Returns the [id](BindingId) of the binding bound to the given name.
crates/ruff_python_semantic/src/scope.rs:73
↓ 61 callersMethodliteral
(self)
crates/ruff_python_ast/src/generated.rs:2983
↓ 61 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/pydocstyle/settings.rs:147
↓ 61 callersMethodvalue_type
(self, db: &'db dyn Db, name: &Name)
crates/ty_python_semantic/src/types/enums.rs:407
↓ 60 callersMethodapply_changes
(&mut self, changes: &[ChangeEvent])
crates/ty/tests/file_watching.rs:244
↓ 60 callersMethodlast
(mut self)
crates/ruff_python_ast/src/nodes.rs:325
↓ 60 callersMethodmax
(self, other: Self)
crates/ty_python_semantic/src/place.rs:48
↓ 60 callersMethodmember
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types.rs:1131
↓ 60 callersMethodmodule
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:941
↓ 60 callersMethodwith_src_files
Specify files to be created in the `src` mock directory
crates/ty_module_resolver/src/testing.rs:132
↓ 59 callersMethodhelp
Adds a "help" sub-diagnostic with the given message. See the closely related [`Diagnostic::info`] method for more details.
crates/ruff_db/src/diagnostic/mod.rs:193
↓ 59 callersMethodinto_boxed_slice
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:13519
↓ 59 callersMethodnext
(&self)
crates/ty_python_semantic/src/types/typevar.rs:971
↓ 59 callersMethodnext
(&mut self)
crates/ty_python_semantic/src/types/infer/builder.rs:13363
↓ 59 callersMethodnode
( self, db: &dyn Db, file: File, module: &'ast ParsedModuleRef, )
crates/ty_python_semantic/src/types/function.rs:386
↓ 59 callersMethodpython_file
(self, db: &'db dyn Db)
crates/ty_python_core/src/scope.rs:30
↓ 59 callersMethodsource
(&self)
crates/ruff_python_formatter/src/context.rs:57
← previousnext →201–300 of 31,766, ranked by callers