Skip to content

Commit

Permalink
Use dirname instead of split
Browse files Browse the repository at this point in the history
os.path.dirname() is identical to os.path.split()[0] see: https://docs.python.org/3/library/os.path.html#os.path.dirname
  • Loading branch information
RobRoseKnows authored and tomislater committed Jun 20, 2020
1 parent a47bf0e commit 46b6188
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion random_words/random_words.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 46b6188

Please sign in to comment.