Skip to content

Commit b7c8abc

Browse files
committed
Hide flake warnings which are unhelpful. (NO_JIRA)
1 parent ccd55fc commit b7c8abc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

api_paper_2024/example_2/language_processing.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@
3030

3131
warnings.filterwarnings("ignore", category=DeprecationWarning) # noqa
3232

33-
from wordcloud import WordCloud
34-
35-
import nltk
36-
import nltk.collocations
37-
from nltk.stem.wordnet import WordNetLemmatizer
38-
39-
import pandas as pd
40-
from csv import writer
41-
33+
# Flake doesnt like imports after the line above, but we have to have the line above to
34+
# prevent deprecation warnings from these third party packages sending spurious output
35+
# which we dont want, as it is 'seen' as an error when using this code through Mercury.
36+
37+
from wordcloud import WordCloud # noqa
38+
import nltk # noqa
39+
import nltk.collocations # noqa
40+
from nltk.stem.wordnet import WordNetLemmatizer # noqa
41+
import pandas as pd # noqa
42+
from csv import writer # noqa
4243

4344
class FrequencyCalculator:
4445
"""

0 commit comments

Comments
 (0)