MCPcopy Create free account

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

Functions29,290 in github.com/astral-sh/ruff

↓ 24 callersMethodas_str
Returns the python code as a `str`.
crates/ruff_db/src/source.rs:75
↓ 24 callersFunctionbinding_type
Infer the type of a binding.
crates/ty_python_semantic/src/types.rs:228
↓ 24 callersMethodcontext
Returns the context used during formatting.
crates/ruff_formatter/src/lib.rs:305
↓ 24 callersMethodeat_while
Eats symbols while predicate returns true or until the end of file is reached.
crates/ruff_python_trivia/src/cursor.rs:147
↓ 24 callersMethodend_of_scope_symbol_bindings
( &self, symbol: ScopedSymbolId, )
crates/ty_python_core/src/use_def.rs:1004
↓ 24 callersFunctionfile_to_module
( db: &'db dyn Db, resolver_file: ResolverFile<'db>, )
crates/ty_module_resolver/src/resolve.rs:344
↓ 24 callersMethodfiles
(&self)
crates/mdtest/src/parser.rs:147
↓ 24 callersFunctionfmt
(old: int, new: int, *, greater_is_better: bool = True)
scripts/conformance.py:764
↓ 24 callersMethodfull_range
(&self, db: &dyn Db)
crates/ty_python_semantic/src/types/definition.rs:42
↓ 24 callersMethodgetLogger
(self)
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG002.py:20
↓ 24 callersFunctioninfer_definition_types
( db: &'db dyn Db, definition: Definition<'db>, )
crates/ty_python_semantic/src/types/infer.rs:137
↓ 24 callersMethodinner
( builder: &mut TypeInferenceBuilder<'db, '_>, subscript: &ast::ExprSubscript,
crates/ty_python_semantic/src/types/infer/builder/type_expression.rs:2053
↓ 24 callersMethodinto_iter
(self)
crates/ruff_linter/src/rules/flake8_tidy_imports/rules/banned_module_level_imports.rs:117
↓ 24 callersMethodinto_owned
(self)
crates/ty_python_semantic/src/types/signatures.rs:5285
↓ 24 callersMethodis_always_false
(self)
crates/ty_python_core/src/lib.rs:949
↓ 24 callersMethodis_directory
(&self, resolver: &ResolverContext)
crates/ty_module_resolver/src/path.rs:94
↓ 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:157
↓ 24 callersMethoditer_source_order
Returns an iterator over the patterns and keywords in source order.
crates/ruff_python_ast/src/nodes.rs:2994
↓ 24 callersMethodlen_utf8
(self)
crates/ty_python_semantic/src/suppression.rs:499
↓ 24 callersMethodmaterialization_kind
Returns the pending materialization of a class-based protocol, if any.
crates/ty_python_semantic/src/types/instance.rs:1264
↓ 24 callersMethodoptions
(&self)
crates/ruff_python_formatter/src/context.rs:134
↓ 24 callersMethodrange
(&self)
crates/ruff_python_parser/src/parser/expression.rs:3083
↓ 24 callersMethodreferences
( self, semantic: &'a SemanticModel<'a>, )
crates/ruff_linter/src/rules/flake8_pyi/rules/custom_type_var_for_self.rs:487
↓ 24 callersFunctionsingle
(other: Annotated[str, Depends(something_else)])
crates/ruff_linter/resources/test/fixtures/fastapi/FAST003.py:159
↓ 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:11231
↓ 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:11246
↓ 24 callersMethodsource
(&self)
crates/ruff_linter/src/rules/flake8_pytest_style/settings.rs:110
↓ 24 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/cyclic.rs:181
↓ 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:684
↓ 23 callersMethodas_tuple_expr
(&self)
crates/ruff_python_ast/src/generated.rs:2754
↓ 23 callersMethodcmp
(&self, other: &Self)
crates/ty_python_semantic/src/types/literal.rs:341
↓ 23 callersMethodcomponents
(&self)
crates/ty_module_resolver/src/module_name.rs:83
↓ 23 callersMethodconcrete_base_type
Walk the `NewTypeBase` chain to find the underlying non-newtype `Type`. There might not be one if this `NewType` is cyclical, and we fall back to `obj
crates/ty_python_semantic/src/types/newtype.rs:111
↓ 23 callersMethodcontains
Return `true` if the given version is required.
crates/ruff_linter/src/settings/types.rs:657
↓ 23 callersMethodexpect_type
(self)
crates/ty_python_semantic/src/place.rs:306
↓ 23 callersMethodextend
(&mut self, it: T)
crates/ty_ide/src/completion.rs:295
↓ 23 callersMethodfile_name
(&self)
crates/ruff_db/src/system/path.rs:265
↓ 23 callersFunctionfoo
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B031.py:188
↓ 23 callersMethodin_stub
(&self)
crates/ty_python_semantic/src/types/infer/builder.rs:927
↓ 23 callersMethodinfo
(self, message)
crates/ruff_linter/resources/test/fixtures/mccabe/C901.py:132
↓ 23 callersMethodinto_iter
(self)
crates/ty_python_semantic/src/types/infer/builder.rs:12348
↓ 23 callersMethodis_empty
(&self)
crates/ruff_python_ast/src/name.rs:457
↓ 23 callersMethodis_never_satisfied
Returns whether this constraint set never holds.
crates/ty_python_semantic/src/types/constraints.rs:513
↓ 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 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 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:240
↓ 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 callersMethodprefix_elements
(&self)
crates/ty_python_semantic/src/types/tuple.rs:1232
↓ 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:311
↓ 23 callersFunctionresolve_module
Resolves a module name to a module.
crates/ty_module_resolver/src/resolve.rs:60
↓ 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:192
↓ 23 callersMethodto_owned
(&self)
crates/ruff_index/src/slice.rs:197
↓ 23 callersMethoduri
(&self)
crates/ty_server/src/document/notebook.rs:65
↓ 23 callersMethodwith_site_packages_files
Specify files to be created in the `site-packages` mock directory
crates/ty_module_resolver/src/testing.rs:133
↓ 22 callersMethodadd_positive_in_place
(&mut self, ty: Type<'db>)
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1242
↓ 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:3696
↓ 22 callersMethodalways
(&self)
crates/ty_python_semantic/src/types/relation.rs:1148
↓ 22 callersMethodbases
Return an iterator over the bases of the class.
crates/ruff_python_ast/src/nodes.rs:33
↓ 22 callersMethodcontains
(self, offset: TextSize)
crates/ruff_text_size/src/range.rs:165
↓ 22 callersMethodfile_scope
(self, db: &'db dyn Db)
crates/ty_python_core/src/definition.rs:100
↓ 22 callersMethodgeneric_context
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:365
↓ 22 callersMethodhas_known_class
Returns whether this is a nominal instance of a particular [`KnownClass`].
crates/ty_python_semantic/src/types/instance.rs:269
↓ 22 callersMethodinto_class
(self)
crates/ty_python_semantic/src/types/class_base.rs:355
↓ 22 callersMethodis_unknown
(&self)
crates/ty_python_semantic/src/types.rs:1894
↓ 22 callersMethoditer_mut
( &mut self, )
crates/ty_python_core/src/frozen.rs:18
↓ 22 callersMethodlen
Length of this annotation as displayed in the stderr output
crates/ruff_annotate_snippets/src/renderer/render.rs:2503
↓ 22 callersMethodnext
(&mut self)
crates/ruff_python_formatter/src/comments/map.rs:573
↓ 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 callersMethodprogram_environment
(&self)
crates/ty_python_semantic/src/types/constraints/sequents.rs:1336
↓ 22 callersMethodpush
(&mut self, bindings: &Bindings)
crates/ty_python_core/src/use_def.rs:479
↓ 22 callersMethodquery
(&self)
crates/ruff_server/src/session.rs:226
↓ 22 callersMethodresolver_file
Returns the resolver key for this file.
crates/ty_python_core/src/program_file.rs:85
↓ 22 callersMethodroot
(&self)
crates/ty/tests/cli/main.rs:981
↓ 22 callersMethodsource
(&self)
crates/ruff_linter/src/rules/isort/settings.rs:204
↓ 22 callersMethodtry_upcast_to_callable
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types/callable.rs:44
↓ 22 callersMethodwith_file
( mut self, path: &'a (impl AsRef<SystemPath> + ?Sized), content: &'a str,
crates/ty_python_semantic/src/db.rs:257
↓ 21 callersMethodas_class_literal
(self)
crates/ty_python_semantic/src/types.rs:2356
↓ 21 callersMethodas_function
(&self)
crates/ty_python_core/src/scope.rs:427
↓ 21 callersMethodas_type
(self, db: &'db dyn Db, env: &ProgramEnvironment<'db>)
crates/ty_python_semantic/src/types/typevar.rs:1979
↓ 21 callersMethodbuild
(self)
crates/ty_python_semantic/src/db.rs:275
↓ 21 callersMethodcodegen_stylist
(&self, stylist: &'a Stylist)
crates/ruff_linter/src/fix/codemods.rs:28
↓ 21 callersMethoddrain
(&mut self, range: R)
crates/ruff_index/src/vec.rs:42
↓ 21 callersMethodencoding
Returns the position encoding that was negotiated during initialization.
crates/ty_server/src/session.rs:1397
↓ 21 callersMethodfile_name
(&self)
crates/ty_project/src/watch.rs:73
↓ 21 callersFunctioninfer_same_file_expression_type
Infers the type of an `expression` that is guaranteed to be in the same file as the calling query. This is a small helper around [`infer_expression_t
crates/ty_python_semantic/src/types/infer.rs:509
↓ 21 callersMethodis_empty
Returns `true` if there are no fixes in the map.
crates/ruff/src/diagnostics.rs:136
↓ 21 callersMethodis_file
(self)
crates/ruff_db/src/system.rs:325
↓ 21 callersMethodkind
(&self)
crates/ty_python_core/src/builder.rs:5868
↓ 21 callersMethodline_column
(&self, offset: TextSize)
crates/ruff_source_file/src/lib.rs:39
↓ 21 callersMethodline_start
(&self, line: OneIndexed)
crates/ruff_source_file/src/lib.rs:63
↓ 21 callersMethodmatching_overloads
Returns an iterator over all the overloads that matched for this call binding.
crates/ty_python_semantic/src/types/call/bind.rs:4390
↓ 21 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:4825
↓ 21 callersMethodnext
(&mut self)
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:343
↓ 21 callersFunctionparse_suite
(source: &str)
crates/ruff_linter/src/rules/mccabe/rules/function_is_too_complex.rs:197
↓ 21 callersMethodpath
(&self)
crates/ruff_db/src/system.rs:353
↓ 21 callersMethodpreceding_node
Returns the comment's preceding node. The direct child node (ignoring lists) of the [`enclosing_node`](DecoratedComment::enclosing_node) that precede
crates/ruff_python_formatter/src/comments/visitor.rs:255
↓ 21 callersMethodpush
(&mut self, value: T)
crates/ruff_formatter/src/printer/stack.rs:18
← previousnext →601–700 of 29,290, ranked by callers