From 46b618876cfb4a2cddb0cfc783fa1bcd39d81c04 Mon Sep 17 00:00:00 2001 From: Robert Rose Date: Thu, 2 Aug 2018 14:25:29 -0700 Subject: [PATCH] Use dirname instead of split os.path.dirname() is identical to os.path.split()[0] see: https://docs.python.org/3/library/os.path.html#os.path.dirname --- random_words/random_words.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/random_words/random_words.py b/random_words/random_words.py index cac1c72..eb15268 100644 --- a/random_words/random_words.py +++ b/random_words/random_words.py @@ -5,7 +5,7 @@ from random import sample from itertools import chain -main_dir = os.path.split(os.path.abspath(__file__))[0] +main_dir = os.path.dirname(os.path.abspath(__file__)) class Random(dict):