Fix pylint error and added encoding to file
Got rid of redundant brackets