Skip to content

Commit a89e745

Browse files
committed
dev: Fix new errors from pyright >1.1.218, <1.1.225
Disabling strictParameterNoneValue restores the previous default behaviour prior to 1.1.224. Related inference improvement appears to be that boto_client in a few places could actually be None (meaning calling a method on it would error), so just remove the unnecessary and unused keyword argument causing that.
1 parent 1bae937 commit a89e745

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

nextstrain/cli/aws/cognito/srp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ def process_challenge(self, challenge_parameters):
245245
)
246246
return response
247247

248-
def authenticate_user(self, client=None):
249-
boto_client = self.client or client
248+
def authenticate_user(self):
249+
boto_client = self.client
250250
auth_params = self.get_auth_params()
251251
response = boto_client.initiate_auth(
252252
AuthFlow="USER_SRP_AUTH",
@@ -272,8 +272,8 @@ def authenticate_user(self, client=None):
272272
"The %s challenge is not supported" % response["ChallengeName"]
273273
)
274274

275-
def set_new_password_challenge(self, new_password, client=None):
276-
boto_client = self.client or client
275+
def set_new_password_challenge(self, new_password):
276+
boto_client = self.client
277277
auth_params = self.get_auth_params()
278278
response = boto_client.initiate_auth(
279279
AuthFlow="USER_SRP_AUTH",

nextstrain/cli/runner/aws_batch/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ def register_arguments(parser) -> None:
8787

8888

8989
def run(opts, argv, working_volume = None, extra_env = {}, cpus: int = None, memory: int = None) -> int:
90+
# Unlike other runners, the AWS Bach runner currently *requires* a working
91+
# dir. This is ok as we only provide the AWS Batch runner for commands
92+
# which also require a working dir (e.g. build), whereas other runners also
93+
# work with commands that don't.
94+
# -trs, 28 Feb 2022
95+
assert working_volume is not None
96+
9097
local_workdir = resolve_path(working_volume.src)
9198

9299
if opts.attach:

pyrightconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
"reportSelfClsParameterName": true,
2020
"reportInvalidStubStatement": true,
2121
"reportIncompleteStub": true,
22-
"reportUnsupportedDunderAll": true
22+
"reportUnsupportedDunderAll": true,
23+
"strictParameterNoneValue": false
2324
}

0 commit comments

Comments
 (0)