2018-10-23 10:09:37 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-flake8-pyi
|
|
|
|
|
#
|
2024-01-06 17:20:35 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2018-10-23 10:09:37 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-12-08 21:25:15 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2018-10-23 10:09:37 +00:00
|
|
|
|
- update to 23.11.0:
* Y058: Use `Iterator` rather than `Generator` as the return
value for simple `__iter__` methods, and `AsyncIterator` rather
than `AsyncGenerator` as the return value for simple `__aiter__`
methods.
* Y059: `Generic[]` should always be the last base class, if it
is present in the bases of a class.
* Y060, which flags redundant inheritance from `Generic[]`.
* Y061: Do not use `None` inside a `Literal[]` slice.
* For example, use `Literal["foo"] | None` instead of
`Literal["foo", None]`.
* Y022 and Y037 now flag more imports from `typing_extensions`.
* Y034 now attempts to avoid flagging methods inside classes
that inherit from `builtins.type`, `abc.ABCMeta` and/or
`enum.EnumMeta`. Classes that have one or more of these as
bases are metaclasses, and PEP 673 forbids the use of
`typing(_extensions).Self` for metaclasses.
* Attempting to import `typing_extensions.Text` now causes Y039
to be emitted rather than Y023.
* Y053 will no longer be emitted for the argument to
`@typing_extensions.deprecated`.
* Introduce Y090, which warns if you have an annotation such as
`tuple[int]` or `Tuple[int]`. These mean "a tuple of length 1,
in which the sole element is of type `int`". This is sometimes
what you want, but more usually you'll want `tuple[int, ...]`,
which means "a tuple of arbitrary (possibly 0) length, in
which all elements are of type `int`".
* Y011 now ignores `sentinel` and `_typeshed.sentinel` in
default values.
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=21
2023-12-05 21:09:18 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-10-23 10:09:37 +00:00
|
|
|
Name: python-flake8-pyi
|
2024-10-29 21:16:10 +00:00
|
|
|
Version: 24.9.0
|
2018-10-23 10:09:37 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: A plugin for flake8 to enable linting .pyi files
|
2018-12-08 21:25:15 +00:00
|
|
|
License: MIT
|
2018-10-23 10:09:37 +00:00
|
|
|
Group: Development/Languages/Python
|
2020-05-16 09:20:27 +00:00
|
|
|
URL: https://github.com/ambv/flake8-pyi
|
2023-03-06 15:56:20 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/f/flake8-pyi/flake8_pyi-%{version}.tar.gz
|
|
|
|
|
# PATCH-FIX-OPENSUSE set-tests-python-path.patch, patch to fix
|
|
|
|
|
# PYTHONPATH resolution for tests running inside osc
|
|
|
|
|
Patch0: set-tests-python-path.patch
|
Accepting request 1105894 from home:mcalabkova:branches:devel:languages:python
- Update to 23.6.0
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
math.pi, math.tau, and their negatives in default values. Some
other semantically equivalent values, such as x = inf (from math
import inf), or x = np.inf (import numpy as np), should be rewritten
to x = math.inf.
* Y053: Disallow string or bytes literals with length >50 characters.
Previously this rule only applied to parameter default values;
it now applies everywhere.
* Y054: Disallow numeric literals with a string representation >10
characters long. Previously this rule only applied to parameter
default values; it now applies everywhere.
* Y055: Unions of the form type[X] | type[Y] can be simplified to type[X | Y].
* The way in which flake8-pyi modifies pyflakes runs has been improved.
* Introduce Y056: Various type checkers have different levels of support
for method calls on __all__. Use __all__ += ["foo", "bar"] instead,
as this is known to be supported by all major type checkers.
* Support Python 3.12
* Support PEP 695 syntax for declaring type aliases
* Introduce Y057: Do not use typing.ByteString or collections.abc.ByteString.
* flake8-pyi no longer supports being run on Python 3.7.
* flake8-pyi no longer supports being run with flake8 <v6.
OBS-URL: https://build.opensuse.org/request/show/1105894
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=19
2023-08-25 18:47:40 +00:00
|
|
|
BuildRequires: %{python_module base >= 3.8.0}
|
- update to 23.11.0:
* Y058: Use `Iterator` rather than `Generator` as the return
value for simple `__iter__` methods, and `AsyncIterator` rather
than `AsyncGenerator` as the return value for simple `__aiter__`
methods.
* Y059: `Generic[]` should always be the last base class, if it
is present in the bases of a class.
* Y060, which flags redundant inheritance from `Generic[]`.
* Y061: Do not use `None` inside a `Literal[]` slice.
* For example, use `Literal["foo"] | None` instead of
`Literal["foo", None]`.
* Y022 and Y037 now flag more imports from `typing_extensions`.
* Y034 now attempts to avoid flagging methods inside classes
that inherit from `builtins.type`, `abc.ABCMeta` and/or
`enum.EnumMeta`. Classes that have one or more of these as
bases are metaclasses, and PEP 673 forbids the use of
`typing(_extensions).Self` for metaclasses.
* Attempting to import `typing_extensions.Text` now causes Y039
to be emitted rather than Y023.
* Y053 will no longer be emitted for the argument to
`@typing_extensions.deprecated`.
* Introduce Y090, which warns if you have an annotation such as
`tuple[int]` or `Tuple[int]`. These mean "a tuple of length 1,
in which the sole element is of type `int`". This is sometimes
what you want, but more usually you'll want `tuple[int, ...]`,
which means "a tuple of arbitrary (possibly 0) length, in
which all elements are of type `int`".
* Y011 now ignores `sentinel` and `_typeshed.sentinel` in
default values.
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=21
2023-12-05 21:09:18 +00:00
|
|
|
BuildRequires: %{python_module hatch_vcs}
|
2023-03-06 15:56:20 +00:00
|
|
|
BuildRequires: %{python_module hatchling}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
|
BuildRequires: %{python_module wheel}
|
2018-12-08 21:25:15 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2018-10-23 10:09:37 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module attrs}
|
Accepting request 1105894 from home:mcalabkova:branches:devel:languages:python
- Update to 23.6.0
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
math.pi, math.tau, and their negatives in default values. Some
other semantically equivalent values, such as x = inf (from math
import inf), or x = np.inf (import numpy as np), should be rewritten
to x = math.inf.
* Y053: Disallow string or bytes literals with length >50 characters.
Previously this rule only applied to parameter default values;
it now applies everywhere.
* Y054: Disallow numeric literals with a string representation >10
characters long. Previously this rule only applied to parameter
default values; it now applies everywhere.
* Y055: Unions of the form type[X] | type[Y] can be simplified to type[X | Y].
* The way in which flake8-pyi modifies pyflakes runs has been improved.
* Introduce Y056: Various type checkers have different levels of support
for method calls on __all__. Use __all__ += ["foo", "bar"] instead,
as this is known to be supported by all major type checkers.
* Support Python 3.12
* Support PEP 695 syntax for declaring type aliases
* Introduce Y057: Do not use typing.ByteString or collections.abc.ByteString.
* flake8-pyi no longer supports being run on Python 3.7.
* flake8-pyi no longer supports being run with flake8 <v6.
OBS-URL: https://build.opensuse.org/request/show/1105894
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=19
2023-08-25 18:47:40 +00:00
|
|
|
BuildRequires: %{python_module flake8 >= 6.0.0}
|
2019-03-07 16:44:51 +00:00
|
|
|
BuildRequires: %{python_module pyflakes >= 2.1.1}
|
2019-02-28 10:44:16 +00:00
|
|
|
# Use pytest directly to bypass setup.py test dependencies
|
2018-10-23 10:09:37 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2023-03-06 15:56:20 +00:00
|
|
|
BuildRequires: %{python_module black}
|
|
|
|
|
BuildRequires: %{python_module flake8-bugbear}
|
- update to 23.11.0:
* Y058: Use `Iterator` rather than `Generator` as the return
value for simple `__iter__` methods, and `AsyncIterator` rather
than `AsyncGenerator` as the return value for simple `__aiter__`
methods.
* Y059: `Generic[]` should always be the last base class, if it
is present in the bases of a class.
* Y060, which flags redundant inheritance from `Generic[]`.
* Y061: Do not use `None` inside a `Literal[]` slice.
* For example, use `Literal["foo"] | None` instead of
`Literal["foo", None]`.
* Y022 and Y037 now flag more imports from `typing_extensions`.
* Y034 now attempts to avoid flagging methods inside classes
that inherit from `builtins.type`, `abc.ABCMeta` and/or
`enum.EnumMeta`. Classes that have one or more of these as
bases are metaclasses, and PEP 673 forbids the use of
`typing(_extensions).Self` for metaclasses.
* Attempting to import `typing_extensions.Text` now causes Y039
to be emitted rather than Y023.
* Y053 will no longer be emitted for the argument to
`@typing_extensions.deprecated`.
* Introduce Y090, which warns if you have an annotation such as
`tuple[int]` or `Tuple[int]`. These mean "a tuple of length 1,
in which the sole element is of type `int`". This is sometimes
what you want, but more usually you'll want `tuple[int, ...]`,
which means "a tuple of arbitrary (possibly 0) length, in
which all elements are of type `int`".
* Y011 now ignores `sentinel` and `_typeshed.sentinel` in
default values.
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=21
2023-12-05 21:09:18 +00:00
|
|
|
BuildRequires: %{python_module pytest-xdist}
|
2019-03-07 16:44:51 +00:00
|
|
|
BuildRequires: %{python_module typing}
|
2018-10-23 10:09:37 +00:00
|
|
|
# /SECTION
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
Requires: python-attrs
|
Accepting request 1105894 from home:mcalabkova:branches:devel:languages:python
- Update to 23.6.0
* Y011/Y014/Y015: Allow math constants math.inf, math.nan, math.e,
math.pi, math.tau, and their negatives in default values. Some
other semantically equivalent values, such as x = inf (from math
import inf), or x = np.inf (import numpy as np), should be rewritten
to x = math.inf.
* Y053: Disallow string or bytes literals with length >50 characters.
Previously this rule only applied to parameter default values;
it now applies everywhere.
* Y054: Disallow numeric literals with a string representation >10
characters long. Previously this rule only applied to parameter
default values; it now applies everywhere.
* Y055: Unions of the form type[X] | type[Y] can be simplified to type[X | Y].
* The way in which flake8-pyi modifies pyflakes runs has been improved.
* Introduce Y056: Various type checkers have different levels of support
for method calls on __all__. Use __all__ += ["foo", "bar"] instead,
as this is known to be supported by all major type checkers.
* Support Python 3.12
* Support PEP 695 syntax for declaring type aliases
* Introduce Y057: Do not use typing.ByteString or collections.abc.ByteString.
* flake8-pyi no longer supports being run on Python 3.7.
* flake8-pyi no longer supports being run with flake8 <v6.
OBS-URL: https://build.opensuse.org/request/show/1105894
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8-pyi?expand=0&rev=19
2023-08-25 18:47:40 +00:00
|
|
|
Requires: python-base >= 3.8.0
|
|
|
|
|
Requires: python-flake8 >= 6.0.0
|
2019-03-07 16:44:51 +00:00
|
|
|
Requires: python-pyflakes >= 2.1.1
|
|
|
|
|
Requires: python-typing
|
2018-10-23 10:09:37 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
A plugin for Flake8 that provides specializations for type hinting stub
|
2020-05-16 09:20:27 +00:00
|
|
|
files. Especially interesting for linting typeshed.
|
2018-10-23 10:09:37 +00:00
|
|
|
|
|
|
|
|
%prep
|
2023-03-06 15:56:20 +00:00
|
|
|
%autosetup -p1 -n flake8_pyi-%{version}
|
2018-10-23 10:09:37 +00:00
|
|
|
sed -i '1{\,^#!%{_bindir}/env python,d}' pyi.py
|
|
|
|
|
|
|
|
|
|
%build
|
2023-03-06 15:56:20 +00:00
|
|
|
%pyproject_wheel
|
2018-10-23 10:09:37 +00:00
|
|
|
|
|
|
|
|
%install
|
2023-03-06 15:56:20 +00:00
|
|
|
%pyproject_install
|
2020-05-16 09:20:27 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2018-10-23 10:09:37 +00:00
|
|
|
|
|
|
|
|
%check
|
2020-05-16 09:20:27 +00:00
|
|
|
%pytest -v tests
|
2018-10-23 10:09:37 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
2019-02-28 10:44:16 +00:00
|
|
|
%license LICENSE
|
2022-11-04 15:51:21 +00:00
|
|
|
%doc README.md
|
2020-05-16 09:20:27 +00:00
|
|
|
%{python_sitelib}/pyi.py*
|
|
|
|
|
%{pycache_only %{python_sitelib}/__pycache__/pyi.*.py*}
|
2023-03-06 15:56:20 +00:00
|
|
|
%{python_sitelib}/flake8_pyi-%{version}*-info
|
2018-10-23 10:09:37 +00:00
|
|
|
|
|
|
|
|
%changelog
|