Skip to content

Commit

Permalink
Fix mypy missing imports (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
epenet authored Nov 28, 2024
1 parent 51081bc commit dd6c114
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
11 changes: 10 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,14 @@ repos:
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [types-requests==2.27.11]
additional_dependencies:
[
types-requests>=2.21.0,
websockets>=13,
aiohttp>=3.8.1,
async_timeout>=4.0.3,
cryptography>=35.0.0,
py3rijndael>=0.3.3,
]
exclude: setup|docs/|example/|tests/
args: [--strict]
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ exclude = [
]

[[tool.mypy.overrides]]
module = 'websocket.*'
module = [
'py3rijndael.*',
'websocket.*',
]
ignore_missing_imports = true

[[tool.mypy.overrides]]
Expand Down
2 changes: 1 addition & 1 deletion samsungtvws/encrypted/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _decrypt(self, enc: bytes) -> str:

def _encrypt(self, raw: str) -> bytes:
encryptor = self._cipher.encryptor()
return ( # type:ignore[no-any-return]
return (
encryptor.update(bytes(Padding.pad(raw), encoding="utf8"))
+ encryptor.finalize()
)
Expand Down

0 comments on commit dd6c114

Please sign in to comment.