forked from pool/python-flake8-pyi
- Remove python_module macro definition
- Update to 22.10.0:
# Bugfixes:
- Do not emit Y020 for empty strings. Y020 concerns "quoted annotations",
- but an empty string can never be a quoted annotation.
- Add special-casing so that Y020 is not emitted for __slots__ definitions
- inside class blocks.
- Expand Y035 to cover __slots__ definitions as well as __match_args__ and
- __all__ definitions.
- Expand Y015 so that errors are emitted for assignments to negative numbers.
# Other changes:
- Since v22.8.1, flake8-pyi has emitted a FutureWarning if run with flake8<5,
warning that the plugin would soon become incompatible with flake8<5. Due
to some issues that mean that some users are unable to upgrade to
flake8>=5, however, flake8-pyi no longer intends to remove support for
running the plugin with flake8<5 before Python 3.7 has reached end-of-life.
As such, the FutureWarning is no longer emitted.
- 22.8.2:
# New error codes:
- Y047: Detect unused TypeAlias declarations.
- Y049: Detect unused TypedDict definitions.
- Y050: Prefer typing_extensions.Never for argument annotations over
typing.NoReturn.
- Y051: Detect redundant unions between Literal types and builtin supertypes
(e.g. Literal["foo"] | str, or Literal[5] | int).
# Other enhancements:
- Support mypy_extensions.TypedDict.
- 22.8.1:
- Add support for flake8 >= 5.0.0.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=13
76 lines
2.3 KiB
RPMSpec
76 lines
2.3 KiB
RPMSpec
#
|
|
# spec file for package python-flake8-pyi
|
|
#
|
|
# Copyright (c) 2022 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/
|
|
#
|
|
|
|
|
|
%define skip_python2 1
|
|
Name: python-flake8-pyi
|
|
Version: 22.10.0
|
|
Release: 0
|
|
Summary: A plugin for flake8 to enable linting .pyi files
|
|
License: MIT
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/ambv/flake8-pyi
|
|
Source: https://files.pythonhosted.org/packages/source/f/flake8-pyi/flake8-pyi-%{version}.tar.gz
|
|
BuildRequires: %{python_module ast-decompiler}
|
|
BuildRequires: %{python_module base >= 3.6.0}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION test requirements
|
|
BuildRequires: %{python_module attrs}
|
|
BuildRequires: %{python_module flake8 >= 3.2.1}
|
|
BuildRequires: %{python_module pyflakes >= 2.1.1}
|
|
# Use pytest directly to bypass setup.py test dependencies
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module typing}
|
|
# /SECTION
|
|
BuildRequires: fdupes
|
|
Requires: python-attrs
|
|
Requires: python-base >= 3.6.0
|
|
Requires: python-flake8 >= 3.2.1
|
|
Requires: python-pyflakes >= 2.1.1
|
|
Requires: python-typing
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
%description
|
|
A plugin for Flake8 that provides specializations for type hinting stub
|
|
files. Especially interesting for linting typeshed.
|
|
|
|
%prep
|
|
%autosetup -p1 -n flake8-pyi-%{version}
|
|
sed -i '1{\,^#!%{_bindir}/env python,d}' pyi.py
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest -v tests
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{python_sitelib}/pyi.py*
|
|
%{pycache_only %{python_sitelib}/__pycache__/pyi.*.py*}
|
|
%{python_sitelib}/flake8_pyi-%{version}-*.egg-info
|
|
|
|
%changelog
|