MCPcopy Create free account

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

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

↓ 5 callersMethodremove_inferable_typevar_artifacts_from_solution
Remove inferable type variables introduced by transitivity within the target's binding context while preserving intentional relationships to other gen
crates/ty_python_semantic/src/types/generics.rs:3370
↓ 5 callersMethodrender
Render a diagnostic [`Report`]
crates/ruff_annotate_snippets/src/renderer/mod.rs:202
↓ 5 callersFunctionrender_html
(result: Result, command: RuffCommand, title: str)
python/ruff-ecosystem/ruff_ecosystem/html.py:28
↓ 5 callersFunctionrender_inline_text
Escapes underscores and HTML-sensitive characters in prose outside inline code spans. For example, `__init__` becomes `\_\_init\_\_`, while `` `__ini
crates/ty_ide/src/docstring/markdown/general/inline.rs:537
↓ 5 callersMethodreport_invalid
(&mut self, diagnostic: Diagnostic)
crates/ty_project/src/script.rs:384
↓ 5 callersMethodrequired_applicability
(&self)
crates/ruff_linter/src/settings/types.rs:162
↓ 5 callersMethodreserve_exact
Reserves capacity for at least `additional` more bindings.
crates/ruff_python_semantic/src/binding.rs:469
↓ 5 callersMethodresize
(&mut self, new_len: usize, value: T)
crates/ruff_index/src/vec.rs:79
↓ 5 callersMethodresolve
Resolve a set of globs, anchored at a given root.
crates/ruff/src/commands/analyze_graph.rs:246
↓ 5 callersMethodresolve
(self, path: &Path)
crates/ruff_workspace/src/resolver.rs:87
↓ 5 callersFunctionresolve_imported_module_path
Given an imported module (based on its relative import level and module name), return the fully-qualified module path.
crates/ruff_python_ast/src/helpers.rs:1091
↓ 5 callersFunctionresolve_module_confident
( db: &'db ProjectDatabase, module_name: &ModuleName, )
crates/ty/tests/file_watching.rs:45
↓ 5 callersFunctionresolve_module_query
( db: &'db dyn Db, module_name: ModuleNameIngredient<'db>, )
crates/ty_module_resolver/src/resolve.rs:256
↓ 5 callersFunctionresolve_root_settings
Extract the [`Settings`] from a given `pyproject.toml` and process the configuration with the given [`ConfigurationTransformer`].
crates/ruff_workspace/src/resolver.rs:444
↓ 5 callersFunctionresolve_solution
Resolves only dependencies with selected, acyclic solutions. The result has the same order as `solution`; references outside `inferable` retain their
crates/ty_python_semantic/src/types/constraints/resolution.rs:34
↓ 5 callersMethodretained_constraint_index
(&self, id: ConstraintId)
crates/ty_python_semantic/src/types/constraints.rs:370
↓ 5 callersMethodrule
(self)
crates/ty_python_semantic/src/types/overrides.rs:1570
↓ 5 callersFunctionrun
( command: list[str], *, environment: dict[str, str], allowed_exit_codes: tuple[int, ...] = (0
scripts/build_ruff_pgo.py:567
↓ 5 callersFunctionrun
(argv: Sequence[str])
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30_isort.py:51
↓ 5 callersFunctionrun_corpus_tests
(pattern: &str)
crates/ty_python_semantic/tests/corpus.rs:76
↓ 5 callersFunctionrun_uv
Runs uv in the test's project directory with its configured executable and environment.
crates/ty/tests/file_watching.rs:4401
↓ 5 callersMethodsame_divergent_marker
Returns `true` if both types reference the same recursive query, or both represent pending narrowing, regardless of materialization state.
crates/ty_python_semantic/src/types.rs:2503
↓ 5 callersMethodsaturating_add
(self, rhs: usize)
crates/ruff_source_file/src/line_index.rs:611
↓ 5 callersMethodscope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/named_tuple.rs:206
↓ 5 callersMethodscope
Returns the scope in which this dynamic class was created.
crates/ty_python_semantic/src/types/class/dynamic_literal.rs:177
↓ 5 callersMethodscope_ids
(&self)
crates/ty_python_core/src/lib.rs:497
↓ 5 callersFunctionscript
(db: &dyn Db, file: File)
crates/ty_project/src/script.rs:96
↓ 5 callersMethodscript_files
Returns all scripts in the project, including explicitly opened scripts. Scripts are identified solely by the presence of a PEP 723 script metadata b
crates/ty_project/src/lib.rs:822
↓ 5 callersMethodsecondary
Add a secondary annotation with a message. If the message is empty, then an annotation without any message be created. See the docs on `TestEnvironm
crates/ruff_db/src/diagnostic/render.rs:2802
↓ 5 callersMethodserialize
(&self, serializer: S)
crates/ruff_linter/src/codes.rs:78
↓ 5 callersMethodset
(self, key: Key, flag: int, *, recursive: bool)
crates/ruff_benchmark/resources/tomllib/_parser.py:164
↓ 5 callersMethodset_check_mode
Set the check mode for the project.
crates/ty_project/src/db.rs:269
↓ 5 callersMethodset_included_paths
(self, db: &mut dyn Db, paths: Vec<SystemPathBuf>)
crates/ty_project/src/lib.rs:611
↓ 5 callersMethodset_invalid_type_annotation
(&mut self)
crates/ty_python_semantic/src/types/display.rs:420
↓ 5 callersMethodset_return_type
(&mut self, return_ty: Type<'db>)
crates/ty_python_semantic/src/types/call/bind.rs:9419
↓ 5 callersFunctionsettings_toml
Return the path to the `pyproject.toml` or `ruff.toml` file in a given directory.
crates/ruff_workspace/src/pyproject.rs:84
↓ 5 callersMethodseverity
(&self)
crates/ty_wasm/src/lib.rs:948
↓ 5 callersMethodshadows_any
Returns `true` if `self` shadows any global, nonlocal, or local symbol, keyword, or builtin.
crates/ruff_linter/src/renamer.rs:434
↓ 5 callersFunctionshadows_builtin
( name: &str, source_type: PySourceType, ignorelist: &[String], python_version: PythonVersion,
crates/ruff_linter/src/rules/flake8_builtins/helpers.rs:5
↓ 5 callersMethodshrink_to_fit
(&mut self, members: &IndexVec<ScopedMemberId, Member>)
crates/ty_python_core/src/member.rs:525
↓ 5 callersFunctionsingleton_pattern_type
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, singleton: ast::Singleton, )
crates/ty_python_semantic/src/types/match_pattern.rs:66
↓ 5 callersMethodsource_overload_index
Returns the overload's source position in the defining function's overload list.
crates/ty_python_semantic/src/types/call/bind.rs:9259
↓ 5 callersMethodspecialization_of
If the type is a specialized instance of the given class, returns the specialization.
crates/ty_python_semantic/src/types.rs:2872
↓ 5 callersFunctionspecialization_variance
( db: &'db dyn Db, bound_typevar: BoundTypeVarInstance<'db>, )
crates/ty_python_semantic/src/types/generics.rs:2162
↓ 5 callersFunctionstart_of_file
()
crates/ruff_python_importer/src/insertion.rs:404
↓ 5 callersMethodstatement
(self)
crates/ruff_python_formatter/src/statement/suite.rs:902
↓ 5 callersMethodstatic_member
Access an attribute of this type without invoking the descriptor protocol. This method corresponds to `inspect.getattr_static(<object of type 'self'>,
crates/ty_python_semantic/src/types.rs:5032
↓ 5 callersMethodstore_type_expression_flags
Store metadata for a type expression.
crates/ty_python_semantic/src/types/infer/builder.rs:1103
↓ 5 callersMethodsub
Adds a sub-diagnostic constructed with this diagnostic's environment.
crates/ruff_db/src/diagnostic/render.rs:2844
↓ 5 callersMethodsummary_line
Summary line without the trailing newline characters
crates/ruff_linter/src/docstrings/sections.rs:374
↓ 5 callersFunctionsymbol_definition
Returns the definition to use as the secondary annotation for an overridden symbol.
crates/ty_python_semantic/src/types/overrides.rs:1878
↓ 5 callersMethodsystem_virtual_path_to_document
( &self, path: &SystemVirtualPath, )
crates/ty_server/src/system.rs:158
↓ 5 callersMethodtarget
(&self)
crates/ty_ide/src/inlay_hints.rs:330
↓ 5 callersMethodtarget_range
Returns the [`TextRange`] of the definition target. A definition target would mainly be the node representing the place being defined i.e., [`ast::Ex
crates/ty_python_core/src/definition.rs:1032
↓ 5 callersFunctionthis
r""" 'hey ho'
crates/ruff_python_formatter/resources/test/fixtures/black/cases/docstring.py:85
↓ 5 callersMethodto_program_settings
( &self, system: &dyn System, vendored: &VendoredFileSystem, strategy: &Strate
crates/ty_project/src/metadata.rs:573
↓ 5 callersFunctionto_snake_case
Converts CamelCase to snake_case
crates/ruff_python_ast/generate.py:91
↓ 5 callersMethodtop
(&mut self)
crates/mdtest/src/parser.rs:482
↓ 5 callersMethodtouch
Sets the last modified timestamp of the file stored at `path` to now. Creates a new file if the file at `path` doesn't exist.
crates/ruff_db/src/system/memory_fs.rs:314
↓ 5 callersFunctiontouch_directory
(paths: &mut RwLockWriteGuard<BTreeMap<Utf8PathBuf, Entry>>, path: &Utf8Path)
crates/ruff_db/src/system/memory_fs.rs:507
↓ 5 callersFunctiontransform_expression
Run a transformation function over an expression. Passing an expression to [`match_expression`] directly can lead to parse errors if the expression i
crates/ruff_linter/src/cst/matchers.rs:244
↓ 5 callersMethodtriple_quotes
Returns the triple quotes for the current f-string if it is a triple-quoted f-string, `None` otherwise.
crates/ruff_python_parser/src/lexer/interpolated_string.rs:61
↓ 5 callersMethodtrivia
(&self)
crates/ruff_python_formatter/src/context.rs:81
↓ 5 callersMethodtry_expression
( &self, expression_key: impl Into<ExpressionNodeKey>, )
crates/ty_python_core/src/lib.rs:750
↓ 5 callersMethodtry_mro_ancestors
( self, db: &'db dyn Db, )
crates/ty_python_semantic/src/types/class.rs:540
↓ 5 callersMethodtry_node_scope
Returns the id of the scope that `node` creates, if it exists.
crates/ty_python_core/src/lib.rs:785
↓ 5 callersMethodtry_system
Tries to look up the file for the given system path, returns `None` if no such file exists yet
crates/ruff_db/src/files.rs:168
↓ 5 callersMethodtry_upcast_to_callable_with_policy
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, policy: UpcastPolicy,
crates/ty_python_semantic/src/types/callable.rs:202
↓ 5 callersMethodty
(mut self, ty: impl Into<Option<Type<'db>>>)
crates/ty_ide/src/completion.rs:589
↓ 5 callersMethodty
Returns the semantic type of this base entry.
crates/ty_python_semantic/src/types/class/static_literal.rs:3490
↓ 5 callersMethodtyped_dict_module
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:1112
↓ 5 callersMethodtyping_self_type
Returns the type that replaces any `typing.Self` annotations in the bound method signature.
crates/ty_python_semantic/src/types/method.rs:220
↓ 5 callersMethodunion
A union can invoke either target, so either target can contribute a deprecation.
crates/ty_python_semantic/src/types/infer/builder/attribute_assignment.rs:179
↓ 5 callersMethodunion
(mut self, other: &Self)
crates/ruff_linter/src/registry/rule_set.rs:84
↓ 5 callersMethodunion_expected_types
(&mut self, expected_types: &FxHashMap<ExpressionNodeKey, Type<'db>>)
crates/ty_python_semantic/src/types/infer/builder.rs:7247
↓ 5 callersMethodunknown_specialization
Returns the unknown specialization of this class. For non-generic classes, the class is returned unchanged. For a non-specialized generic class, we re
crates/ty_python_semantic/src/types/class/static_literal.rs:683
↓ 5 callersFunctionunwrapped_call_argument
Returns source code that replaces a call with one of its arguments. Preserve the argument's optional parentheses, including any comments inside them.
crates/ruff_python_edits/src/call.rs:18
↓ 5 callersMethodupdate_file_watcher
(&mut self, client: &Client)
crates/ty_server/src/session.rs:1166
↓ 5 callersMethodupdated_implementation_callables
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/function.rs:1312
↓ 5 callersMethoduri_for_key
(&'a self, key: &'a DocumentKey)
crates/ruff_server/src/session/index.rs:357
↓ 5 callersMethoduse_uv
Returns which uv integrations are enabled for this project.
crates/ty_project/src/metadata.rs:393
↓ 5 callersMethoduses_pep_484_positional_only_convention
Return `true` if the parameter name uses the pre-PEP-570 convention (specified in PEP 484) to indicate to a type checker that it should be treated as
crates/ruff_python_ast/src/nodes.rs:3644
↓ 5 callersMethodvalue_type
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/type_alias.rs:236
↓ 5 callersMethodvendored
(&self)
crates/ty_project/src/db.rs:676
↓ 5 callersMethodvisit
Visits the nodes in the case header.
crates/ruff_python_formatter/src/statement/clause.rs:108
↓ 5 callersMethodvisit_arguments
(&mut self, arguments: &'a Arguments)
crates/ruff_python_ast/src/visitor.rs:57
↓ 5 callersMethodvisit_boolean_test
Visit an [`Expr`], and treat it as a boolean test. This is useful for detecting whether an expressions return value is significant, or whether the cal
crates/ruff_linter/src/checkers/ast/mod.rs:2797
↓ 5 callersMethodvisit_type
(&self, db: &'db dyn Db, ty: Type<'db>)
crates/ty_python_semantic/src/types/constraints/resolution.rs:175
↓ 5 callersFunctionwalk_decorator
(visitor: &mut V, decorator: &'a Decorator)
crates/ruff_python_ast/src/visitor.rs:358
↓ 5 callersFunctionwalk_except_handler
( visitor: &mut V, except_handler: &'a ExceptHandler, )
crates/ruff_python_ast/src/visitor.rs:644
↓ 5 callersFunctionwalk_f_string
(visitor: &mut V, f_string: &'a FString)
crates/ruff_python_ast/src/visitor.rs:810
↓ 5 callersFunctionwalk_interpolated_string_element
( visitor: &mut V, interpolated_string_element: &'a InterpolatedStringElement, )
crates/ruff_python_ast/src/visitor.rs:816
↓ 5 callersFunctionwalk_keyword
(visitor: &mut V, keyword: &'a Keyword)
crates/ruff_python_ast/src/visitor.rs:690
↓ 5 callersFunctionwalk_non_atomic_type
( db: &'db dyn Db, non_atomic_type: NonAtomicType<'db>, visitor: &V, )
crates/ty_python_semantic/src/types/visitor.rs:284
↓ 5 callersFunctionwalk_parameters
(visitor: &mut V, parameters: &'a Parameters)
crates/ruff_python_ast/src/visitor.rs:670
↓ 5 callersMethodwhen_constraint_set_assignable_to
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, target: Type<'db>,
crates/ty_python_semantic/src/types/relation.rs:758
↓ 5 callersMethodwhich
(&self, name: &str)
crates/ty_test/src/db.rs:566
↓ 5 callersMethodwith_binding_context
( self, db: &'db dyn Db, binding_context: Definition<'db>, )
crates/ty_python_semantic/src/types/typevar.rs:281
↓ 5 callersMethodwith_kind
(self, db: &'db dyn Db, kind: CallableTypeKind)
crates/ty_python_semantic/src/types/callable.rs:804
↓ 5 callersMethodwith_options
(mut self, options: Self::Options)
crates/ruff_python_formatter/src/statement/suite.rs:773
← previousnext →2,901–3,000 of 31,562, ranked by callers