* Preview features * Formatter: Avoid invalid syntax for format-spec with quotes for all Python versions * Formatter: Consider quotes inside format-specs when choosing the quotes for an f-string * Formatter: Do not consider f-strings with escaped newlines as multiline * Formatter: Fix f-string formatting in assignment statement * Formatter: Fix unnecessary space around power operator (**) in overlong f-string expressions * [airflow] Avoid implicit schedule argument to DAG and @dag (AIR301) * [flake8-builtins] Exempt private built-in modules (A005) * [flake8-pytest-style] Fix pytest.mark.parametrize rules to check calls instead of decorators * [flake8-type-checking] Implement runtime-cast-value (TC006) * [flake8-type-checking] Implement unquoted-type-alias (TC007) and quoted-type-alias (TC008) * [flake8-use-pathlib] Recommend Path.iterdir() over os.listdir() (PTH208) * [pylint] Extend invalid-envvar-default to detect os.environ.get (PLW1508) * [pylint] Implement len-test (PLC1802) * [refurb] Fix bug where methods defined using lambdas were flagged by FURB118 * [ruff] Auto-add r prefix when string has no backslashes for unraw-re-pattern (RUF039) * [ruff] Implement invalid-assert-message-literal-argument (RUF040) * [ruff] Implement unnecessary-nested-literal (RUF041) * [ruff] Implement unnecessary-regular-expression (RUF055) * Rule changes * Ignore more rules for stub files * [pep8-naming] Eliminate false positives for single-letter names (N811, N814) * [pyflakes] Avoid false positives in @no_type_check contexts (F821, F722) * [ruff] Detect redirected-noqa in file-level comments (RUF101) * [ruff] Mark fixes for unsorted-dunder-all and unsorted-dunder-slots as unsafe when there are complex comments in the sequence (RUF022, RUF023) * Bug fixes * Avoid fixing code to None | None for redundant-none-literal (PYI061) and never-union (RUF020) (#14583, #14589) * [flake8-bugbear] Fix mutable-contextvar-default to resolve annotated function calls properly (B039) * [flake8-pyi, ruff] Fix traversal of nested literals and unions (PYI016, PYI051, PYI055, PYI062, RUF041) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=104
63 lines
1.8 KiB
RPMSpec
63 lines
1.8 KiB
RPMSpec
#
|
|
# spec file for package python-ruff
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%bcond_without libalternatives
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-ruff
|
|
Version: 0.8.1
|
|
Release: 0
|
|
Summary: An extremely fast Python linter, written in Rust
|
|
License: MIT
|
|
URL: https://github.com/astral-sh/ruff
|
|
Source: https://files.pythonhosted.org/packages/source/r/ruff/ruff-%{version}.tar.gz
|
|
Source1: vendor.tar.zst
|
|
BuildRequires: %{python_module maturin}
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: cargo-packaging
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Provides: ruff = %{version}-%{release}
|
|
Requires: alts
|
|
BuildRequires: alts
|
|
%python_subpackages
|
|
|
|
%description
|
|
Ruff extremely fast Python linter written in rust supperseding many other linting tools
|
|
|
|
%prep
|
|
%autosetup -a1 -p1 -n ruff-%{version}
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
|
%python_clone -a %{buildroot}%{_bindir}/ruff
|
|
%python_group_libalternatives ruff
|
|
|
|
%pre
|
|
%python_libalternatives_reset_alternative ruff
|
|
|
|
%files %{python_files}
|
|
%python_alternative %{_bindir}/ruff
|
|
%{python_sitearch}/ruff
|
|
%{python_sitearch}/ruff-%{version}.dist-info
|
|
|
|
%changelog
|