SHA256
1
0
forked from pool/python-ruff
python-ruff/python-ruff.spec
Ondřej Súkup d6d8efee62 - update to 0.6.3:
* Preview features
   * [flake8-simplify] Extend open-file-with-context-handler to work with other standard-library IO modules (SIM115) 
   * [ruff] Avoid unused-async for functions with FastAPI route decorator (RUF029) 
   * [ruff] Ignore fstring-missing-syntax (RUF027) for fastAPI paths 
   * [ruff] Implement check for Decimal called with a float literal (RUF032) 
   * [flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) 
   * [pycodestyle] Disable E741 in stub files (.pyi) 
   * [pydoclint] Avoid DOC201 on explicit returns in functions that only return None 
 * Rule changes
   * [flake8-bugbear] Update diagnostic message when expression is at the end of function (B015) 
   * [flake8-pyi] Skip type annotations in string-or-bytes-too-long (PYI053) 
   * [flake8-type-checking] Always recognise relative imports as first-party 
   * [flake8-unused-arguments] Ignore unused arguments on stub functions (ARG001) 
   * [pylint] Ignore augmented assignment for self-cls-assignment (PLW0642) 
   * [flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) 
 * Bug fixes
   * [pep8-naming] Don't flag from imports following conventional import names (N817) 
   * [pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211) 
   * [FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) 
   * [flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) 
   * [flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) 
   * [pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) 
   * [ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) 
   * [ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any 
   * Fix dark theme on initial page load for the Ruff playground 
 * Server
   * Show full context in error log messages 
 * Documentation
   * Add hyperfine installation instructions; update hyperfine code samples

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ruff?expand=0&rev=77
2024-09-02 09:12:13 +00:00

62 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.6.3
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
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