Skip to content

Commit

Permalink
Remove Pylint-related comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SkypLabs committed Mar 19, 2023
1 parent 23bd2c4 commit 4acfffd
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 64 deletions.
2 changes: 0 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# pylint: skip-file

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
Expand Down
5 changes: 0 additions & 5 deletions src/probequest/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ def build_cluster(config):
Build the ProbeQuest cluster.
"""

# pylint: disable=import-outside-toplevel
# pylint: disable=pointless-statement

try:
if config.fake:
from .sniffers.fake_probe_request_sniffer import FakeProbeRequestSniffer
Expand Down Expand Up @@ -178,8 +175,6 @@ def main():
Entry point of the command-line tool.
"""

# pylint: disable=too-many-statements

root_logger, memory_handler, console = set_up_root_logger()

logger = logging.getLogger(__name__)
Expand Down
2 changes: 0 additions & 2 deletions src/probequest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ class Config:
Configuration object.
"""

# pylint: disable=too-many-instance-attributes

_interface = None

essid_filters = None
Expand Down
2 changes: 0 additions & 2 deletions src/probequest/probe_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ def s_mac_oui(self):
The value is cached once computed.
"""

# pylint: disable=no-member

if self._s_mac_oui is None:
try:
self._s_mac_oui = EUI(self.s_mac).oui.registration().org
Expand Down
9 changes: 2 additions & 7 deletions src/probequest/sniffers/fake_probe_request_sniffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from scapy.layers.dot11 import RadioTap, Dot11, Dot11ProbeReq, Dot11Elt
from scapy.pipetool import ThreadGenSource

from faker import Faker # pylint: disable=import-error
from faker_wifi_essid import WifiESSID # pylint: disable=import-error
from faker import Faker
from faker_wifi_essid import WifiESSID


class FakeProbeRequestSniffer(ThreadGenSource):
Expand All @@ -23,8 +23,6 @@ class FakeProbeRequestSniffer(ThreadGenSource):
this last one only accepts lists, sets and tuples.
"""

# pylint: disable=too-many-ancestors

def __init__(self, period, period2=0, name=None):
self.logger = logging.getLogger(__name__)

Expand All @@ -38,7 +36,6 @@ def __init__(self, period, period2=0, name=None):

def generate(self):
# Fix a false positive about not finding '_wake_up'.
# pylint: disable=no-member

while self.RUN:
# Infinite loop until 'stop()' is called.
Expand Down Expand Up @@ -75,8 +72,6 @@ def __next__(self):
Generator of fake Wi-Fi probe requests.
"""

# pylint: disable=no-member

if self._should_stop:
raise StopIteration

Expand Down
36 changes: 0 additions & 36 deletions tests/unit/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ class TestArgParse(unittest.TestCase):
Tests the argument parser.
"""

# pylint: disable=too-many-public-methods

output_test_file = "probequest_test_output.txt"

def setUp(self):
Expand Down Expand Up @@ -97,8 +95,6 @@ def test_default_values(self):
values in the configuration namespace.
"""

# pylint: disable=no-member

with self.assertRaises(SystemExit) as error_code:
error_output = StringIO()

Expand All @@ -123,8 +119,6 @@ def test_interface_argument(self):
Calls the argument parser with the 'interface' argument.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -141,8 +135,6 @@ def test_without_interface_argument(self):
interface argument.
"""

# pylint: disable=no-member

with self.assertRaises(SystemExit) as error_code:
error_output = StringIO()

Expand All @@ -163,8 +155,6 @@ def test_debug_option(self):
Calls the argument parser with the '--debug' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -182,8 +172,6 @@ def test_fake_option(self):
Calls the argument parser with the '--fake' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -201,8 +189,6 @@ def test_ignore_case_option(self):
Calls the argument parser with the '--ignore-case' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -220,8 +206,6 @@ def test_short_output_option(self):
Calls the argument parser with the '-o' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -241,8 +225,6 @@ def test_long_output_option(self):
Calls the argument parser with the '--output' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -262,8 +244,6 @@ def test_short_essid_option(self):
Calls the argument parser with the '-e' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -285,8 +265,6 @@ def test_long_essid_option(self):
Calls the argument parser with the '--essid' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -308,8 +286,6 @@ def test_short_regex_option(self):
Calls the argument parser with the '-r' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -328,8 +304,6 @@ def test_long_regex_option(self):
Calls the argument parser with the '--regex' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -349,8 +323,6 @@ def test_essid_regex_mutual_exclusivity(self):
which must fail as they are in the same mutually exclusive group.
"""

# pylint: disable=no-member

with self.assertRaises(SystemExit) as error_code:
error_output = StringIO()

Expand All @@ -374,8 +346,6 @@ def test_exclude_option(self):
Calls the argument parser with the '--exclude' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -402,8 +372,6 @@ def test_short_station_option(self):
Calls the argument parser with the '-s' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand All @@ -430,8 +398,6 @@ def test_long_station_option(self):
Calls the argument parser with the '--station' option.
"""

# pylint: disable=no-member

config = Namespace()
self.arg_parser.parse_args(
[
Expand Down Expand Up @@ -460,8 +426,6 @@ def test_exclude_station_mutual_exclusivity(self):
group.
"""

# pylint: disable=no-member

with self.assertRaises(SystemExit) as error_code:
error_output = StringIO()

Expand Down
8 changes: 0 additions & 8 deletions tests/unit/test_probe_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ def test_without_parameters(self):
Initialises a 'ProbeRequest' object without any parameter.
"""

# pylint: disable=no-value-for-parameter

with self.assertRaises(TypeError):
_ = ProbeRequest()

Expand All @@ -28,8 +26,6 @@ def test_with_only_one_parameter(self):
Initialises a 'ProbeRequest' object with only one parameter.
"""

# pylint: disable=no-value-for-parameter

timestamp = 1517872027.0

with self.assertRaises(TypeError):
Expand All @@ -40,8 +36,6 @@ def test_with_only_two_parameters(self):
Initialises a 'ProbeRequest' object with only two parameters.
"""

# pylint: disable=no-value-for-parameter

timestamp = 1517872027.0
s_mac = "aa:bb:cc:dd:ee:ff"

Expand All @@ -53,8 +47,6 @@ def test_create_a_probe_request(self):
Creates a new 'ProbeRequest' with all the required parameters.
"""

# pylint: disable=no-self-use

timestamp = 1517872027.0
s_mac = "aa:bb:cc:dd:ee:ff"
essid = "Test ESSID"
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_probe_request_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def test_fuzz_packets(self):
'ProbeRequestParser.parse()' function.
"""

# pylint: disable=no-self-use

with self.assertRaises(TypeError):
for _ in range(0, 1000):
packet = RadioTap() / fuzz(Dot11() / Dot11ProbeReq() / Dot11Elt())
Expand Down

0 comments on commit 4acfffd

Please sign in to comment.