From fe67009e9de74972c6969a0501d5400b5b1d7d17 Mon Sep 17 00:00:00 2001 From: Gavish Date: Thu, 29 Jul 2021 08:59:15 +0000 Subject: [PATCH 1/7] Fixing E402 module level import not at top of file in dateparser/docs/conf.py --- docs/conf.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 0950f217f..16b1a17ea 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,6 +13,7 @@ import sys import os +import dateparser # Get the project root dir, which is the parent dir of this cwd = os.getcwd() @@ -23,8 +24,6 @@ # version is used. sys.path.insert(0, project_root) -import dateparser - # -- General configuration --------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be From 4957d101dff28e1f954c9382f14eaeef8dd02cc6 Mon Sep 17 00:00:00 2001 From: Gavish Date: Thu, 29 Jul 2021 09:28:23 +0000 Subject: [PATCH 2/7] Fixing UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 1442: character maps to in Windows --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 422a8f833..64bf7e040 100644 --- a/setup.py +++ b/setup.py @@ -3,8 +3,8 @@ __version__ = re.search(r"__version__.*\s*=\s*[']([^']+)[']", open('dateparser/__init__.py').read()).group(1) -introduction = re.sub(r':members:.+|..\sautomodule::.+|:class:|:func:|:ref:', '', open('docs/introduction.rst').read()) -history = re.sub(r':mod:|:class:|:func:', '', open('HISTORY.rst').read()) +introduction = re.sub(r':members:.+|..\sautomodule::.+|:class:|:func:|:ref:', '', open('docs/introduction.rst', encoding="utf8").read()) +history = re.sub(r':mod:|:class:|:func:', '', open('HISTORY.rst', encoding="utf8").read()) test_requirements = open('tests/requirements.txt').read().splitlines() From b258cb89c11539b3ea0e45149b17b46721047d6b Mon Sep 17 00:00:00 2001 From: Gavish Date: Sat, 7 Aug 2021 13:02:35 +0000 Subject: [PATCH 3/7] dateparser/docs/conf.py E402 line from the pytest.ini --- pytest.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index 5cfe06991..2db53b5bd 100644 --- a/pytest.ini +++ b/pytest.ini @@ -20,4 +20,3 @@ flake8-ignore = # Issues pending a review: dateparser/freshness_date_parser.py E722 dateparser/parser.py E722 - dateparser/docs/conf.py E402 From eab4ec51a37b0f3b621c47e67bb48a9718c4a364 Mon Sep 17 00:00:00 2001 From: Gavish Date: Thu, 19 Aug 2021 12:35:48 +0000 Subject: [PATCH 4/7] updates from suggestions --- docs/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 16b1a17ea..3ff2c91b8 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -13,7 +13,6 @@ import sys import os -import dateparser # Get the project root dir, which is the parent dir of this cwd = os.getcwd() @@ -24,6 +23,8 @@ # version is used. sys.path.insert(0, project_root) +import dateparser # noqa: E402 + # -- General configuration --------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be From 112aabb102c3923f5185cef9b84adb4d3590c3d6 Mon Sep 17 00:00:00 2001 From: Gavish Date: Sat, 28 Aug 2021 17:48:09 +0000 Subject: [PATCH 5/7] updating tests --- tests/test_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_search.py b/tests/test_search.py index 1ea7b7bff..2eb3a3973 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -527,7 +527,7 @@ def test_relative_base_setting(self, shortname, string, expected, settings=None) ), ('July 13th', datetime.datetime(2014, 7, 13, 0, 0)), ('July 14th', datetime.datetime(2014, 7, 14, 0, 0))]), - param('en', 'July 13th 2014 July 14th 2014', + param('en', 'July 13th 2014. July 14th 2014', [('July 13th 2014', datetime.datetime(2014, 7, 13, 0, 0)), ('July 14th 2014', datetime.datetime(2014, 7, 14, 0, 0))]), param('en', 'July 13th 2014 July 14th', From 841a85b1c151163b501cb99819b6e2ffa6b3dfed Mon Sep 17 00:00:00 2001 From: Gavish Date: Sat, 28 Aug 2021 17:48:23 +0000 Subject: [PATCH 6/7] updating tests --- tests/test_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_search.py b/tests/test_search.py index 2eb3a3973..1ea7b7bff 100644 --- a/tests/test_search.py +++ b/tests/test_search.py @@ -527,7 +527,7 @@ def test_relative_base_setting(self, shortname, string, expected, settings=None) ), ('July 13th', datetime.datetime(2014, 7, 13, 0, 0)), ('July 14th', datetime.datetime(2014, 7, 14, 0, 0))]), - param('en', 'July 13th 2014. July 14th 2014', + param('en', 'July 13th 2014 July 14th 2014', [('July 13th 2014', datetime.datetime(2014, 7, 13, 0, 0)), ('July 14th 2014', datetime.datetime(2014, 7, 14, 0, 0))]), param('en', 'July 13th 2014 July 14th', From a2838e52b2a9b441333b7089bb10e0d8b972d42c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A1n=20Chaves?= Date: Mon, 4 Oct 2021 10:08:03 +0200 Subject: [PATCH 7/7] Update pytest.ini --- pytest.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytest.ini b/pytest.ini index d8e612fa1..1a75689bf 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,4 +1,4 @@ [pytest] addopts = --doctest-modules - --assert=plain \ No newline at end of file + --assert=plain