Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit 3861d1d

Browse files
committed
Appease lint gods
1 parent adb4ec9 commit 3861d1d

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.flake8

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
ignore=E501

clammy/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
import struct
44
import contextlib
55
import re
6-
import base64
76

87
from clammy import exceptions
98

9+
1010
class ClamAVDaemon:
1111
"""
1212
Class for using clamd with a network socket
@@ -193,7 +193,7 @@ def _send_command(self, cmd, *args):
193193
if args:
194194
concat_args = " " + " ".join(args)
195195

196-
#cmd = 'n{cmd}{args}\n'.format(cmd=cmd, args=concat_args).encode('utf-8')
196+
# cmd = 'n{cmd}{args}\n'.format(cmd=cmd, args=concat_args).encode('utf-8')
197197
cmd = f"n{cmd}{concat_args}\n".encode("utf-8")
198198
self.clamd_socket.send(cmd)
199199

tests/test_clammy.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# The EICAR test file https://en.wikipedia.org/wiki/EICAR_test_file
88
EICAR = r"X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*"
99

10+
1011
@pytest.fixture()
1112
def clamav_daemon():
1213
return ClamAVDaemon(unix_socket="/var/run/clamav/clamd.ctl")
@@ -37,6 +38,7 @@ def test_scan(clamav_daemon, tmpdir):
3738
str(p): ("FOUND", "winnow.malware.test.eicar.com.UNOFFICIAL")
3839
}
3940

41+
4042
def test_multiscan(clamav_daemon, tmpdir):
4143
p = tmpdir.join("eicar.txt")
4244
p.write(EICAR)
@@ -45,6 +47,8 @@ def test_multiscan(clamav_daemon, tmpdir):
4547
str(p): ("FOUND", "winnow.malware.test.eicar.com.UNOFFICIAL")
4648
}
4749

48-
def test_instream(clamav_daemon):
49-
assert clamav_daemon.instream(BytesIO(EICAR.encode("utf-8"))) == {'stream': ("FOUND", "winnow.malware.test.eicar.com.UNOFFICIAL")}
5050

51+
def test_instream(clamav_daemon):
52+
assert clamav_daemon.instream(BytesIO(EICAR.encode("utf-8"))) == {
53+
"stream": ("FOUND", "winnow.malware.test.eicar.com.UNOFFICIAL")
54+
}

0 commit comments

Comments
 (0)