MCPcopy Create free account

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

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

↓ 24 callersMethodcontains
Return `true` if the given version is required.
crates/ruff_linter/src/settings/types.rs:643
↓ 24 callersFunctioncreate_dir
Helper function to create a directory and all parent directories
crates/ruff_linter/src/rules/isort/categorize.rs:448
↓ 24 callersMethoddefault_type
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:411
↓ 24 callersMethodeat_while
(&mut self, mut predicate: impl FnMut(char) -> bool)
crates/ruff_python_trivia/src/cursor.rs:163
↓ 24 callersMethodextend
(&mut self, it: T)
crates/ty_ide/src/completion.rs:296
↓ 24 callersMethodfiles
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callersMethodinterior_node_data
(&self, node: NodeId)
crates/ty_python_semantic/src/types/constraints.rs:1439
↓ 24 callersMethodinto_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:117
↓ 24 callersMethodis_end_of_line
(self)
crates/ruff_python_trivia/src/comments.rs:101
↓ 24 callersMethodis_file
(self)
crates/ruff_db/src/system.rs:334
↓ 24 callersMethodis_unknown
(&self)
crates/ty_python_semantic/src/types.rs:2555
↓ 24 callersMethodisolate
(mut self, isolation: IsolationLevel)
crates/ruff_diagnostics/src/fix.rs:169
↓ 24 callersMethodknown
Create a [`NamedTupleSpec`] with the given fields.
crates/ty_python_semantic/src/types/class/named_tuple.rs:587
↓ 24 callersMethodline_start
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:63
↓ 24 callersMethodmatching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4661
↓ 24 callersMethodname
(&self)
crates/ty_python_semantic/src/lint.rs:94
↓ 24 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:272
↓ 24 callersMethodoptions
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callersMethodparamspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1088
↓ 24 callersMethodpath
(&self)
crates/ruff_db/src/system.rs:362
↓ 24 callersMethodprefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1225
↓ 24 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/generics.rs:782
↓ 24 callersMethodprogram_file
(&self)
crates/ty_python_semantic/src/types/dedicated/pytest/collection.rs:1204
↓ 24 callersMethodpush
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:503
↓ 24 callersMethodrange
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3075
↓ 24 callersMethodreferences
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:487
↓ 24 callersFunctionresolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:65
↓ 24 callersMethodscope
Returns the scope in which this dynamic `TypedDict` was created.
crates/ty_python_semantic/src/types/class/typed_dict.rs:941
↓ 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:11724
↓ 24 callersMethodsource
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callersMethodtake_salsa_events
Takes the salsa events.
crates/ty_python_semantic/src/db.rs:119
↓ 24 callersFunctiontest_contents
A convenient wrapper around [`check_path`], that additionally asserts that fixes converge after a fixed number of iterations.
crates/ruff_linter/src/test.rs:244
↓ 24 callersMethodto_type
(&self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/callable.rs:1154
↓ 24 callersMethoduv_environments
(&self)
crates/ty_project/src/db.rs:709
↓ 24 callersMethodwrite_files_all
Writes the files to the file system. The operation overrides existing files with the same normalized path. Enclosing directories are automatically c
crates/ruff_db/src/system/memory_fs.rs:212
↓ 23 callersFunctionabsolute
(path: &str)
crates/ty_project/src/uv/metadata/dependencies.rs:350
↓ 23 callersMethodadd_python_cell
(&mut self, content: &str)
crates/ty_server/tests/e2e/notebook.rs:809
↓ 23 callersMethodapply_optional_specialization
( self, db: &'db dyn Db, specialization: Option<Specialization<'db>>, )
crates/ty_python_semantic/src/types/class/static_literal.rs:646
↓ 23 callersMethodas_function
(&self)
crates/ty_python_core/src/scope.rs:426
↓ 23 callersMethodas_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 23 callersFunctionbool
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM210.py:12
↓ 23 callersMethodbuild
(self)
crates/ty_python_semantic/src/db.rs:290
↓ 23 callersMethodcontext
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 23 callersMethoddb
Returns the underlying test DB.
crates/ty_ide/src/completion.rs:11672
↓ 23 callersMethodfile_name
(&self)
crates/ruff_db/src/system/path.rs:279
↓ 23 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callersMethodfunc
(self)
crates/ruff_linter/resources/test/fixtures/pyflakes/F811_26.py:2
↓ 23 callersMethodget
(&self, name: &str)
crates/ruff_db/src/system/command.rs:122
↓ 23 callersMethodinfo
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callersMethodis_disjoint_from
Returns whether these literal types are known to have no value in common.
crates/ty_python_semantic/src/types/literal.rs:190
↓ 23 callersMethodis_lint_enabled
(&self, lint: &'static LintMetadata)
crates/ty_python_semantic/src/types/context.rs:319
↓ 23 callersMethodis_match
(&self, banned_module: &str)
crates/ruff_linter/src/rules/flake8_tidy_imports/matchers.rs:10
↓ 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:84
↓ 23 callersMethodis_self
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:332
↓ 23 callersMethodis_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2318
↓ 23 callersMethoditer_positive
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/set_theoretic.rs:1496
↓ 23 callersMethodleading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:299
↓ 23 callersMethodload
Loads a reference to the parsed module. Note that holding on to the reference will prevent garbage collection of the AST. This method will reparse th
crates/ruff_db/src/parsed.rs:139
↓ 23 callersMethodmatch_typing_qualified_name
Return `true` if the call path is a reference to `typing.${target}`.
crates/ruff_python_semantic/src/model.rs:281
↓ 23 callersMethodmember_lookup_with_policy
Similar to [`Type::member`], but allows the caller to specify what policy should be used when looking up attributes. See [`MemberLookupPolicy`] for mo
crates/ty_python_semantic/src/types.rs:6032
↓ 23 callersMethodskip_auto_import
When set, symbols that aren't in scope but available in the environment will NOT be included. Auto-import is enabled by default. So one must opt into
crates/ty_ide/src/completion.rs:11687
↓ 23 callersMethodsource
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 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:202
↓ 23 callersMethodsuffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1236
↓ 23 callersMethoduri
(&self)
crates/ty_server/src/document/notebook.rs:65
↓ 23 callersMethodwrite_file
( &self, path: impl AsRef<SystemPath>, content: impl AsRef<str>, )
crates/ty_server/tests/e2e/main.rs:860
↓ 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:3883
↓ 22 callersMethodannotation
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/protocol_class.rs:1394
↓ 22 callersMethodas_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:2318
↓ 22 callersMethodbases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:34
↓ 22 callersMethodclass_specialization
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1306
↓ 22 callersMethodcontains
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:165
↓ 22 callersMethodencoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1581
↓ 22 callersMethodget
(&self, index: usize)
crates/ty_python_core/src/frozen.rs:29
↓ 22 callersMethodis_ascii
Returns `true` if the text only consists of ASCII characters
crates/ruff_source_file/src/line_index.rs:227
↓ 22 callersMethodis_file
(self)
crates/ty_project/src/watch.rs:191
↓ 22 callersFunctionis_identifier
Returns `true` if a string is a valid Python identifier (e.g., variable name).
crates/ruff_python_stdlib/src/identifiers.rs:7
↓ 22 callersMethodis_known
Returns whether this is a known class.
crates/ty_python_semantic/src/types/class.rs:804
↓ 22 callersMethoditer_all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:999
↓ 22 callersMethodlen
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/render.rs:2503
↓ 22 callersMethodlen
(&self)
crates/ruff_db/src/parsed.rs:541
↓ 22 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:575
↓ 22 callersMethodor
(self, other: Self)
crates/ty_python_core/src/lib.rs:1082
↓ 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:628
↓ 22 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
↓ 22 callersFunctionpredicate
(index: usize)
crates/ty_python_core/src/narrowing_constraints.rs:457
↓ 22 callersMethodpython_file
(&self)
crates/ty_python_semantic/src/semantic_model.rs:74
↓ 22 callersMethodquery
(&self)
crates/ruff_server/src/session.rs:249
↓ 22 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:1887
↓ 22 callersMethodsource
(&self)
crates/ruff_linter/src/rules/pep8_naming/settings.rs:63
↓ 22 callersMethodto_lsp_range
( &self, db: &dyn Db, file: File, encoding: PositionEncoding, )
crates/ty_server/src/document/range.rs:306
↓ 22 callersMethodtry_call_dunder
Look up a dunder method on the meta-type of `self` and call it. Returns an `Err` if the dunder method can't be called, or the given arguments are not
crates/ty_python_semantic/src/types.rs:8477
↓ 22 callersMethodtry_to_class_literal
Look up a [`KnownClass`] in its canonical module and return a [`Type`] representing that class literal. If the class cannot be found, a debug-level l
crates/ty_python_semantic/src/types/class/known.rs:1449
↓ 22 callersMethodwith_preview_mode
(mut self)
crates/ruff_linter/src/settings/mod.rs:862
↓ 21 callersMethodas_symbol
Returns `Some` if the reference is a `Symbol`, otherwise `None`.
crates/ty_python_core/src/place.rs:112
↓ 21 callersFunctionassert_function_query_was_not_run
( db: &Db, query: Q, input: I, events: &[salsa::Event], )
crates/ruff_db/src/testing.rs:6
↓ 21 callersMethodchange_text_document
Send a `textDocument/didChange` notification with the given content changes
crates/ty_server/tests/e2e/main.rs:909
↓ 21 callersMethodcodegen_stylist
(&self, stylist: &'a Stylist)
crates/ruff_linter/src/fix/codemods.rs:28
↓ 21 callersFunctioncreate_diagnostics
Create Ruff-style diagnostics for testing the various output formats.
crates/ruff_db/src/diagnostic/render.rs:2968
↓ 21 callersMethoddefault_specialization
Returns the default specialization for this class. For static classes, this applies default type arguments. For dynamic classes, this returns a non-g
crates/ty_python_semantic/src/types/class.rs:812
← previousnext →701–800 of 31,766, ranked by callers