Skip to content

Commit 8576a2d

Browse files
committed
chore: fix linter warnings
1 parent c1d5ba9 commit 8576a2d

File tree

6 files changed

+7
-11
lines changed

6 files changed

+7
-11
lines changed

alephclient/cli.py

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import click
33
import logging
44
import sys
5-
from pathlib import Path
65

76
from alephclient import settings
87
from alephclient.api import AlephAPI

alephclient/crawldir.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import logging
22
import threading
33
import re
4-
import stat
54
import os
65
from os import PathLike
76
from queue import Queue
8-
from pathlib import Path, PurePath
7+
from pathlib import Path
98
from typing import cast, Optional, Dict
109

11-
from alephclient import settings
1210
from alephclient.api import AlephAPI
1311
from alephclient.errors import AlephException
1412
from alephclient.util import backoff

alephclient/settings.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import multiprocessing
32

43
# Aleph client API settings
54
HOST = os.environ.get("MEMORIOUS_ALEPH_HOST")

alephclient/tests/test_api_collection.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import pytest
22
from requests import Response
33
from alephclient.errors import AlephException
4-
from alephclient.api import AlephAPI, APIResultSet
4+
from alephclient.api import AlephAPI
55

66

77
@pytest.fixture

alephclient/tests/test_api_search.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_search(self, mocker):
1212
mocker.patch.object(self.api, "_request")
1313
search_result = self.api.search(self.fake_query)
1414

15-
assert isinstance(search_result, APIResultSet) == True
15+
assert isinstance(search_result, APIResultSet)
1616

1717
def test_search_url(self, mocker):
1818
mocker.patch.object(self.api, "_request")

alephclient/tests/test_crawldir.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_get_foreign_id_with_dir(self):
1313
path = Path(os.path.join(self.base_path, "jan/week1"))
1414
crawldir = CrawlDirectory(AlephAPI, {}, path)
1515
foreign_id = crawldir.get_foreign_id(path)
16-
assert foreign_id == None
16+
assert foreign_id is None
1717

1818
def test_get_foreign_id_with_file(self):
1919
path = Path(os.path.join(self.base_path, "feb/2.txt"))
@@ -33,18 +33,18 @@ def test_is_excluded(self):
3333
path = Path(os.path.join(self.base_path, "jan/week1"))
3434
crawldir = CrawlDirectory(AlephAPI, {}, path)
3535
is_excluded = crawldir.is_excluded(path)
36-
assert is_excluded == False
36+
assert not is_excluded
3737

3838
def test_is_excluded_no_exclude(self):
3939
path = Path(os.path.join(self.base_path, "jan/week1"))
4040
crawldir = CrawlDirectory(AlephAPI, {}, path)
4141
crawldir.exclude = None
4242
is_excluded = crawldir.is_excluded(path)
43-
assert is_excluded == False
43+
assert not is_excluded
4444

4545
def test_is_excluded_exclude_dir(self):
4646
path = Path(os.path.join(self.base_path, "jan/week1"))
4747
crawldir = CrawlDirectory(AlephAPI, {}, path, nojunk=True)
4848
crawldir.exclude["d"] = re.compile(r"week1\/*", re.I)
4949
is_excluded = crawldir.is_excluded(path)
50-
assert is_excluded == True
50+
assert is_excluded

0 commit comments

Comments
 (0)