Skip to content

Commit

Permalink
Fixed python 3.5 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Oct 2, 2020
1 parent cc118c7 commit a20a9ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nbformat/corpus/words.py
Original file line number Diff line number Diff line change
@@ -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())


Expand Down

0 comments on commit a20a9ca

Please sign in to comment.