python-ruff/python-ruff.spec

63 lines
1.8 KiB
RPMSpec
Raw Normal View History

- update to 0.9.5 * Preview features * Recognize all symbols named TYPE_CHECKING for in_type_checking_block * [flake8-comprehensions] Handle builtins at top of file correctly for unnecessary-dict-comprehension-for-iterable (C420) * [flake8-logging] .exception() and exc_info= outside exception handlers (LOG004, LOG014) * [flake8-pyi] Fix incorrect behaviour of custom-typevar-return-type preview-mode autofix if typing was already imported (PYI019) * [flake8-pyi] Fix more complex cases (PYI019) * [flake8-pyi] Make PYI019 autofixable for .py files in preview mode as well as stubs * [flake8-pyi] Remove type parameter correctly when it is the last (PYI019) * [pylint] Fix missing parens in unsafe fix for unnecessary-dunder-call (PLC2801) * [pyupgrade] Better messages and diagnostic range (UP015) * [pyupgrade] Rename private type parameters in PEP 695 generics (UP049) * [refurb] Also report non-name expressions (FURB169) * [refurb] Mark fix as unsafe if there are comments (FURB171) * [ruff] Classes with mixed type variable style (RUF053) * [airflow] BashOperator has been moved to airflow.providers.standard.operators.bash.BashOperator (AIR302) * [flake8-pyi] Add autofix for unused-private-type-var (PYI018) * [flake8-pyi] Significantly improve accuracy of PYI019 if preview mode is enabled * Rule changes * Preserve triple quotes and prefixes for strings * [flake8-comprehensions] Skip when TypeError present from too many (kw)args for C410,C411, and C418 * [flake8-pyi] Rename PYI019 and improve its diagnostic message * [pep8-naming] Ignore @override methods (N803) * [pyupgrade] Reuse replacement logic from UP046 and UP047 to preserve more comments (UP040) * [ruff] Analyze deferred annotations before enforcing mutable-(data)class-default and function-call-in-dataclass-default-argument (RUF008,RUF009,RUF012) * [pycodestyle] Exempt sys.path += ... calls (E402) * Configuration * Config error only when flake8-import-conventions alias conflicts with isort.required-imports bound name * Workaround Even Better TOML crash related to allOf * Bug fixes OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=122
2025-02-09 01:50:41 +00:00
#
# spec file for package python-ruff
#
# Copyright (c) 2025 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.9.5
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