python-ruff/python-ruff.spec
Ondřej Súkup 6408889776 - update to 0.1.7
* Preview features
   * Implement multiline dictionary and list hugging for preview style
   * Implement the fix_power_op_line_length preview style
   * Use Python version to determine typing rewrite safety
   * [flake8-annotations] Enable auto-return-type involving Optional and Union annotations
   * [flake8-bandit] Implement django-raw-sql (S611)
   * [flake8-bandit] Implement tarfile-unsafe-members (S202)
   * [flake8-pyi] Implement fix for unnecessary-literal-union (PYI030)
   * [flake8-simplify] Extend dict-get-with-none-default (SIM910) to non-literals
   * [pylint] - add unnecessary-list-index-lookup (PLR1736) + autofix
   * [pylint] - implement R0202 and R0203 with autofixes
   * [pylint] Implement repeated-keyword (PLe1132)
   * [pylint] Implement too-many-positional (PLR0917)
   * [pylint] Implement unnecessary-dict-index-lookup (PLR1733)
   * [refurb] Implement redundant-log-base (FURB163)
 * Rule changes
   * [flake8-boolean-trap] Allow booleans in @override methods
   * [flake8-bugbear] Avoid B015,B018 for last expression in a cell
   * [flake8-pie] Allow ellipses for enum values in stub files
   * [flake8-pyi] Check PEP 695 type aliases for snake-case-type-alias and t-suffixed-type-alias
   * [flake8-pyi] Check for kwarg and vararg NoReturn type annotations
   * [flake8-simplify] Omit select context managers from SIM117
   * [pep8-naming] Allow Django model loads in non-lowercase-variable-in-function (N806)
   * [pycodestyle] Avoid E703 for last expression in a cell
   * [pycodestyle] Update E402 to work at cell level for notebooks
   * [pydocstyle] Avoid D100 for Jupyter Notebooks
   * [pylint] Implement fix for unspecified-encoding (PLW1514)
 * Formatter
   * Avoid unstable formatting in ellipsis-only body with trailing comment

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=20
2023-12-08 09:17:34 +00:00

63 lines
1.8 KiB
RPMSpec

#
# spec file for package python-ruff
#
# Copyright (c) 2023 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.7
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