# HG changeset patch # User Andrey Skvortsov # Date 1539241272 -10800 # Node ID 1367b796e129a32af3410cf5e5990cc95c2885ab # Parent 1c04a50dc7ffbb3e54739f077f84ffd0c07fb5eb python3 support: pylint, W1649 # (deprecated-string-function) Accessing a deprecated function on the string module diff -r 1c04a50dc7ff -r 1367b796e129 plcopen/structures.py --- a/plcopen/structures.py Thu Oct 11 09:41:15 2018 +0300 +++ b/plcopen/structures.py Thu Oct 11 10:01:12 2018 +0300 @@ -24,7 +24,6 @@ from __future__ import absolute_import -import string import re from collections import OrderedDict @@ -104,7 +103,10 @@ """ take a .csv file and translate it it a "csv_table" """ - return [map(string.strip, line.split(';')) for line in file.readlines()] + table = [[column.strip() + for column in line.split(';')] + for line in file.readlines()] + return table def find_section(section_name, table): diff -r 1c04a50dc7ff -r 1367b796e129 tests/tools/check_source.sh --- a/tests/tools/check_source.sh Thu Oct 11 09:41:15 2018 +0300 +++ b/tests/tools/check_source.sh Thu Oct 11 10:01:12 2018 +0300 @@ -367,6 +367,7 @@ enable=$enable,W1602 # (basestring-builtin) basestring built-in referenced enable=$enable,W1646 # (invalid-str-codec) non-text encoding used in str.decode enable=$enable,W1645 # (exception-message-attribute) Exception.message removed in Python 3 + enable=$enable,W1649 # (deprecated-string-function) Accessing a deprecated function on the string module # enable= options=