python-ruff/python-ruff.spec
Ondřej Súkup 0c9d775e5d - update to 0.1.15
* Preview features
   * Error when NURSERY selector is used with --preview 
   * Preserve indentation around multiline strings in formatter 
   * [flake8-return] Add fixes for all rules (RET505, RET506, RET507, RET508) 
   * [flake8-simplify] Add fix for if-with-same-arms (SIM114) 
   * [pycodestyle] Add fix for multiple-imports-on-one-line (E401) 
   * [pylint] Add fix for collapsible-else-if (PLR5501) 
   * [pylint] Add fix for useless-else-on-loop (PLW0120) 
   * [pylint] Implement assigning-non-slot (E0237) 
   * [pylint] Implement potential-index-error (PLE0643) 
   * [pylint] Implement too-many-nested-blocks (PLR1702) 
   * [ruff] Add rule to sort __slots__ and __match_args__ 
   * [ruff] Detect unnecessary dict comprehensions for iterables (RUF025) 
   * [ruff] Guard against use of default_factory as a keyword argument (RUF026) 
   * [ruff] Implement mutable-fromkeys-value (RUF024) 
 * CLI
   * Enable auto-wrapping of --help output 
 * Bug fixes
   * Avoid rendering display-only rules as fixable 
   * Detect automagic-like assignments in notebooks 
   * Generate custom JSON schema for dynamic setting 
   * [flake8-no-pep420] Include global --config when determining namespace packages 
   * [flake8-pie] Omit bound tuples passed to .startswith or .endswith 
   * [flake8-return] Avoid panic when fixing inlined else blocks 
   * [flake8-return] Consider exception suppression in unnecessary assignment 
   * [flake8-return] Take NoReturn annotation into account when analyzing implicit returns 
   * [flake8-simplify] Support inverted returns in needless-bool (SIM103) 
   * [flake8-type-checking] Add Pydantic's BaseConfig to default-copy list 
   * [flake8-type-checking] Avoid marking InitVar as a typing-only annotation

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=34
2024-02-01 18:08:29 +00:00

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.1.15
Release: 0
Summary: An extremely fast Python linter, written in Rust
License: MIT
URL: https://docs.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
Requires: alts
BuildRequires: alts
ExclusiveArch: %{rust_tier1_arches}
%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