python-ruff/python-ruff.spec
Ondřej Súkup 9b7901e477 - update to 0.1.9
* Breaking changes
   * Add site-packages to default exclusions
 * Preview features
   * Fix: Avoid parenthesizing subscript targets and values
   * [pylint] Implement too-many-locals (PLR0914)
   * Implement reimplemented_operator (FURB118)
   * Add a rule to detect string members in runtime-evaluated unions
   * Implement no_blank_line_before_class_docstring preview style
 * Rule changes
   * CONSTANT_CASE variables are improperly flagged for yoda violation (SIM300)
   * [flake8-pyi] Cover ParamSpecs and TypeVarTuples (PYI018)
   * [flake8-bugbear] Add fix for zip-without-explicit-strict (B905)
   * Add fix to automatically remove print and pprint statements (T201, T203)
   * Prefer Never to NoReturn in auto-typing in Python >= 3.11 (ANN201)
 * Formatter
   * can_omit_optional_parentheses: Exit early for unparenthesized expressions
   * Fix dynamic mode with doctests so that it doesn't exceed configured line width
   * Fix can_omit_optional_parentheses for expressions with a right most fstring
   * Add target_version to formatter options
 * CLI
   * Update ruff format --check to display message for already formatted files
 * Bug fixes
   * Reverse order of arguments for operator.contains
   * Iterate over lambdas in deferred type annotations
   * Fix panic in D208 with multibyte indent
   * Add support for NoReturn in auto-return-typing
   * Allow removal of typing from exempt-modules
   * Avoid mutable-class-default violations for Pydantic subclasses
   * Fix dropped union expressions for piped non-types in PYI055 autofix

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=24
2023-12-21 23:29:32 +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.9
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