diff --git a/Makefile b/Makefile index 7affac3f9..8cff3b3e9 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ lint-fix: black passbook e2e lifecycle lint: - pyright pyright e2e lifecycle + pyright passbook e2e lifecycle bandit -r passbook e2e lifecycle pylint passbook e2e lifecycle prospector diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 002c58397..2bf8a4cf5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,7 +89,7 @@ stages: versionSpec: '3.8' - task: CmdLine@2 inputs: - script: npm install -g pyright + script: npm install -g pyright@1.1.75 - task: CmdLine@2 inputs: script: | diff --git a/passbook/flows/management/commands/benchmark.py b/passbook/flows/management/commands/benchmark.py index 4fce763f9..3672c78d9 100644 --- a/passbook/flows/management/commands/benchmark.py +++ b/passbook/flows/management/commands/benchmark.py @@ -3,7 +3,6 @@ from csv import DictWriter from multiprocessing import Manager, Process, cpu_count from sys import stdout from time import time -from typing import List from django import db from django.core.management.base import BaseCommand @@ -63,7 +62,7 @@ class Command(BaseCommand): # pragma: no cover help="Output results as CSV", ) - def benchmark_flows(self, proc_count) -> str: + def benchmark_flows(self, proc_count): """Get full recovery link""" flow = Flow.objects.get(slug="default-authentication-flow") user = User.objects.get(username="pbadmin") @@ -90,7 +89,7 @@ class Command(BaseCommand): # pragma: no cover else: self.output_overview(all_values) - def output_overview(self, values: List[List[int]]): + def output_overview(self, values): """Output results human readable""" total_max = max([max(inner) for inner in values]) total_min = min([min(inner) for inner in values]) @@ -104,7 +103,7 @@ class Command(BaseCommand): # pragma: no cover print(f"\tMin: {total_min * 100}ms") print(f"\tAvg: {total_avg * 100}ms") - def output_csv(self, values: List[List[int]]): + def output_csv(self, values): """Output results as CSV""" proc_count = len(values) fieldnames = [f"proc_{idx}" for idx in range(proc_count)]