Skip to content

Commit

Permalink
pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtmail committed Nov 3, 2021
1 parent 4da601d commit 4040339
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

extension-pkg-whitelist=math

[BASIC]

no-docstring-rgx=^test_

[MESSAGES CONTROL]

[TYPECHECK]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
import sys
import pytest
sys.path.insert(0,'.')
4 changes: 1 addition & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from lib.convert import compile_nodelist, compile_waylist, addressways

parsed_gisdata = [
Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions tests/test_csv2sql.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from csv import DictReader
from lib.csv2sql import csv_row_to_sql

Expand Down
8 changes: 4 additions & 4 deletions tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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)'
assert(create_wkt_linestring(segment)) == \
'LINESTRING(200.000000 100.000000,201.000000 101.000000)'
4 changes: 1 addition & 3 deletions tests/test_parse.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from lib.parse import parse_shp_for_geom_and_tags

def test_parse_shp_for_geom_and_tags():
Expand Down Expand Up @@ -47,4 +45,4 @@ def test_parse_shp_for_geom_and_tags():
'tiger:zip_left': '27919',
'tiger:zip_right': '27919'
}
)
)
2 changes: 0 additions & 2 deletions tests/test_project.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import pytest

from lib.project import unproject

def test_unproject():
Expand Down

0 comments on commit 4040339

Please sign in to comment.