MCPcopy Create free account

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

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

Functionfunc
Example: .. code-block:: python import foo
crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx.py:1
Functionfunc
\
crates/ruff_linter/resources/test/fixtures/pydocstyle/D200.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C420.py:4
Functionfunc
(arg1: int, arg2: int = 4)
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C417.py:25
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_comprehensions/C420_3.py:22
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_tidy_imports/TID254.py:22
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_annotations/auto_return_type.py:1
Functionfunc
(a: dict[str, int])
crates/ruff_linter/resources/test/fixtures/flake8_return/RET504.py:412
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/semantic_errors/invalid_star_expression.py:1
Functionfunc
(p)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM114.py:82
Functionfunc
(filepath, encoding)
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM115.py:262
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_simplify/SIM113.py:1
Functionfunc
(arg: type[int] | str | type[float])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI055.py:14
Functionfunc
(arg: _UsedTypeVar)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI018.py:14
Functionfunc
(x: complex | Literal[1J], y: Union[Literal[3.14], float])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI051.py:12
Functionfunc
(arg: _UsedPrivateTypeAlias)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI047.py:12
Functionfunc
( arg1, # type: dict[str, int] # error arg2 # type: Sequence[bytes] # And here's some more info ab
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI033.py:13
Functionfunc
Docstrings are excluded from this rule. Some padding.
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI053.py:52
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF017_0.py:18
Functionfunc
(a, b)
crates/ruff_linter/resources/test/fixtures/ruff/RUF061_raises.py:4
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF066.py:50
Functionfunc
(sized: local_module.Container)
crates/ruff_linter/resources/test/fixtures/ruff/RUF101_1.py:12
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF020.py:20
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC251.py:5
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC109_1.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC109_0.py:6
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC105.py:4
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC110.py:6
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC230.py:28
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC22x.py:7
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC100.py:7
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_async/ASYNC115.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_pytest_style/PT011.py:18
Functionfunc
(version=ssl.PROTOCOL_SSLv2)
crates/ruff_linter/resources/test/fixtures/flake8_bandit/S503.py:6
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/tryceratops/TRY003.py:5
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/tryceratops/TRY002.py:10
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/pylint/useless_exception_statement.py:25
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/pylint/too_many_locals.py:1
Functionfunc
(a)
crates/ruff_linter/resources/test/fixtures/pylint/redefined_argument_from_local.py:2
Functionfunc
(*args, **kwargs)
crates/ruff_linter/resources/test/fixtures/pylint/unspecified_encoding.py:23
Functionfunc
(ápple_count)
crates/ruff_linter/resources/test/fixtures/pylint/non_ascii_name.py:8
Functionfunc
(arg: qq)
crates/ruff_linter/resources/test/fixtures/pylint/import_private_name/submodule/__main__.py:39
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/numpy/NPY201.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/numpy/NPY003.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/numpy/NPY201_2.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/numpy/NPY201_3.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_bugbear/B909.py:178
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_logging/LOG009.py:1
Functionfunc
(a: str, b: int)
crates/ruff_linter/resources/test/fixtures/pyflakes/F811_33.py:11
Functionfunc
(_, a, A)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N803.py:1
Functionfunc
(x)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N804.py:77
Functionfunc
(x)
crates/ruff_linter/resources/test/fixtures/pep8_naming/N805.py:55
Functionfunc
(_, a, badAllowed)
crates/ruff_linter/resources/test/fixtures/pep8_naming/ignore_names/N803.py:1
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP028_0.py:53
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP043.py:4
Functionfunc
()
crates/ruff_linter/resources/test/fixtures/pyupgrade/UP017.py:1
Methodfunc
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/line_ranges_fmt_off_decorator.py:20
Methodfunc
()
crates/ruff_python_formatter/resources/test/fixtures/black/cases/preview_long_dict_values.py:128
Methodfunc
()
crates/ruff_linter/resources/test/fixtures/flake8_annotations/auto_return_type.py:314
Methodfunc
(self)
crates/ruff_linter/resources/test/fixtures/pylint/no_self_use.py:35
Functionfunc1
(str, /, type, *complex, Exception, **getattr)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A002.py:1
Functionfunc1
(str, /, type, *complex, Exception, **getattr)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A006.py:9
Functionfunc1
(arg1: Literal[None])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:4
Functionfunc1
(arg1: int | int)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI016.py:10
Functionfunc1
(arg1: Literal[1] | Literal[2])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI030.py:12
Functionfunc1
(arg1: Literal[True, False])
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:4
Methodfunc1
()
crates/ruff_linter/resources/test/fixtures/pycodestyle/E30.py:63
Functionfunc10
(x: U[int, U[None, list | set]])
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:46
Functionfunc11
(x: None | int)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:51
Functionfunc12
(io: None | int = None)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:56
Functionfunc13
(arg: None | int | str)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:61
Functionfunc14
(arg: None | int | str | bytes)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:65
Functionfunc15
(arg: None | (int)and 2)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:70
Functionfunc16
(arg: 2 or(None) | int)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:74
Functionfunc2
A function-level docstring with single-colon directive (invalid RST but still common). .. code-block: yaml references: - ref:
crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx_directive.py:29
Functionfunc2
(bytes)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A002.py:5
Functionfunc2
(arg1: Literal[None] | int)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:8
Functionfunc2
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI016.py:14
Functionfunc2
(arg: _PrivateTypeAlias)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI047.py:22
Functionfunc2
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI030.py:17
Functionfunc2
(arg1: Literal[True, False, True])
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:8
Functionfunc3
A function-level docstring with nested directives. .. note:: .. code-block:: python warnings = "not a section" Returns
crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx_directive.py:41
Functionfunc3
(id, dir)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A002.py:9
Functionfunc3
()
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:12
Functionfunc3
(arg: None | None | int)
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:12
Functionfunc3
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:12
Functionfunc4
A function-level docstring where a real section follows a directive. .. code-block:: python example = "code" Notes: This IS
crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx_directive.py:55
Functionfunc4
(id, dir)
crates/ruff_linter/resources/test/fixtures/flake8_builtins/A002.py:21
Functionfunc4
(arg1: Literal[int, None, float])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:16
Functionfunc4
(arg: _UsedPEP695)
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI047.py:30
Functionfunc4
(arg: U[None, int])
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:16
Functionfunc4
(arg1: Literal[True, False] | bool)
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:16
Functionfunc5
A nested directive whose outer body contains section-like content. .. note:: .. code-block:: yaml references:
crates/ruff_linter/resources/test/fixtures/pydocstyle/sphinx_directive.py:66
Functionfunc5
(arg1: Literal[None, None])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:20
Functionfunc5
(arg: _UsedGeneric695[bytes])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI047.py:31
Functionfunc5
()
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:20
Functionfunc5
(arg1: Literal[False, True])
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:20
Functionfunc6
(arg1: Literal[ "hello", None # Comment 1 , "world" ])
crates/ruff_linter/resources/test/fixtures/flake8_pyi/PYI061.py:24
Functionfunc6
(arg: U[None, None, int])
crates/ruff_linter/resources/test/fixtures/ruff/RUF036.py:24
Functionfunc6
(arg1: Literal[True, False, "hello", "world"])
crates/ruff_linter/resources/test/fixtures/ruff/RUF038.py:24
← previousnext →21,401–21,500 of 31,562, ranked by callers