Skip to content
This repository has been archived by the owner on Dec 17, 2021. It is now read-only.

Commit

Permalink
remove type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonMWhite committed Mar 26, 2018
1 parent a447146 commit 5da4965
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion requirements.txt
Expand Up @@ -47,4 +47,3 @@ google-auth-oauthlib
############

pytest
typing-extensions
13 changes: 1 addition & 12 deletions runner/runner.py
@@ -1,18 +1,7 @@
import typing
from utils import utils
from typing_extensions import Protocol


class ScannerProtocol(Protocol):
headers = [] # type: typing.List[str]


def write_rows(rows: typing.Optional[typing.List[typing.List]],
domain: str,
base_domain: str,
scanner: ScannerProtocol,
csv_writer: typing.Any,
meta: typing.Optional[typing.Mapping[str, typing.Any]] = None):
def write_rows(rows, domain, base_domain, scanner, csv_writer, meta=None):

# If we didn't get any info, we'll still output information about why the scan failed.
if rows is None:
Expand Down
10 changes: 5 additions & 5 deletions tests/test_runner.py
Expand Up @@ -9,11 +9,11 @@ class MockScanner:


@pytest.fixture
def output_file(tmpdir: local.LocalPath) -> str:
def output_file(tmpdir):
return str(tmpdir.join('output.csv'))


def test_write_rows(output_file: str) -> None:
def test_write_rows(output_file):
data = [
['value 1', 'value 2'],
['value 3', 'value 4'],
Expand All @@ -32,7 +32,7 @@ def test_write_rows(output_file: str) -> None:
]


def test_write_rows_no_data(output_file: str) -> None:
def test_write_rows_no_data(output_file):
with open(output_file, 'w') as output_file_obj:
csv_writer = csv.writer(output_file_obj)
runner.write_rows(None, 'foo.gov', 'foo.gov', MockScanner(), csv_writer)
Expand All @@ -46,7 +46,7 @@ def test_write_rows_no_data(output_file: str) -> None:
]


def test_write_rows_with_meta(output_file: str) -> None:
def test_write_rows_with_meta(output_file):
data = [
['value 1', 'value 2'],
]
Expand Down Expand Up @@ -79,7 +79,7 @@ def test_write_rows_with_meta(output_file: str) -> None:
}]


def test_rows_with_lambda_meta(output_file: str) -> None:
def test_rows_with_lambda_meta(output_file):
data = [
['value 1', 'value 2'],
]
Expand Down

0 comments on commit 5da4965

Please sign in to comment.