MCPcopy Create free account

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

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

↓ 19 callersFunctionis_identifier
Returns `true` if a string is a valid Python identifier (e.g., variable name).
crates/ruff_python_stdlib/src/identifiers.rs:7
↓ 19 callersFunctionis_overload
Returns `true` if a function definition is an `@overload`.
crates/ruff_python_semantic/src/analyze/visibility.rs:30
↓ 19 callersMethodmatches
Returns `true` if the given name matches any of the ignored patterns.
crates/ruff_linter/src/rules/pep8_naming/settings.rs:140
↓ 19 callersMethodnext
(&mut self)
crates/ruff_db/src/system/path.rs:979
↓ 19 callersMethodparse
Parses the content and returns its AST
crates/ruff_wasm/src/lib.rs:505
↓ 19 callersFunctionparse_suite
(source: &str)
crates/ruff_linter/src/rules/pylint/helpers.rs:402
↓ 19 callersMethodpop
(&mut self)
crates/ty_python_semantic/src/types/constraints.rs:7289
↓ 19 callersFunctionpredicate
(index: usize)
crates/ty_python_core/src/narrowing_constraints.rs:425
↓ 19 callersMethodprimary
Add a primary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironmen
crates/ruff_db/src/diagnostic/render.rs:2785
↓ 19 callersFunctionprocess
(__debug__)
crates/ruff_linter/resources/test/fixtures/semantic_errors/write_to_debug.py:3
↓ 19 callersMethodqualified_name
Returns the [`QualifiedName`] of the imported name (e.g., given `from foo import bar as baz`, returns `["foo", "bar"]`).
crates/ruff_python_semantic/src/imports.rs:60
↓ 19 callersMethodrange
Returns the [`TextRange`] for the diagnostic.
crates/ruff_db/src/diagnostic/mod.rs:506
↓ 19 callersFunctionrender_docstring
(raw: &str)
crates/ty_ide/src/docstring/markdown/structured/rst.rs:834
↓ 19 callersMethodscope
(&self)
crates/ty_python_semantic/src/types/context.rs:78
↓ 19 callersMethodseen_typing
(&self)
crates/ruff_python_semantic/src/model.rs:1716
↓ 19 callersMethodsource
(&self)
crates/ruff_linter/src/rules/pep8_naming/settings.rs:63
↓ 19 callersMethodstmt
Generate source code from a [`Stmt`].
crates/ruff_python_codegen/src/generator.rs:140
↓ 19 callersMethodsuffix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1099
↓ 19 callersMethodsum
(iter: I)
crates/ruff_text_size/src/size.rs:216
↓ 19 callersMethodto_notebook_or_file
(&self, db: &dyn Db)
crates/ty_server/src/session.rs:1403
↓ 19 callersMethodtokens
Returns all the tokens for the parsed output.
crates/ruff_python_parser/src/lib.rs:401
↓ 19 callersFunctiontrailing
()
crates/ruff_python_formatter/src/comments/map.rs:643
↓ 19 callersFunctionwalk_stmt
(visitor: &mut V, stmt: &'a Stmt)
crates/ruff_python_ast/src/visitor.rs:135
↓ 18 callersMethodanonymized_line_numbers
Anonymize line numbers This enables (or disables) line number anonymization. When enabled, line numbers are replaced with `LL`. # Example ```text -
crates/ruff_annotate_snippets/src/renderer/mod.rs:99
↓ 18 callersMethodappend
(self)
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_strings__regression.py:109
↓ 18 callersMethodas_function
(&self)
crates/ty_python_core/src/scope.rs:415
↓ 18 callersMethodbinding_id
Returns the [`BindingId`] if this symbol resolves to a concrete binding.
crates/ruff_python_semantic/src/model.rs:44
↓ 18 callersMethodbuild
(self)
crates/ty_python_semantic/src/db.rs:229
↓ 18 callersMethodcollect_publish_diagnostic_notifications
( &mut self, count: usize, )
crates/ty_server/tests/e2e/main.rs:554
↓ 18 callersMethodconstraint_data
(&self, constraint: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:1214
↓ 18 callersMethodcontents
Return the underlying source code.
crates/ruff_linter/src/locator.rs:117
↓ 18 callersMethoddefinition
(&self, id: ScopedDefinitionId)
crates/ty_python_core/src/use_def.rs:946
↓ 18 callersMethodend_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:978
↓ 18 callersMethodenter_node
(&mut self, node: T)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:205
↓ 18 callersMethodexit_node
(&mut self)
crates/ruff_python_ast_integration_tests/tests/visitor.rs:213
↓ 18 callersMethodexplicit_extra_items
Returns extra items only when they were explicitly declared. An implicitly open `TypedDict` returns `None` here because its hidden items are not dire
crates/ty_python_semantic/src/types/typed_dict.rs:95
↓ 18 callersFunctionfile_to_module
(db: &dyn Db, file: File)
crates/ty_module_resolver/src/resolve.rs:294
↓ 18 callersMethodfinish
(self)
crates/ruff_linter/src/rules/pydoclint/rules/check_docstring.rs:915
↓ 18 callersMethodgeneric_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:274
↓ 18 callersMethodhas_leading
(&self, node: T)
crates/ruff_python_formatter/src/comments/mod.rs:272
↓ 18 callersMethodinference_flags
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:11190
↓ 18 callersMethodinsert
(mut self, insert: impl Into<CompactString>)
crates/ty_ide/src/completion.rs:535
↓ 18 callersMethodinto_iter
(self)
crates/ty_site_packages/src/lib.rs:255
↓ 18 callersMethodis_file
(self)
crates/ruff_db/src/system.rs:305
↓ 18 callersMethodis_ipynb
(self)
crates/ruff_python_ast/src/lib.rs:153
↓ 18 callersMethodis_language_services_disabled
(&self)
crates/ty_server/src/session/settings.rs:43
↓ 18 callersMethodis_string_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2318
↓ 18 callersMethodis_triple_quoted
Returns `true` if the current f-string is a triple-quoted f-string.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:75
↓ 18 callersMethoditer_all_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:825
↓ 18 callersMethodkind
(&self)
crates/ty_python_core/src/builder.rs:5025
↓ 18 callersMethodlen
(&self)
crates/ruff_db/src/parsed.rs:477
↓ 18 callersMethodnode_index
Returns the anchor node index for this scope, or `None` for the module scope. This is used to compute relative node indices for expressions within th
crates/ty_python_core/src/scope.rs:441
↓ 18 callersMethodopen
(self, server: &mut TestServer)
crates/ty_server/tests/e2e/notebook.rs:629
↓ 18 callersMethodp
(&mut self, s: &str)
crates/ruff_python_codegen/src/generator.rs:171
↓ 18 callersMethodreport_diagnostic
( &self, context: &CallDiagnosticContext<'_, '_, 'db, '_>, node: ast::AnyNodeRef,
crates/ty_python_semantic/src/types/call/bind.rs:7644
↓ 18 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:5635
↓ 18 callersMethodtry_upcast_to_callable
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/callable.rs:43
↓ 18 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:277
↓ 18 callersMethodvendored
(&self)
crates/ty_module_resolver/src/resolve.rs:1751
↓ 18 callersMethodworkspace_settings
Returns the client settings for the workspace that this document belongs to.
crates/ty_server/src/session.rs:1390
↓ 17 callersMethodas_str
(self)
crates/ty_module_resolver/src/module.rs:363
↓ 17 callersMethodas_str
(self)
crates/ty_ide/src/docstring/markdown/structured.rs:129
↓ 17 callersMethodas_str
(&self)
crates/ruff_linter/src/rules/ruff/rules/unused_noqa.rs:21
↓ 17 callersMethodas_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:1601
↓ 17 callersFunctionbinding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:220
↓ 17 callersFunctioncheck_os_pathlib_single_arg_calls
We check functions that take only 1 argument, this does not apply to functions with `dir_fd` argument, because `dir_fd` is not supported by pathlib,
crates/ruff_linter/src/rules/flake8_use_pathlib/helpers.rs:53
↓ 17 callersFunctioncreate_constraint
( db: &'db dyn Db, builder: &'c ConstraintSetBuilder<'db>, bound_typevar: BoundTypeVar
crates/ty_python_semantic/src/types/constraints.rs:7605
↓ 17 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:635
↓ 17 callersFunctiondelete_stmt
Return the [`Edit`] to use when deleting a [`Stmt`]. In some cases, this is as simple as deleting the [`TextRange`] of the [`Stmt`] itself. However,
crates/ruff_linter/src/fix/edits.rs:39
↓ 17 callersMethoddisplay
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/display.rs:605
↓ 17 callersMethodelement_type
(self, _db: &'db dyn Db)
crates/ty_python_semantic/src/types/tuple.rs:778
↓ 17 callersMethodextension
(&self)
crates/ty_module_resolver/src/path.rs:838
↓ 17 callersMethodfiles
Returns the files belonging to this project.
crates/ty_project/src/lib.rs:613
↓ 17 callersMethodfinish
(self)
crates/ty_python_core/src/place.rs:419
↓ 17 callersMethodfirst_public_binding
(&self, symbol: ScopedSymbolId)
crates/ty_python_core/src/lib.rs:1087
↓ 17 callersMethodfocus_range
Returns the [`FileRange`] of the function's name.
crates/ty_python_semantic/src/types/function.rs:412
↓ 17 callersMethodformat
(&self)
crates/ruff_python_formatter/src/generated.rs:24
↓ 17 callersMethodformat
Whether to enable concise diagnostic output or not.
crates/ruff_db/src/diagnostic/mod.rs:1466
↓ 17 callersMethodget
Looks up a lint by its name.
crates/ty_python_semantic/src/lint.rs:415
↓ 17 callersMethodin_range
Initialize [`NoqaLexer`] in the given range of source text.
crates/ruff_linter/src/noqa.rs:425
↓ 17 callersMethodinterface
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/instance.rs:1119
↓ 17 callersMethodinto_iter
(self)
crates/ruff_linter/src/registry/rule_set.rs:337
↓ 17 callersMethodis_always_false
(self)
crates/ty_python_core/src/lib.rs:949
↓ 17 callersMethodis_ellipsis_literal_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2503
↓ 17 callersMethodlen
Returns the number of rules in this set. ## Examples ```rust # use ruff_linter::registry::{Rule, RuleSet}; assert_eq!(RuleSet::empty().len(), 0); as
crates/ruff_linter/src/registry/rule_set.rs:181
↓ 17 callersMethodmaterialization_kind
(self)
crates/ty_python_semantic/src/types.rs:8092
↓ 17 callersMethodname
(self, db: &'db dyn Db, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/scope.rs:59
↓ 17 callersMethodnode
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1444
↓ 17 callersMethodnode_level
(&self)
crates/ruff_python_formatter/src/context.rs:65
↓ 17 callersMethodparamspec_attr
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/typevar.rs:906
↓ 17 callersMethodpath
Returns the relative path as specified by the user.
crates/ty_project/src/metadata/value.rs:53
↓ 17 callersMethodplace_id
Returns the [`ScopedPlaceId`] of the place expression.
crates/ty_python_core/src/place.rs:247
↓ 17 callersMethodprefix
Return the prefix for the [`NoqaCode`], e.g., `SIM` for `SIM101`.
crates/ruff_linter/src/codes.rs:19
↓ 17 callersMethodremove_file
(self, db: &mut dyn Db, file: File)
crates/ty_project/src/lib.rs:520
↓ 17 callersFunctionrename
Perform a rename operation on the symbol at the given position. Returns all locations that need to be updated with the new name.
crates/ty_ide/src/rename.rs:51
↓ 17 callersMethodreturn_type
Compute the overall effective return type of this `ConstructorBinding`.
crates/ty_python_semantic/src/types/call/bind/constructor.rs:210
↓ 17 callersMethodsearch
Returns a sequence of symbols that matches the given query.
crates/ty_ide/src/symbols.rs:152
↓ 17 callersMethodshrink_to_fit
(&mut self)
crates/ty_python_semantic/src/types/diagnostic.rs:1331
↓ 17 callersFunctionsite_packages_directories_from_sys_prefix
Attempt to retrieve the `site-packages` directories associated with a given Python installation. The location of the `site-packages` directories can
crates/ty_site_packages/src/lib.rs:1597
↓ 17 callersMethodsnapshot
(&self)
crates/ruff_python_parser/src/parser/scratch_buffer.rs:38
← previousnext →701–800 of 27,807, ranked by callers