Fix linting error
Signed-off-by: zhangliangpengkun <zhangliangpengkun@xfusion.com>
This commit is contained in:
parent
9eb1fd8094
commit
8db2af828a
44
Fix-linting-error.patch
Normal file
44
Fix-linting-error.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
From 8ddbad9ccdc176b9d57a4aff0076c1c58c455318 Mon Sep 17 00:00:00 2001
|
||||||
|
From: DailyDreaming <lblauvel@ucsc.edu>
|
||||||
|
Date: Mon, 2 May 2022 07:46:09 -0700
|
||||||
|
Subject: [PATCH] Fix linting error.
|
||||||
|
|
||||||
|
Suppress mypy.
|
||||||
|
|
||||||
|
Suppress mypy error.
|
||||||
|
|
||||||
|
Suppress mypy error.
|
||||||
|
---
|
||||||
|
src/flask/cli.py | 9 ++++++++-
|
||||||
|
1 file changed, 8 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/flask/cli.py b/src/flask/cli.py
|
||||||
|
index 36c4f1b6..efcc0f99 100644
|
||||||
|
--- a/src/flask/cli.py
|
||||||
|
+++ b/src/flask/cli.py
|
||||||
|
@@ -9,6 +9,8 @@ from functools import update_wrapper
|
||||||
|
from operator import attrgetter
|
||||||
|
from threading import Lock
|
||||||
|
from threading import Thread
|
||||||
|
+from typing import Any
|
||||||
|
+from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
import click
|
||||||
|
from werkzeug.utils import import_string
|
||||||
|
@@ -36,7 +38,12 @@ else:
|
||||||
|
# We technically have importlib.metadata on 3.8+,
|
||||||
|
# but the API changed in 3.10, so use the backport
|
||||||
|
# for consistency.
|
||||||
|
- import importlib_metadata as metadata # type: ignore
|
||||||
|
+ if TYPE_CHECKING:
|
||||||
|
+ metadata: Any
|
||||||
|
+ else:
|
||||||
|
+ # we do this to avoid a version dependent mypy error
|
||||||
|
+ # because importlib_metadata is not installed in python3.10+
|
||||||
|
+ import importlib_metadata as metadata
|
||||||
|
|
||||||
|
|
||||||
|
class NoAppException(click.UsageError):
|
||||||
|
--
|
||||||
|
2.39.0.windows.2
|
||||||
|
|
||||||
@ -1,11 +1,13 @@
|
|||||||
Name: python-flask
|
Name: python-flask
|
||||||
Version: 2.1.2
|
Version: 2.1.2
|
||||||
Release: 1
|
Release: 2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: A lightweight WSGI web application framework
|
Summary: A lightweight WSGI web application framework
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
URL: https://palletsprojects.com/p/flask/
|
URL: https://palletsprojects.com/p/flask/
|
||||||
Source0: https://files.pythonhosted.org/packages/source/F/Flask/Flask-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/F/Flask/Flask-%{version}.tar.gz
|
||||||
|
Patch0: Fix-linting-error.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-setuptools python3-pytest python3-jinja2 python3-werkzeug python3-itsdangerous python3-click
|
BuildRequires: python3-devel python3-setuptools python3-pytest python3-jinja2 python3-werkzeug python3-itsdangerous python3-click
|
||||||
@ -26,7 +28,7 @@ Requires: python3-jinja2 python3-werkzeug python3-itsdangerous python3-cl
|
|||||||
Python-flask for python 3 version
|
Python-flask for python 3 version
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n Flask-%{version}
|
%autosetup -n Flask-%{version} -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -51,6 +53,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -v || :
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 9 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 1:2.1.2-2
|
||||||
|
- Fix linting error.
|
||||||
|
|
||||||
* Thu Jun 23 2022 houyingchao <houyingchao@h-partners.com> - 1:2.1.2-1
|
* Thu Jun 23 2022 houyingchao <houyingchao@h-partners.com> - 1:2.1.2-1
|
||||||
- Upgrade to 2.1.2 version
|
- Upgrade to 2.1.2 version
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user