Skip to content

Enable more mypy check options#30

Open
bact wants to merge 1 commit into
trailofbits:mainfrom
bact:mypy-fix
Open

Enable more mypy check options#30
bact wants to merge 1 commit into
trailofbits:mainfrom
bact:mypy-fix

Conversation

@bact
Copy link
Copy Markdown
Contributor

@bact bact commented Mar 28, 2026

  • Add re.Match type parameter
  • Add type for dict
  • Add type ignore for tests that intentionally put wrong type

- Add re.Match type parameter
- Add type for dict
- Add type ignore for tests that intentionally put wrong type

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 28, 2026

CLA assistant check
All committers have signed the CLA.

Comment thread test/conftest.py
outhex = _ASSETS / f"outhex/{name}.txt"

return (input.read_bytes(), output.read_bytes(), bytearray.fromhex(outhex.read_text()))
return (input.read_bytes(), output.read_bytes(), bytes.fromhex(outhex.read_text()))
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

per function signature

Comment thread test/test_impl.py
with pytest.raises(impl.CanonicalizationError):
# set is not serializable
impl.dumps({1, 2, 3})
impl.dumps({1, 2, 3}) # type: ignore[arg-type]
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since it is intentional to be a mismatch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants