MCPcopy Create free account

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

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

↓ 1 callersFunctionnormalize_covered_literal_exclusions
Literal groups bypass pairwise union simplification. Match their exclusions in one pass so that restoring many excluded literals does not require comp
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:245
↓ 1 callersFunctionnormalize_diagnostics
Replace Ruff-style `SourceFile`s in `diagnostics` with Salsa-backed `File`s for use in `mdtest`.
crates/ruff_mdtest/src/lib.rs:212
↓ 1 callersFunctionnormalize_digit_separators
Normalizes digit separators in a numeric string by: - Stripping leading and trailing underscores - Collapsing medial underscore sequences to single un
crates/ruff_linter/src/rules/refurb/rules/verbose_decimal_constructor.rs:225
↓ 1 callersFunctionnormalize_embedded_type_markup
Removes embedded markup before wrapping the normalize type label in a code span. For example: - ``"str or :class:`pkg.Type` or `pkg.Other`"`` becomes
crates/ty_ide/src/docstring/markdown/structured.rs:394
↓ 1 callersFunctionnormalize_ending_octal
Pads an octal at the end of the string to three digits, if necessary.
crates/ruff_linter/src/rules/flake8_implicit_str_concat/rules/implicit.rs:239
↓ 1 callersFunctionnormalize_enum_complement_unions
Combine union elements that cover more of the same enum class. Enum complements are intersections like `Color & ~Literal[Color.RED]`. When a union co
crates/ty_python_semantic/src/types/set_theoretic/builder.rs:316
↓ 1 callersFunctionnormalize_floating_number
Returns the normalized floating number string.
crates/ruff_python_formatter/src/expression/expr_number_literal.rs:110
↓ 1 callersFunctionnormalize_imports
( imports: Vec<AnnotatedImport<'a>>, settings: &Settings, )
crates/ruff_linter/src/rules/isort/normalize.rs:5
↓ 1 callersFunctionnormalize_integer
Returns the normalized integer string.
crates/ruff_python_formatter/src/expression/expr_number_literal.rs:65
↓ 1 callersFunctionnormalize_lsp_edits
Deduplicates edits and drops files with overlapping edits.
crates/ty_server/src/server/api/requests/will_rename_files.rs:79
↓ 1 callersFunctionnormalize_output
Normalize output by replacing absolute paths with relative placeholders.
scripts/ty_benchmark/src/benchmark/snapshot.py:16
↓ 1 callersFunctionnormalize_rule_selectors
( config: dict[str, Any], rule_names: dict[str, str | None] )
python/ruff-ecosystem/ruff_ecosystem/projects.py:88
↓ 1 callersFunctionnormalize_site_packages_paths
Site-packages placeholders are specific to ty's fixtures. Keeping their normalization outside the shared mdtest crate avoids rewriting Ruff snapshots
crates/ty_test/src/lib.rs:573
↓ 1 callersFunctionnormalize_type_for_code_span
Normalizes type text so it fits in a single Markdown code span. One-line types are returned unchanged. Multi-line types are trimmed line by line, wit
crates/ty_ide/src/docstring/markdown/structured.rs:484
↓ 1 callersFunctionnormalize_uri
(uri: &str)
crates/ty_ide/src/docstring/markdown/general/inline.rs:402
↓ 1 callersMethodnormalized_body
Normalizes the text of the body of a field (e.g., the documentation for a parameter).
crates/ty_ide/src/docstring/document/rst.rs:341
↓ 1 callersMethodnormalized_constructor_return
Normalize constructor return type. There are a few special cases we have to handle for constructors: `__init__` methods always return `None`, but for
crates/ty_python_semantic/src/types/call/bind/constructor.rs:910
↓ 1 callersMethodnormalized_union
( self, db: &'db dyn Db, program: Program<'db>, )
crates/ty_python_semantic/src/types/union_type_instance.rs:279
↓ 1 callersFunctionnot_a_text_document
(path: impl Display)
crates/ty_server/src/system.rs:345
↓ 1 callersFunctionnot_airflow
(start_date)
crates/ruff_linter/resources/test/fixtures/airflow/AIR304.py:77
↓ 1 callersFunctionnot_empty
D419
crates/ruff_linter/src/rules/pydocstyle/rules/not_empty.rs:48
↓ 1 callersFunctionnot_missing
D100, D101, D102, D103, D104, D105, D106, D107
crates/ruff_linter/src/rules/pydocstyle/rules/not_missing.rs:566
↓ 1 callersFunctionnot_tests
E713, E714
crates/ruff_linter/src/rules/pycodestyle/rules/not_tests.rs:84
↓ 1 callersMethodnote
Override the output style for [notes][crate::Level::NOTE]
crates/ruff_annotate_snippets/src/renderer/mod.rs:228
↓ 1 callersMethodnote_separator
(&self, is_cont: bool)
crates/ruff_annotate_snippets/src/renderer/mod.rs:305
↓ 1 callersMethodnotebook_document_uris
(&self)
crates/ruff_server/src/session/index.rs:98
↓ 1 callersFunctionnotebook_fix_all
(snapshot: &DocumentSnapshot)
crates/ruff_server/src/server/api/requests/code_action.rs:228
↓ 1 callersMethodnotebook_index
(&self)
crates/ruff_server/src/lint.rs:343
↓ 1 callersFunctionnotebook_newline_diagnostics
Collects trailing newline diagnostics for each cell
crates/ruff_linter/src/rules/pycodestyle/rules/too_many_newlines_at_end_of_file.rs:76
↓ 1 callersFunctionnotebook_organize_imports
(snapshot: &DocumentSnapshot)
crates/ruff_server/src/server/api/requests/code_action.rs:298
↓ 1 callersFunctionnotification
(notif: server::Notification)
crates/ty_server/src/server/api.rs:189
↓ 1 callersFunctionnotification
(notif: server::Notification)
crates/ruff_server/src/server/api.rs:100
↓ 1 callersFunctionnpm_bin_path
(name: str)
scripts/ty_benchmark/src/benchmark/tool.py:432
↓ 1 callersFunctionnullable_model_string_field
DJ001
crates/ruff_linter/src/rules/flake8_django/rules/nullable_model_string_field.rs:59
↓ 1 callersMethodnum_args
(self)
crates/ruff_linter/src/rules/flake8_bugbear/rules/re_sub_positional_args.rs:109
↓ 1 callersFunctionnum_branches
(stmts: &[Stmt])
crates/ruff_linter/src/rules/pylint/rules/too_many_branches.rs:166
↓ 1 callersFunctionnum_decimal_digits
instead of taking the String length or dividing by 10 while > 0, we multiply a limit by 10 until we're higher. If the loop isn't exited by the `return
crates/ruff_annotate_snippets/src/renderer/render.rs:2373
↓ 1 callersMethodnum_items
(&self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:713
↓ 1 callersMethodnum_member_segments
(self)
crates/ty_python_core/src/place.rs:139
↓ 1 callersMethodnum_nodes
(&self)
crates/ruff_python_semantic/src/cfg/visualize.rs:171
↓ 1 callersFunctionnum_returns
Count the number of return statements in a function or method body.
crates/ruff_linter/src/rules/pylint/rules/too_many_return_statements.rs:74
↓ 1 callersMethodnum_segments
(&self)
crates/ty_python_core/src/member.rs:197
↓ 1 callersFunctionnumeric_literal_too_long
PYI054
crates/ruff_linter/src/rules/flake8_pyi/rules/numeric_literal_too_long.rs:50
↓ 1 callersFunctionnumeric_tower_group
Finds the largest numeric-tower group among the given classes. Unrelated classes are ignored so a mixed annotation can still use canonical spelling:
crates/ty_python_semantic/src/types/display.rs:3194
↓ 1 callersFunctionnumpy_2_0_deprecation
NPY201
crates/ruff_linter/src/rules/numpy/rules/numpy_2_0_deprecation.rs:162
↓ 1 callersFunctionnumpy_section
( checker: &Checker, docstring: &Docstring, context: &SectionContext, next: Option<&SectionCon
crates/ruff_linter/src/rules/pydocstyle/rules/sections.rs:2077
↓ 1 callersFunctionnunique_constant_series_check
PD101
crates/ruff_linter/src/rules/pandas_vet/rules/nunique_constant_series_check.rs:66
↓ 1 callersFunctionobject_without_hash_method
PLW1641
crates/ruff_linter/src/rules/pylint/rules/eq_without_hash.rs:79
↓ 1 callersMethodobserve_marker
Updates internal state for a possible reST literal block marker whose text has already been split out from its source line.
crates/ty_ide/src/docstring/document/preformatted.rs:142
↓ 1 callersMethodobserve_marker_in_line
Updates internal state for a possible reST literal block marker.
crates/ty_ide/src/docstring/document/preformatted.rs:136
↓ 1 callersMethodoffset
Returns the [UTF-8 byte offset](TextSize) at `line` and `character` where character is counted using the given encoding. ## Examples ### ASCII only
crates/ruff_source_file/src/line_index.rs:482
↓ 1 callersFunctionon_failure
()
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG004_0.py:47
↓ 1 callersFunctionone_liner
D200
crates/ruff_linter/src/rules/pydocstyle/rules/one_liner.rs:62
↓ 1 callersMethodopenCodeEditor
( source: editor.ICodeEditor, resource: Uri, selectionOrPosition?: IRange | IPosition, )
playground/ty/src/Editor/Editor.tsx:809
↓ 1 callersFunctionopen_alias
UP020
crates/ruff_linter/src/rules/pyupgrade/rules/open_alias.rs:55
↓ 1 callersMethodopen_close
(&self)
crates/ruff_python_semantic/src/cfg/visualize.rs:96
↓ 1 callersFunctionopen_configuration_file
(config_path: &Path)
crates/ruff_server/src/session/index/ruff_settings.rs:510
↓ 1 callersMethodopen_document_handle
Returns a handle to the open document specified by its URI. # Errors Returns an error if the document is not open in the session.
crates/ty_server/src/session.rs:1324
↓ 1 callersMethodopen_file
(self, path: Path)
scripts/ty_benchmark/src/benchmark/test_lsp_diagnostics.py:208
↓ 1 callersMethodopen_file
Opens a file in the project.
crates/ty_project/src/lib.rs:592
↓ 1 callersMethodopen_file
Marks `file` as open in the editor. This is untracked state: open a file before running any queries.
crates/ty_python_semantic/src/db.rs:114
↓ 1 callersFunctionopen_file_with_context_handler
SIM115
crates/ruff_linter/src/rules/flake8_simplify/rules/open_file_with_context_handler.rs:229
↓ 1 callersMethodopen_notebook_document
( &mut self, document: NotebookDocument, )
crates/ty_server/src/session/index.rs:199
↓ 1 callersMethodopen_notebook_document
(&mut self, notebook_uri: Uri, document: NotebookDocument)
crates/ruff_server/src/session/index.rs:305
↓ 1 callersMethodopen_text_document
Registers a text document at the provided `uri`. If a document is already open here, it will be overwritten.
crates/ruff_server/src/session.rs:168
↓ 1 callersMethodopen_text_document
(&mut self, uri: Uri, document: TextDocument)
crates/ruff_server/src/session/index.rs:300
↓ 1 callersMethodopen_workspace_folder
( &mut self, uri: Uri, global: &GlobalClientSettings, client: &Client, )
crates/ruff_server/src/session/index.rs:175
↓ 1 callersMethodopener
The docstring's "opener" (the string's prefix, if any, and its opening quotes).
crates/ruff_linter/src/docstrings/mod.rs:77
↓ 1 callersMethodopening_token_for_multiline_definition
(self)
crates/ruff_linter/src/rules/ruff/rules/sequence_sorting.rs:163
↓ 1 callersMethodoperands
(&self)
crates/ruff_python_formatter/src/expression/binary_like.rs:559
↓ 1 callersFunctionoperator_dispatch_class
Returns the nominal runtime class used to dispatch binary operators. Instances dispatch through their nominal class, while class objects dispatch thr
crates/ty_python_semantic/src/types/call.rs:76
↓ 1 callersMethodoperator_result
( &self, db: &'db dyn Db, env: &ProgramEnvironment<'db>, )
crates/ty_python_semantic/src/types.rs:11135
↓ 1 callersMethodoptions
(&self)
crates/ruff_formatter/src/lib.rs:243
↓ 1 callersMethodoptions
Returns the format options
crates/ruff_formatter/src/formatter.rs:29
↓ 1 callersMethodoptions
(&self)
crates/ruff_server/src/session/settings.rs:33
↓ 1 callersFunctionor_space
Ensure that a [`ParenthesizableWhitespace`] contains at least one space.
crates/ruff_linter/src/cst/helpers.rs:12
↓ 1 callersMethodor_uncached
Compute the disjunction of two interior nodes in ascending ID order after a cache miss.
crates/ty_python_core/src/narrowing_constraints.rs:315
↓ 1 callersMethodor_uncached
Compute the disjunction on a cache miss with the operands in ascending ID order. The first operand is an interior node and the second can be `AMBIGUOU
crates/ty_python_core/src/reachability_constraints.rs:452
↓ 1 callersFunctionorder_imports
( block: ImportBlock<'a>, section: &ImportSection, settings: &Settings, )
crates/ruff_linter/src/rules/isort/order.rs:10
↓ 1 callersFunctionordered_dataclass_base_class
( db: &'db dyn Db, base_class: ClassType<'db>, )
crates/ty_python_semantic/src/types/infer/builder/post_inference/static_class.rs:1374
↓ 1 callersMethodordering
(self, other: TextRange)
crates/ruff_text_size/src/range.rs:338
↓ 1 callersFunctionorganize_imports
(snapshot: &DocumentSnapshot)
crates/ruff_server/src/server/api/requests/code_action.rs:263
↓ 1 callersFunctionorganize_imports
I001
crates/ruff_linter/src/rules/isort/rules/organize_imports.rs:122
↓ 1 callersMethodorganize_imports
(&self)
crates/ruff_server/src/session/settings.rs:147
↓ 1 callersMethodorigin
(&self)
crates/ty_site_packages/src/lib.rs:448
↓ 1 callersFunctionos_chmod
PTH101
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_chmod.rs:72
↓ 1 callersFunctionos_error_alias_call
UP024
crates/ruff_linter/src/rules/pyupgrade/rules/os_error_alias.rs:191
↓ 1 callersFunctionos_error_alias_handlers
UP024
crates/ruff_linter/src/rules/pyupgrade/rules/os_error_alias.rs:163
↓ 1 callersFunctionos_error_alias_raise
UP024
crates/ruff_linter/src/rules/pyupgrade/rules/os_error_alias.rs:198
↓ 1 callersFunctionos_getcwd
PTH109
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_getcwd.rs:71
↓ 1 callersFunctionos_makedirs
PTH103
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_makedirs.rs:71
↓ 1 callersFunctionos_mkdir
PTH102
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_mkdir.rs:72
↓ 1 callersFunctionos_path_abspath
PTH100
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_abspath.rs:77
↓ 1 callersFunctionos_path_basename
PTH119
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_basename.rs:74
↓ 1 callersFunctionos_path_commonprefix
RUF071
crates/ruff_linter/src/rules/ruff/rules/os_path_commonprefix.rs:88
↓ 1 callersFunctionos_path_dirname
PTH120
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_dirname.rs:78
↓ 1 callersFunctionos_path_exists
PTH110
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_exists.rs:65
↓ 1 callersFunctionos_path_expanduser
PTH111
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_expanduser.rs:72
↓ 1 callersFunctionos_path_getatime
PTH203
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_getatime.rs:68
↓ 1 callersFunctionos_path_getctime
PTH205
crates/ruff_linter/src/rules/flake8_use_pathlib/rules/os_path_getctime.rs:69
← previousnext →11,901–12,000 of 31,562, ranked by callers