kaniini / antissh

An IRC bot which monitors for compromised embedded devices being used as proxies.
Other
126 stars 18 forks source link

Add linting & static checks #39

Closed KellerFuchs closed 6 years ago

KellerFuchs commented 6 years ago
KellerFuchs commented 6 years ago

@kaniini I'm doing that as a prelude to trying to use python-ssh2 (as I find it much easier to make that sort of changes if I have tooling that picks up simple-ish mistakes)

kaniini commented 6 years ago

I don't understand why we would use python-ssh2? this entire application is built on top of asyncio and that would be even worse performance?

KellerFuchs commented 6 years ago

@kaniini Oh, I misunderstood the lack of answer on IRC as signifying you had no opposition to trying it. python-ssh2 is still usable asynchronously, and it's 5-10× faster than asyncssh (mostly because it's a wrapper around libssh2, which is written in C). I suggested that as a way to address the performance issue mentionned in the README.

If you think it's a bad idea, I just won't do it :3

KellerFuchs commented 6 years ago

PS: Regardless of whether python-ssh2 turns out to be a better ssh library for antissh, good linting and tests might be useful (and uncovered some warts), so I'd really want your opinion/feedback.

kaniini commented 6 years ago

I have no objection to this PR then.

KellerFuchs commented 6 years ago

@kaniini I think this should be good to go, if you are OK with it. You (or your favorite CI service) can run tox to run the checks; there are still a couple of things flagged by pylint, but I think they are false positives (with the exception of TODO).

KellerFuchs commented 6 years ago

gently pings @kaniini