1
0
forked from pool/python-flake8

4 Commits

Author SHA256 Message Date
b4c172dfc7 Accepting request 1291284 from devel:languages:python
- Convert to libalternatives

OBS-URL: https://build.opensuse.org/request/show/1291284
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flake8?expand=0&rev=48
2025-07-09 15:26:15 +00:00
4e2d3d434b - Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=99
2025-07-08 13:28:42 +00:00
5a0a6a0aab Accepting request 1269469 from devel:languages:python
- update to 7.2.0:
  * pycodestyle has been updated to >= 2.13.0, < 2.14.0
  * pyflakes has been updated to >= 3.3.0, < 3.4.0
  * Require python >= 3.9 (See also :pull:`1973`).

OBS-URL: https://build.opensuse.org/request/show/1269469
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-flake8?expand=0&rev=47
2025-05-20 07:30:56 +00:00
d072610c3a - update to 7.2.0:
* pycodestyle has been updated to >= 2.13.0, < 2.14.0
  * pyflakes has been updated to >= 3.3.0, < 3.4.0
  * Require python >= 3.9 (See also :pull:`1973`).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flake8?expand=0&rev=97
2025-04-15 07:55:11 +00:00
5 changed files with 37 additions and 26 deletions

BIN
flake8-7.1.1.tar.gz (Stored with Git LFS)

Binary file not shown.

BIN
flake8-7.2.0.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -3,9 +3,9 @@ from __future__ import annotations
import inspect
import os.path
from collections.abc import Generator
from typing import Any
from typing import Callable
from typing import Generator
from typing import NamedTuple
import pycodestyle
@ -42,7 +42,7 @@ class Call(NamedTuple):
return cls(func.__name__, inspect.isgeneratorfunction(func), params)
def lines() -> Generator[str, None, None]:
def lines() -> Generator[str]:
logical = []
physical = []
@ -58,8 +58,8 @@ def lines() -> Generator[str, None, None]:
yield "# fmt: off"
yield "from __future__ import annotations"
yield ""
yield "from collections.abc import Generator"
yield "from typing import Any"
yield "from typing import Generator"
yield ""
imports = sorted(call.name for call in logical + physical)
for name in imports:
@ -71,7 +71,7 @@ def lines() -> Generator[str, None, None]:
logical_params = {param for call in logical for param in call.params}
for param in sorted(logical_params):
yield f" {param}: Any,"
yield ") -> Generator[tuple[int, str], None, None]:"
yield ") -> Generator[tuple[int, str]]:"
yield ' """Run pycodestyle logical checks."""'
for call in sorted(logical):
yield call.to_src()
@ -82,7 +82,7 @@ def lines() -> Generator[str, None, None]:
physical_params = {param for call in physical for param in call.params}
for param in sorted(physical_params):
yield f" {param}: Any,"
yield ") -> Generator[tuple[int, str], None, None]:"
yield ") -> Generator[tuple[int, str]]:"
yield ' """Run pycodestyle physical checks."""'
for call in sorted(physical):
yield call.to_src()

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Jul 8 13:27:59 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Tue Apr 15 07:54:43 UTC 2025 - Dirk Müller <dmueller@suse.com>
- update to 7.2.0:
* pycodestyle has been updated to >= 2.13.0, < 2.14.0
* pyflakes has been updated to >= 3.3.0, < 3.4.0
* Require python >= 3.9 (See also :pull:`1973`).
-------------------------------------------------------------------
Wed Aug 21 17:52:22 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-flake8
#
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,9 +16,10 @@
#
%bcond_without libalternatives
%{?sle15_python_module_pythons}
Name: python-flake8
Version: 7.1.1
Version: 7.2.0
Release: 0
Summary: Modular source code checker: pep8, pyflakes and co
License: MIT
@ -30,21 +31,21 @@ BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module mccabe >= 0.7.0 with %python-mccabe < 0.8.0}
BuildRequires: %{python_module pycodestyle >= 2.12.0 with %python-pycodestyle < 2.13.0}
BuildRequires: %{python_module pyflakes >= 3.2.0 with %python-pyflakes < 3.3.0}
BuildRequires: %{python_module pytest}
# /SECTION
BuildArch: noarch
# https://flake8.pycqa.org/en/latest/faq.html#why-does-flake8-use-ranges-for-its-dependencies
Requires: (python-mccabe >= 0.7.0 with python-mccabe < 0.8.0)
Requires: (python-pycodestyle >= 2.12.0 with python-pycodestyle < 2.13.0)
Requires: (python-pyflakes >= 3.2.0 with python-pyflakes < 3.3.0)
Requires(post): update-alternatives
Requires(postun): update-alternatives
Requires: alts
Requires: (python-pycodestyle >= 2.13.0 with python-pycodestyle < 2.14.0)
Requires: (python-pyflakes >= 3.3.0 with python-pyflakes < 3.4.0)
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module mccabe >= 0.7.0 with %python-mccabe < 0.8.0}
BuildRequires: %{python_module pycodestyle >= 2.13.0 with %python-pycodestyle < 2.14.0}
BuildRequires: %{python_module pyflakes >= 3.3.0 with %python-pyflakes < 3.4.0}
BuildRequires: %{python_module pytest}
# /SECTION
%python_subpackages
%description
@ -78,11 +79,8 @@ install -m 0755 -D %{SOURCE2} bin/gen-pycodestyle-plugin
%python_clone -a %{buildroot}%{_bindir}/flake8
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%post
%python_install_alternative flake8
%postun
%python_uninstall_alternative flake8
%pre
%python_libalternatives_reset_alternative flake8
%check
%pytest tests