forked from pool/python-restructuredtext_lint
Accepting request 688056 from home:jayvdb:coala:python3-bears
- Removed no longer needed python37.patch - Update to v1.3.0 * Added Python 3.7 support OBS-URL: https://build.opensuse.org/request/show/688056 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-restructuredtext_lint?expand=0&rev=9
This commit is contained in:
committed by
Git OBS Bridge
parent
5173005055
commit
c0e139d9a6
@@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 25 03:03:34 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
- Removed no longer needed python37.patch
|
||||||
|
- Update to v1.3.0
|
||||||
|
* Added Python 3.7 support
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 14 06:31:00 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
Thu Feb 14 06:31:00 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@@ -18,14 +18,13 @@
|
|||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-restructuredtext_lint
|
Name: python-restructuredtext_lint
|
||||||
Version: 1.2.2
|
Version: 1.3.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Linter for reStructuredText
|
Summary: Linter for reStructuredText
|
||||||
License: Unlicense
|
License: Unlicense
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Url: https://github.com/twolfson/restructuredtext-lint
|
Url: https://github.com/twolfson/restructuredtext-lint
|
||||||
Source: https://files.pythonhosted.org/packages/source/r/restructuredtext_lint/restructuredtext_lint-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/r/restructuredtext_lint/restructuredtext_lint-%{version}.tar.gz
|
||||||
Patch0: python37.patch
|
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@@ -46,7 +45,6 @@ in junction with a Sublime Text linter.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n restructuredtext_lint-%{version}
|
%setup -q -n restructuredtext_lint-%{version}
|
||||||
%patch0 -p1
|
|
||||||
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
@@ -1,68 +0,0 @@
|
|||||||
Index: restructuredtext_lint-1.2.1/restructuredtext_lint/test/test.py
|
|
||||||
===================================================================
|
|
||||||
--- restructuredtext_lint-1.2.1.orig/restructuredtext_lint/test/test.py
|
|
||||||
+++ restructuredtext_lint-1.2.1/restructuredtext_lint/test/test.py
|
|
||||||
@@ -9,12 +9,12 @@
|
|
||||||
import restructuredtext_lint
|
|
||||||
|
|
||||||
|
|
||||||
-__dir__ = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
-valid_rst = os.path.join(__dir__, 'test_files', 'valid.rst')
|
|
||||||
-warning_rst = os.path.join(__dir__, 'test_files', 'second_short_heading.rst')
|
|
||||||
-dir_rst = os.path.join(__dir__, 'test_files', 'dir')
|
|
||||||
-invalid_rst = os.path.join(__dir__, 'test_files', 'invalid.rst')
|
|
||||||
-rst_lint_path = os.path.join(__dir__, os.pardir, 'cli.py')
|
|
||||||
+_dir = os.path.dirname(os.path.abspath(__file__))
|
|
||||||
+valid_rst = os.path.join(_dir, 'test_files', 'valid.rst')
|
|
||||||
+warning_rst = os.path.join(_dir, 'test_files', 'second_short_heading.rst')
|
|
||||||
+dir_rst = os.path.join(_dir, 'test_files', 'dir')
|
|
||||||
+invalid_rst = os.path.join(_dir, 'test_files', 'invalid.rst')
|
|
||||||
+rst_lint_path = os.path.join(_dir, os.pardir, 'cli.py')
|
|
||||||
|
|
||||||
"""
|
|
||||||
# TODO: Implement this as a class (options) with a sugar function that lints a string against a set of options
|
|
||||||
@@ -58,7 +58,7 @@
|
|
||||||
|
|
||||||
def test_encoding_utf8(self):
|
|
||||||
"""A document with utf-8 characters is valid."""
|
|
||||||
- filepath = os.path.join(__dir__, 'test_files', 'utf8.rst')
|
|
||||||
+ filepath = os.path.join(_dir, 'test_files', 'utf8.rst')
|
|
||||||
errors = restructuredtext_lint.lint_file(filepath, encoding='utf-8')
|
|
||||||
self.assertEqual(errors, [])
|
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|
||||||
|
|
||||||
This is a regression test for https://github.com/twolfson/restructuredtext-lint/issues/5
|
|
||||||
"""
|
|
||||||
- filepath = os.path.join(__dir__, 'test_files', 'second_short_heading.rst')
|
|
||||||
+ filepath = os.path.join(_dir, 'test_files', 'second_short_heading.rst')
|
|
||||||
errors = restructuredtext_lint.lint_file(filepath)
|
|
||||||
self.assertEqual(errors[0].line, 6)
|
|
||||||
self.assertEqual(errors[0].source, filepath)
|
|
||||||
@@ -77,7 +77,7 @@
|
|
||||||
|
|
||||||
This is a regression test for https://github.com/twolfson/restructuredtext-lint/issues/6
|
|
||||||
"""
|
|
||||||
- filepath = os.path.join(__dir__, 'test_files', 'invalid_target.rst')
|
|
||||||
+ filepath = os.path.join(_dir, 'test_files', 'invalid_target.rst')
|
|
||||||
errors = restructuredtext_lint.lint_file(filepath)
|
|
||||||
self.assertIn('Unknown target name', errors[0].message)
|
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@
|
|
||||||
|
|
||||||
This is a regression test for https://github.com/twolfson/restructuredtext-lint/issues/7
|
|
||||||
"""
|
|
||||||
- filepath = os.path.join(__dir__, 'test_files', 'invalid_line_mismatch.rst')
|
|
||||||
+ filepath = os.path.join(_dir, 'test_files', 'invalid_line_mismatch.rst')
|
|
||||||
errors = restructuredtext_lint.lint_file(filepath)
|
|
||||||
self.assertIn('Title overline & underline mismatch', errors[0].message)
|
|
||||||
|
|
||||||
@@ -95,7 +95,7 @@
|
|
||||||
|
|
||||||
This is a regression test for https://github.com/twolfson/restructuredtext-lint/issues/12
|
|
||||||
"""
|
|
||||||
- filepath = os.path.join(__dir__, 'test_files', 'invalid_link.rst')
|
|
||||||
+ filepath = os.path.join(_dir, 'test_files', 'invalid_link.rst')
|
|
||||||
errors = restructuredtext_lint.lint_file(filepath)
|
|
||||||
self.assertIn('Anonymous hyperlink mismatch: 1 references but 0 targets.', errors[0].message)
|
|
||||||
self.assertIn('Hyperlink target "hello" is not referenced.', errors[1].message)
|
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:82880a8de8a41bfc84f533744091b1ead8e2ab9ad6c0a3f60f4750ef6c802350
|
|
||||||
size 18982
|
|
3
restructuredtext_lint-1.3.0.tar.gz
Normal file
3
restructuredtext_lint-1.3.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:97b3da356d5b3a8514d8f1f9098febd8b41463bed6a1d9f126cf0a048b6fd908
|
||||||
|
size 19008
|
Reference in New Issue
Block a user