From a20a9cacbf39972f2cc94e33291aa29f38ae69cd Mon Sep 17 00:00:00 2001 From: Matthew Seal Date: Fri, 2 Oct 2020 00:36:25 -0700 Subject: [PATCH] Fixed python 3.5 issue --- nbformat/corpus/words.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nbformat/corpus/words.py b/nbformat/corpus/words.py index 9916a5a5..6afba05d 100644 --- a/nbformat/corpus/words.py +++ b/nbformat/corpus/words.py @@ -1,18 +1,18 @@ +import os import random -from pathlib import Path from functools import lru_cache @lru_cache(1) def acceptable_nouns(): - with open(Path(__file__).parent / 'nouns.txt', 'r') as nouns_file: + with open(os.path.join(os.path.dirname(__file__), 'nouns.txt'), 'r') as nouns_file: return set(word.rstrip() for word in nouns_file.readlines()) @lru_cache(1) def acceptable_adjectives(): - with open(Path(__file__).parent / 'adjectives.txt', 'r') as adjectives_file: + with open(os.path.join(os.path.dirname(__file__), 'adjectives.txt'), 'r') as adjectives_file: return set(word.rstrip() for word in adjectives_file.readlines())