Skip to content

Commit a3396d7

Browse files
author
notactuallyfinn
committed
applied pylints hints
1 parent 1d7963a commit a3396d7

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/hermes_toml/harvest.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@
1010
from os import chdir, getcwd
1111
from email.utils import getaddresses
1212

13-
import toml
1413
import re
14+
import toml
1515
from pydantic import BaseModel
16-
1716
#from hermes.model import SoftwareMetadata
1817
from hermes.commands.harvest.base import HermesHarvestCommand, HermesHarvestPlugin
1918

@@ -318,7 +317,7 @@ def extract_personal_data(cls, person) -> dict[str, str]:
318317

319318
# create an object with name, email and @type if name or email is not empty
320319
person = {}
321-
if not name == "":
320+
if name != "":
322321
person["name"] = name
323322
# try to validate the email address
324323
if re.fullmatch("([a-z]|[A-Z]|[0-9])+(.([a-z]|[A-Z]|[0-9])+)*@([a-z]|[A-Z]|[0-9])+." \
@@ -361,7 +360,7 @@ def handle_pypi_classifieres(cls, classifiers: str | list[str], data):
361360
}
362361
# iterate over all classifiers and put them into the correct buckets
363362
for classifier in classifiers:
364-
if not isinstance(str):
363+
if not isinstance(classifier, str):
365364
continue
366365
classifier = classifier.split(" :: ")
367366
if len(classifier) < 2:
@@ -455,7 +454,3 @@ def handle_urls(cls, urls: dict[str, str], data):
455454
data[key] = value
456455
elif len(value) == 1:
457456
data[key] = value[0]
458-
459-
temp2 = {}
460-
TomlHarvestPlugin.read_from_toml("pyproject.toml", temp2)
461-
print(temp2)

0 commit comments

Comments
 (0)