Skip to content

Commit

Permalink
fixing some pylinting
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoman committed Nov 28, 2023
1 parent a8820e7 commit c6d4cd7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions jobs/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import os
from misskey import Misskey
from dotenv import load_dotenv
from jobs.sentiment import getSentiment
from jobs.sentiment import get_sentiment

load_dotenv()

Expand Down Expand Up @@ -33,7 +33,7 @@ def publish_note():

if data is not None:
for d in data:
sentiment = getSentiment(d[4] + d[5])
sentiment = get_sentiment(d[4] + d[5])
text = "\n<b>" + d[4] + "</b>\n" + d[5] + "<i>(" +d[1] + ")</i>\n\n" + d[3]
cw = None if sentiment >= 0 else ":nsfw: News article"
time.sleep(2)
Expand Down
2 changes: 1 addition & 1 deletion jobs/sentiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import asent # pylint: disable=unused-import
import spacy

def getSentiment(text):
def get_sentiment(text):
""" Sentiment analysis result """
# load spacy pipeline
nlp = spacy.load("en_core_web_lg")
Expand Down

0 comments on commit c6d4cd7

Please sign in to comment.