Skip to content

Commit

Permalink
Improve PyLint compliancy, add PyLint autotest
Browse files Browse the repository at this point in the history
  • Loading branch information
Privat33r-dev committed Aug 10, 2024
1 parent c07b182 commit 2321f49
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: |
source .venv/bin/activate
isort -m 9 --line-length 160 $MODULE_NAME tests --gitignore --check-only
# pylint $MODULE_NAME tests
pylint $MODULE_NAME tests
docformatter --wrap-summaries 160 --wrap-descriptions 160 -cr $MODULE_NAME tests
black --check $MODULE_NAME tests
mypy -V
Expand Down
2 changes: 1 addition & 1 deletion clairvoyance/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def load_default_wordlist() -> List[str]:
return [w.strip() for w in f.readlines() if w.strip()]


async def blind_introspection(
async def blind_introspection( # pylint: disable=too-many-arguments
url: str,
logger: logging.Logger,
wordlist: List[str],
Expand Down
2 changes: 1 addition & 1 deletion clairvoyance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from clairvoyance.entities.interfaces import IClient


class Client(IClient):
class Client(IClient): # pylint: disable=too-many-instance-attributes
def __init__(
self,
url: str,
Expand Down
12 changes: 6 additions & 6 deletions clairvoyance/entities/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

# Quick resolve the context variables using macros.
config: Callable[..., IConfig] = (
lambda: config_ctx.get()
) # pylint: disable=unnecessary-lambda
lambda: config_ctx.get() # pylint: disable=unnecessary-lambda
)
client: Callable[..., IClient] = (
lambda: client_ctx.get()
) # pylint: disable=unnecessary-lambda
lambda: client_ctx.get() # pylint: disable=unnecessary-lambda
)
log: Callable[..., logging.Logger] = (
lambda: logger_ctx.get()
) # pylint: disable=unnecessary-lambda
lambda: logger_ctx.get() # pylint: disable=unnecessary-lambda
)
4 changes: 2 additions & 2 deletions tests/graphql_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class TestPost(aiounittest.AsyncTestCase):
def setUpClass(cls) -> None:
Client("http://localhost:8000/graphql")

cls._unstable = subprocess.Popen(
cls._unstable = subprocess.Popen( # pylint: disable=consider-using-with
["python3", "tests/server/unstable.py"]
) # pylint: disable=consider-using-with
)
time.sleep(1)

@classmethod
Expand Down
4 changes: 2 additions & 2 deletions tests/oracle_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ class TestProbeTypename(aiounittest.AsyncTestCase):
def setUpClass(cls) -> None:
Client("http://localhost:8081/graphql")

cls._unstable = subprocess.Popen(
cls._unstable = subprocess.Popen( # pylint: disable=consider-using-with
["python3", "tests/server/graphql.py"]
) # pylint: disable=consider-using-with
)
time.sleep(1)

@classmethod
Expand Down

0 comments on commit 2321f49

Please sign in to comment.