MCPcopy Create free account

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

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

↓ 3 callersMethodset_override_options
(&mut self, options: Options)
crates/ty/tests/file_watching.rs:427
↓ 3 callersFunctionset_program_version
Sets the version of the executing program. ## Errors If the version has already been initialized (can only be set once).
crates/ruff_db/src/lib.rs:63
↓ 3 callersMethodset_python_version
(&mut self, python_version: PythonVersion)
crates/ty_project/src/db.rs:825
↓ 3 callersMethodset_watch
Controls whether setup starts watching. Defaults to true. When false, call [`TestCase::start_watching`] after preparing the filesystem.
crates/ty/tests/file_watching.rs:441
↓ 3 callersMethodsettings
Return an iterator over the resolved [`Settings`] in this [`Resolver`].
crates/ruff_workspace/src/resolver.rs:264
↓ 3 callersFunctionsetup
()
crates/ruff_benchmark/benches/ty.rs:131
↓ 3 callersMethodsetup_dataclass_field_specifiers
If the current scope is a class body scope of a dataclass-like class, populate `self.dataclass_field_specifiers` with the field specifiers from the cl
crates/ty_python_semantic/src/types/infer/builder.rs:982
↓ 3 callersMethodsetup_iteration
(&self)
crates/ruff_benchmark/benches/ty_walltime.rs:39
↓ 3 callersFunctionsetup_uv_with_system
Creates a project with the selected uv mode and test command environment. Lets the test control Python environment creation and synchronization. Insta
crates/ty/tests/file_watching.rs:4457
↓ 3 callersFunctionsetup_with_system
(setup_files: F, configure_system: C)
crates/ty/tests/file_watching.rs:475
↓ 3 callersMethodseverity
Returns the configured severity for the lint with the given id or `None` if the lint is disabled.
crates/ty_python_semantic/src/lint.rs:654
↓ 3 callersMethodshadowed_binding
Return the [`BindingId`] that the given [`BindingId`] shadows, if any. Note that this will only return bindings that are shadowed by a binding in a p
crates/ruff_python_semantic/src/model.rs:387
↓ 3 callersFunctionshareUrl
* Persist the workspace and generate a shareable URL.
playground/ty/src/Editor/persist.ts:17
↓ 3 callersFunctionshareUrl
* Save the configuration and return a shareable URL.
playground/ruff/src/Editor/settings.ts:26
↓ 3 callersMethodshould_annotation_be_displayed
Whether or not the type of this parameter should be displayed.
crates/ty_python_semantic/src/types/signatures.rs:6450
↓ 3 callersMethodshould_check_redundant_conditions
Whether we should check for redundant conditions in the current inference context. We skip the checks if: - It's a third-party file - It's a stub fi
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:396
↓ 3 callersMethodshould_expect_panic
(&self)
crates/mdtest/src/parser.rs:162
↓ 3 callersMethodshould_show_diagnostic
Whether a diagnostic should be included in result IDs and LSP output.
crates/ty_server/src/session/settings.rs:22
↓ 3 callersMethodshould_visit_lazy_type_attributes
(&self)
crates/ty_python_semantic/src/types/cyclic.rs:660
↓ 3 callersMethodshow_message
Shows a message to the user. This opens a pop up in VS Code showing `message`.
crates/ty_server/src/session/client.rs:207
↓ 3 callersMethodshow_message
Shows a message to the user. This opens a pop up in VS Code showing `message`.
crates/ruff_server/src/session/client.rs:171
↓ 3 callersFunctionsimplify_intersection_pair
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, first: Type<'db>, second: Type<'db>, pol
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:1895
↓ 3 callersMethodsimulate_runtime_load_at_location_in_scope
Simulates a runtime load of the given symbol. This should not be run until after all the bindings have been visited. The main purpose of this method
crates/ruff_python_semantic/src/model.rs:990
↓ 3 callersMethodsite_packages_directories
Return a list of `site-packages` directories that are available from this virtual environment See the documentation for [`site_packages_directories_f
crates/ty_site_packages/src/lib.rs:881
↓ 3 callersFunctionskip_script_comments
Parses the rest of a [PEP 723](https://peps.python.org/pep-0723/) script comment and moves `comments` past the script comment's end unless the script
crates/ruff_linter/src/rules/eradicate/rules/commented_out_code.rs:87
↓ 3 callersFunctionskip_until
( src: str, pos: Pos, expect: str, *, error_on: frozenset[str], error_on_eof: bool, )
crates/ruff_benchmark/resources/tomllib/_parser.py:241
↓ 3 callersFunctionslice_shift_byte
(a: &[u8])
crates/ruff_unicode_names2/src/jamo.rs:35
↓ 3 callersFunctionslot
Uses the high six bits of the product to select one of 64 slots.
crates/ruff_python_parser/src/lexer/keywords.rs:75
↓ 3 callersMethodsnapshot
(&self)
crates/ty_python_core/src/use_def/exception_checkpoint.rs:53
↓ 3 callersFunctionsnapshot_item_label
(item: &CallHierarchyItem)
crates/ty_ide/src/call_hierarchy.rs:126
↓ 3 callersFunctionsoft_line_break
()
crates/ruff_formatter/src/builders.rs:69
↓ 3 callersFunctionsolution
(solved_typevars: impl IntoIterator<Item = TypeVarSolution<'db>>)
crates/ty_python_semantic/src/types/constraints/projection/tests.rs:86
↓ 3 callersMethodsolve_hash_map_with
( &mut self, generic_context: GenericContext<'db>, choose: &mut impl FnMut(
crates/ty_python_semantic/src/types/generics.rs:3408
↓ 3 callersMethodsolve_typevar
( &self, constraints: &ConstraintSetBuilder<'db>, bounds: &CandidateTypeVarSolution<'d
crates/ty_python_semantic/src/types/call/bind.rs:7136
↓ 3 callersFunctionsome_function
()
crates/ruff_linter/resources/test/fixtures/flake8_tidy_imports/TID/my_package/sublib/protocol/UpperCaseModule.py:1
↓ 3 callersFunctionsort_workspace_diagnostic_response
(response: &mut WorkspaceDiagnosticReport)
crates/ty_server/tests/e2e/pull_diagnostics.rs:1163
↓ 3 callersMethodsource
(&self)
crates/ruff_server/src/lint.rs:329
↓ 3 callersMethodsource
Creates a source narrowed by the constraints accumulated before it. `exit_constraint`, when present, is activated only after the source is requested
crates/ty_python_semantic/src/place_load.rs:1394
↓ 3 callersMethodsource
(&self)
crates/ruff_linter/src/checkers/ast/mod.rs:522
↓ 3 callersFunctionsource_location_to_position
(location: &SourceLocation)
crates/ty_server/src/document/range.rs:349
↓ 3 callersMethodsource_map_generation
(&self)
crates/ruff_python_formatter/src/options.rs:135
↓ 3 callersFunctionsource_position
Creates a source map entry from the passed source `position` to the position in the formatted output. ## Examples ``` use ruff_formatter::format; us
crates/ruff_formatter/src/builders.rs:319
↓ 3 callersMethodsource_type
(self, db: &dyn Db)
crates/ruff_db/src/files.rs:577
↓ 3 callersFunctionspam
()
crates/ruff_python_parser/resources/inline/ok/decorator_expression_py39.py:3
↓ 3 callersMethodspan
Conveniently create a `Span` that points into a file in this environment. The path given must have been added via `TestEnvironment::add`. The offset
crates/ruff_db/src/diagnostic/render.rs:2602
↓ 3 callersMethodspan
Attempt to resolve a [`Span`] that corresponds to the location of the configuration setting that specified the Python version. Useful for subdiagnost
crates/ty_site_packages/src/version.rs:68
↓ 3 callersMethodspan_to_lines
(&self, span: Range<usize>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:150
↓ 3 callersMethodspan_to_snippet
(&self, span: Range<usize>)
crates/ruff_annotate_snippets/src/renderer/source_map.rs:146
↓ 3 callersMethodspeak
()
crates/ruff_linter/resources/test/fixtures/pylint/super_without_brackets.py:3
↓ 3 callersMethodspec
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/enum_literal.rs:155
↓ 3 callersMethodspecialize_tuple
Creates a specialization of this generic context for the `tuple` class.
crates/ty_python_semantic/src/types/generics.rs:1099
↓ 3 callersFunctionsplit_once_at_top_level_colon
Splits at the first top-level colon, ignoring colons inside brackets and quoted strings. Bracket kinds are tracked independently, so mismatched nesti
crates/ty_ide/src/docstring/document/syntax.rs:506
↓ 3 callersFunctionsplit_whitespace_with_maxsplit
From the Python documentation: > If sep is not specified or is None, a different splitting algorithm is applied: runs of > consecutive whitespace are
crates/ruff_linter/src/rules/flake8_simplify/rules/split_static_string.rs:381
↓ 3 callersMethodstart_token
(self)
crates/ruff_python_parser/src/string.rs:50
↓ 3 callersFunctionstarts_with_markdown_list_item
Returns whether `line` starts with a `CommonMark` list-item marker. `CommonMark` limits ordered-list markers to nine digits to avoid integer overflow
crates/ty_ide/src/docstring/document/syntax.rs:45
↓ 3 callersMethodstate_mut
(&mut self)
crates/ruff_formatter/src/buffer.rs:155
↓ 3 callersMethodstore_expected_type
(&mut self, expression: impl Into<ExpressionNodeKey>, ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder.rs:7224
↓ 3 callersMethodstore_typed_dict_key_expected_type
(&mut self, slice: &ast::Expr, value_ty: Type<'db>)
crates/ty_python_semantic/src/types/infer/builder/subscript.rs:124
↓ 3 callersMethodstring_flags
Returns true if the current token is a string and it is raw.
crates/ruff_python_ast/src/token.rs:82
↓ 3 callersFunctionstring_parser_escaped_eol
(eol: &str)
crates/ruff_python_parser/src/string.rs:548
↓ 3 callersFunctionstrip_underscores
(text: &str)
crates/ruff_python_parser/src/parser/mod.rs:997
↓ 3 callersMethodstructural_member_priority
Returns the priority for structurally comparing this member. Simple finite members are cheapest, followed by finite overloads. Recursive members and
crates/ty_python_semantic/src/types/protocol_class.rs:2220
↓ 3 callersFunctionstub_package_index
( db: &dyn Db, resolver_environment: ResolverEnvironment<'_>, )
crates/ty_module_resolver/src/resolve.rs:552
↓ 3 callersMethodsub_builder
Returns a builder for tersely constructing sub-diagnostics.
crates/ruff_db/src/diagnostic/render.rs:2666
↓ 3 callersMethodsub_warn
A convenience function for returning a builder for a sub-diagnostic with "error" severity and canned values for its identifier and message.
crates/ruff_db/src/diagnostic/render.rs:2644
↓ 3 callersMethodsubtract
(mut self, other: &Self)
crates/ruff_linter/src/registry/rule_set.rs:109
↓ 3 callersMethodsuffix
Return the suffix for the [`NoqaCode`], e.g., `101` for `SIM101`.
crates/ruff_linter/src/codes.rs:29
↓ 3 callersFunctionsuite_ends_with_exit
Return `true` if `suite` ends in an exit recognized by the redundant-condition heuristic. Both kinds of exit accept the following final statements: -
crates/ty_python_semantic/src/types/infer/builder/suspicious_conditions/mod.rs:1267
↓ 3 callersMethodsummary_after_section_name
Returns the rest of the summary line after the section name.
crates/ruff_linter/src/docstrings/sections.rs:340
↓ 3 callersFunctionsupertypes
Sends a `typeHierarchy/supertypes` request.
crates/ty_server/tests/e2e/type_hierarchy.rs:178
↓ 3 callersMethodsupport_data
(&self, support: SupportId)
crates/ty_python_semantic/src/types/constraints.rs:1618
↓ 3 callersMethodsupports_inlay_hint_refresh
Returns `true` if the client supports inlay hint refresh.
crates/ty_server/src/capabilities.rs:104
↓ 3 callersMethodsupports_variance_inference
Structural variance inference currently excludes recursive type aliases and descriptor writes whose accepted values cannot be represented by a single
crates/ty_python_semantic/src/types/protocol_class.rs:85
↓ 3 callersFunctionsuspicious_function
S301, S302, S303, S304, S305, S306, S307, S308, S310, S311, S312, S313, S314, S315, S316, S317, S318, S319, S320, S321, S323
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs:1018
↓ 3 callersFunctionsynthesize_typed_dict_method
( db: &'db dyn Db, env: &ProgramEnvironment<'db>, typed_dict: TypedDictType<'db>, method_name:
crates/ty_python_semantic/src/types/class/typed_dict.rs:34
↓ 3 callersMethodtarget
(&self, module: &'ast ParsedModuleRef)
crates/ty_python_core/src/definition.rs:1299
↓ 3 callersMethodtargets
Returns iterator over indices of blocks targeted by given edges
crates/ruff_python_semantic/src/cfg/graph.rs:129
↓ 3 callersFunctiontest_contents_syntax_errors
A custom test runner that prints syntax errors in addition to other diagnostics. Adapted from `flakes` in pyflakes/mod.rs.
crates/ruff_linter/src/linter.rs:947
↓ 3 callersMethodtest_system
(&self)
crates/ruff_db/src/lib.rs:206
↓ 3 callersMethodtext
Returns the source text
crates/ruff_source_file/src/lib.rs:83
↓ 3 callersMethodtext_document_language_id
(&self)
crates/ruff_server/src/session/index.rs:671
↓ 3 callersMethodtext_documents_diagnostics_async
( self, files: list[Path] )
scripts/ty_benchmark/src/benchmark/lsp_client.py:139
↓ 3 callersMethodto_absolute_line_number
Returns the absolute line number in the markdown file for a given line number relative to the concatenated code blocks. Returns an `Err` if the relat
crates/mdtest/src/parser.rs:317
↓ 3 callersMethodto_class_type
Turn a class literal (`Type::ClassLiteral` or `Type::GenericAlias`) into a `ClassType`. Since a `ClassType` must be specialized, apply the default spe
crates/ty_python_semantic/src/types.rs:3243
↓ 3 callersMethodto_code_block_backtick_offsets
(&self)
crates/mdtest/src/lib.rs:309
↓ 3 callersMethodto_import_alias_resolution
(self)
crates/ty_ide/src/references.rs:61
↓ 3 callersMethodto_index
(&self)
crates/ruff_linter/src/locator.rs:36
↓ 3 callersMethodto_log_function
(self)
crates/ruff_linter/src/rules/refurb/rules/redundant_log_base.rs:129
↓ 3 callersFunctionto_lsp_diagnostic
Converts the tool specific [`Diagnostic`][ruff_db::diagnostic::Diagnostic] to an LSP [`Diagnostic`].
crates/ty_server/src/server/api/diagnostics.rs:449
↓ 3 callersMethodto_meta_type
Compute the metatype of this `type[T]`. For a concrete class `C`, this returns `type[M]`, where `M` is its guaranteed metaclass, excluding the lookup
crates/ty_python_semantic/src/types/subclass_of.rs:343
↓ 3 callersMethodto_meta_type_with_recursion
( self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, context: &TypeRecursio
crates/ty_python_semantic/src/types.rs:9401
↓ 3 callersMethodto_metaclass_instance
Return a type representing "the set of all instances of the metaclass of this type".
crates/ty_python_semantic/src/types/subclass_of.rs:324
↓ 3 callersMethodto_non_generic_instance
(self, db: &'db dyn Db)
crates/ty_python_semantic/src/types/class/static_literal.rs:3362
↓ 3 callersMethodto_notebook_range
( &self, text: &str, source_index: &LineIndex, notebook_index: &NotebookIndex,
crates/ruff_server/src/edit/range.rs:82
↓ 3 callersMethodto_py_format_options
(&self, file: &Path)
crates/ruff_dev/src/format_dev.rs:947
↓ 3 callersMethodto_ruff_args
(self)
python/ruff-ecosystem/ruff_ecosystem/projects.py:272
↓ 3 callersMethodto_ruff_notebook
Generates a pseudo-representation of a notebook that lacks per-cell metadata and contextual information but should still work with Ruff's linter.
crates/ty_server/src/document/notebook.rs:71
↓ 3 callersMethodto_rule_selection
(&self, db: &dyn Db)
crates/ty_project/src/metadata/options.rs:1244
↓ 3 callersMethodto_settings
( &self, db: &dyn Db, context: OptionsContext<'_>, strategy: &Strategy, )
crates/ty_project/src/metadata/options.rs:513
↓ 3 callersMethodto_source_code
(&self)
crates/ruff_linter/src/locator.rs:41
← previousnext →4,601–4,700 of 31,562, ranked by callers