diff --git a/.pylintrc b/.pylintrc index ed752d6..805da9d 100644 --- a/.pylintrc +++ b/.pylintrc @@ -2,6 +2,10 @@ extension-pkg-whitelist=math +[BASIC] + +no-docstring-rgx=^test_ + [MESSAGES CONTROL] [TYPECHECK] diff --git a/README.md b/README.md index ae16274..651cdcb 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ tables are separate from OpenStreetMap tables and get queried at search time sep The dataset gets updated once per year. Downloading is prone to be slow (can take a full day) and converting them can take hours as well. There's a mirror on https://downloads.opencagedata.com/public/ -Replace '2020' with the current year throughout. +Replace '2021' with the current year throughout. 1. Install the GDAL library and python bindings and the unzip tool diff --git a/tests/__init__.py b/tests/__init__.py index 956ba6f..7bc95fc 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,2 +1,3 @@ import sys +import pytest sys.path.insert(0,'.') diff --git a/tests/test_convert.py b/tests/test_convert.py index c275027..51e63b0 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -1,5 +1,3 @@ -import pytest - from lib.convert import compile_nodelist, compile_waylist, addressways parsed_gisdata = [ @@ -41,7 +39,7 @@ def test_compile_waylist(): } def test_addressways(): - for geom, tags in parsed_gisdata: + for _geom, tags in parsed_gisdata: tags["tiger:lfromadd"] = 100 tags["tiger:ltoadd"] = 200 tags["tiger:rfromadd"] = 101 diff --git a/tests/test_csv2sql.py b/tests/test_csv2sql.py index 355122a..f528f7f 100644 --- a/tests/test_csv2sql.py +++ b/tests/test_csv2sql.py @@ -1,5 +1,3 @@ -import pytest - from csv import DictReader from lib.csv2sql import csv_row_to_sql diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 6a46f65..7ab2688 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -1,6 +1,5 @@ -import pytest - -from lib.helpers import round_point, adjacent, glom, check_if_integers, interpolation_type, create_wkt_linestring +from lib.helpers import round_point, adjacent, glom, check_if_integers, \ + interpolation_type, create_wkt_linestring def test_round_point(): assert round_point([1.0, 1.0]) == (1.0, 1.0) @@ -41,4 +40,5 @@ def test_create_wkt_linestring(): (1, (100, 200)), (2, (101, 201)) ] - assert(create_wkt_linestring(segment)) == 'LINESTRING(200.000000 100.000000,201.000000 101.000000)' \ No newline at end of file + assert(create_wkt_linestring(segment)) == \ + 'LINESTRING(200.000000 100.000000,201.000000 101.000000)' diff --git a/tests/test_parse.py b/tests/test_parse.py index 313b6ef..4b558a6 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -1,5 +1,3 @@ -import pytest - from lib.parse import parse_shp_for_geom_and_tags def test_parse_shp_for_geom_and_tags(): @@ -47,4 +45,4 @@ def test_parse_shp_for_geom_and_tags(): 'tiger:zip_left': '27919', 'tiger:zip_right': '27919' } - ) \ No newline at end of file + ) diff --git a/tests/test_project.py b/tests/test_project.py index 1b00c57..ef5ccff 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -1,5 +1,3 @@ -import pytest - from lib.project import unproject def test_unproject():