Skip to content

Commit da0a8ee

Browse files
committed
pre-commits
1 parent 3aa2afa commit da0a8ee

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

tests/conftest.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
URL_TEMPLATE = "https://{code_artifact_domain}-{aws_account}.d.codeartifact.{aws_region}.amazonaws.com/pypi/{code_artifact_repository}"
99

1010

11-
@pytest.fixture()
11+
@pytest.fixture
1212
def write_conf(fs):
1313
"""Fixture to write a configuration entry."""
1414

@@ -23,7 +23,7 @@ def _write(repository: str, **kwargs):
2323
return _write
2424

2525

26-
@pytest.fixture()
26+
@pytest.fixture
2727
def add_conf(write_conf):
2828
"""Fixture to add a test configuration entry."""
2929

@@ -97,7 +97,9 @@ def __init__(self, aws):
9797
self.aws = aws
9898

9999
def assume_role(
100-
self, RoleArn=None, RoleSessionName=None # noqa : boto3 argument naminge
100+
self,
101+
RoleArn=None, # noqa: N803
102+
RoleSessionName=None, # noqa: N803
101103
):
102104
"""Mimicking boto3.client('sts')."""
103105
self.aws.register_role(RoleArn)
@@ -116,13 +118,15 @@ def __init__(self, aws):
116118
self.aws = aws
117119

118120
def get_authorization_token(
119-
self, domain=None, domainOwner=None # noqa : boto3 argument naminge
121+
self,
122+
domain=None,
123+
domainOwner=None, # noqa: N803
120124
):
121125
"""Mimicking boto3.client('codeartifact')."""
122126
return self.aws._get_authorization_token(domain, domainOwner)
123127

124128

125-
@pytest.fixture()
129+
@pytest.fixture
126130
def aws(mocker):
127131
"""Swaps boto3 with a dummy implementation."""
128132
dummy_aws = DummyAWS()
@@ -131,7 +135,7 @@ def aws(mocker):
131135
return dummy_aws
132136

133137

134-
@pytest.fixture()
138+
@pytest.fixture
135139
def subprocess_mock(mocker):
136140
"""Patches subprocess.run so that it does not execute anything."""
137141
mock = mocker.patch("subprocess.run")

tests/test_login.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
runner = CliRunner()
1010

1111

12-
@pytest.fixture()
12+
@pytest.fixture
1313
def load_config_mock(mocker) -> Mock:
1414
"""Patches the load method of Configuration."""
1515
test_config = Configuration(
@@ -24,7 +24,7 @@ def load_config_mock(mocker) -> Mock:
2424
return load_mock
2525

2626

27-
@pytest.fixture()
27+
@pytest.fixture
2828
def token_mock(mocker):
2929
"""Patches token generation."""
3030
test_token = "TEST_TOKEN"

0 commit comments

Comments
 (0)