python3 support: pylint, W1649 # (deprecated-string-function) Accessing a deprecated function on the string module
--- 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):
--- 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=