Skip to content

Commit 5e68192

Browse files
committed
fix PEP 484 prohibits implicit Optional
1 parent 84b023e commit 5e68192

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ History:
44

55
7.0.1 2022/10/27
66
- fixed the wheel package
7+
- MSS: fixed PEP 484 prohibits implicit Optional
78

89
7.0.0 2022/10/27
910
- added support for Python 3.11

mss/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def save(
106106
self,
107107
mon: int = 0,
108108
output: str = "monitor-{mon}.png",
109-
callback: Callable[[str], None] = None,
109+
callback: Optional[Callable[[str], None]] = None,
110110
) -> Iterator[str]:
111111
"""
112112
Grab a screen shot and save it to a file.

mss/exception.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
This is part of the MSS Python's module.
33
Source: https://github.com/BoboTiG/python-mss
44
"""
5-
from typing import Any, Dict
5+
from typing import Any, Dict, Optional
66

77

88
class ScreenShotError(Exception):
99
"""Error handling class."""
1010

11-
def __init__(self, message: str, details: Dict[str, Any] = None) -> None:
11+
def __init__(self, message: str, details: Optional[Dict[str, Any]] = None) -> None:
1212
super().__init__(message)
1313
self.details = details or {}

0 commit comments

Comments
 (0)