!20 Added return types to docstrings, and fixed description of getDPI()'s…
From: @zhang-liang-pengkun Reviewed-by: @Charlie_li Signed-off-by: @Charlie_li
This commit is contained in:
commit
e450ee05ef
@ -0,0 +1,36 @@
|
|||||||
|
From 2f73f20f73cfe097d6838b45eee22cb300d9cc04 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tyler Young <tyler@x-plane.com>
|
||||||
|
Date: Tue, 27 Aug 2019 12:43:35 -0500
|
||||||
|
Subject: [PATCH] Added return types to docstrings, and fixed description of
|
||||||
|
getDPI()'s return
|
||||||
|
|
||||||
|
---
|
||||||
|
imagesize.py | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/imagesize.py b/imagesize.py
|
||||||
|
index 2717240..b0fbfb2 100644
|
||||||
|
--- a/imagesize.py
|
||||||
|
+++ b/imagesize.py
|
||||||
|
@@ -56,6 +56,7 @@ def get(filepath):
|
||||||
|
"""
|
||||||
|
Return (width, height) for a given img file content
|
||||||
|
no requirements
|
||||||
|
+ :rtype Tuple[int, int]
|
||||||
|
"""
|
||||||
|
height = -1
|
||||||
|
width = -1
|
||||||
|
@@ -153,8 +154,9 @@ def get(filepath):
|
||||||
|
|
||||||
|
def getDPI(filepath):
|
||||||
|
"""
|
||||||
|
- Return (width, height) for a given img file content
|
||||||
|
+ Return (x DPI, y DPI) for a given img file content
|
||||||
|
no requirements
|
||||||
|
+ :rtype Tuple[int, int]
|
||||||
|
"""
|
||||||
|
xDPI = -1
|
||||||
|
yDPI = -1
|
||||||
|
--
|
||||||
|
2.39.0.windows.2
|
||||||
|
|
||||||
@ -1,10 +1,11 @@
|
|||||||
Name: python-imagesize
|
Name: python-imagesize
|
||||||
Version: 1.1.0
|
Version: 1.1.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: This module analyzes image headers and returns image size.
|
Summary: This module analyzes image headers and returns image size.
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/shibukawa/imagesize_py
|
URL: https://github.com/shibukawa/imagesize_py
|
||||||
Source0: https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/i/imagesize/imagesize-%{version}.tar.gz
|
||||||
|
Patch01: 0001-Added-return-types-to-docstrings-and-fixed-descripti.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-setuptools python2-devel python2-pytest python3-setuptools
|
BuildRequires: python2-setuptools python2-devel python2-pytest python3-setuptools
|
||||||
BuildRequires: python3-devel python3-pytest
|
BuildRequires: python3-devel python3-pytest
|
||||||
@ -27,7 +28,7 @@ Summary: This module analyzes image headers and returns image size.
|
|||||||
This module analyzes JPEG/JPEG 2000/PNG/GIF/TIFF image headers and returns image size.
|
This module analyzes JPEG/JPEG 2000/PNG/GIF/TIFF image headers and returns image size.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n imagesize-%{version}
|
%autosetup -n imagesize-%{version} -p1
|
||||||
rm -rf imagesize.egg-info
|
rm -rf imagesize.egg-info
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
@ -48,6 +49,10 @@ py.test-3
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|
||||||
|
* Thu Oct 19 2023 zhangliangpengkun<zhangliangpengkun@xfusion.com> - 1.1.0-2
|
||||||
|
- Added return types to docstrings, and fixed description of getDPI()'s…
|
||||||
|
|
||||||
* Tue Aug 04 2020 Yeqing Peng <pengyeqing@huawei.com> - 1.1.0-1
|
* Tue Aug 04 2020 Yeqing Peng <pengyeqing@huawei.com> - 1.1.0-1
|
||||||
- update to 1.1.0
|
- update to 1.1.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user