Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3bc0921

Browse files
committed
MSS: renamed MSSBase to MSSMixin in base.py
1 parent 0c4a93e commit 3bc0921

File tree

11 files changed

+35
-22
lines changed

11 files changed

+35
-22
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ History:
22

33
<see Git checking messages for history>
44

5+
4.0.0 2018/12/23
6+
- MSS: renamed MSSBase to MSSMixin in base.py
7+
58
3.3.2 2018/11/20
69
- new contributors: hugovk, Andreas Buhr
710
- MSS: do monitor detection in MSS constructor (fixes #79)

CHANGES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
4.0.0 (201x-xx-xx)
2+
==================
3+
4+
base.py
5+
-------
6+
- Renamed ``MSSBase`` class to ``MSSMixin``.
7+
8+
19
3.3.0 (2018-09-04)
210
==================
311

docs/source/api.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ GNU/Linux
2424
:rtype: :class:`mss.base.ScreenShot`
2525
:raises ScreenShotError: When color depth is not 32 (rare).
2626

27-
See :meth:`mss.base.MSSBase.grab()` for details.
27+
See :meth:`mss.base.MSSMixin.grab()` for details.
2828

2929
.. function:: error_handler(display, event)
3030

@@ -46,10 +46,12 @@ Methods
4646

4747
.. module:: mss.base
4848

49-
.. class:: MSSBase
49+
.. class:: MSSMixin
5050

5151
The parent's class for every OS implementation.
5252

53+
.. versionchanged:: 4.0.0
54+
5355
.. method:: grab(region)
5456

5557
:param dict monitor: region's coordinates.
@@ -146,7 +148,7 @@ Methods
146148
Properties
147149
==========
148150

149-
.. class:: MSSBase
151+
.. class:: MSSMixin
150152

151153
.. attribute:: monitors
152154

@@ -266,4 +268,4 @@ Factory
266268

267269
Factory function to instance the appropriate MSS class.
268270

269-
:rtype: :class:`mss.base.MSSBase`
271+
:rtype: :class:`mss.base.MSSMixin`

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
# built documents.
3030
#
3131
# The short X.Y version.
32-
version = "3.3.2"
32+
version = "4.0.0"
3333

3434
# The full version, including alpha/beta/rc tags.
3535
release = "latest"

mss/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .exception import ScreenShotError
1414
from .factory import mss
1515

16-
__version__ = "3.3.2"
16+
__version__ = "4.0.0"
1717
__author__ = "Mickaël 'Tiger-222' Schoentgen"
1818
__copyright__ = """
1919
Copyright (c) 2013-2018, Mickaël 'Tiger-222' Schoentgen

mss/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
from .tools import to_png
1212

1313

14-
class MSSBase(object):
14+
class MSSMixin(object):
1515
""" This class will be overloaded by a system specific one. """
1616

1717
cls_image = ScreenShot # type: object
1818
compression_level = 6 # type: int
1919

2020
def __enter__(self):
21-
# type: () -> MSSBase
21+
# type: () -> MSSMixin
2222
""" For the cool call `with MSS() as mss:`. """
2323

2424
return self

mss/darwin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import ctypes.util
1313
import sys
1414

15-
from .base import MSSBase
15+
from .base import MSSMixin
1616
from .exception import ScreenShotError
1717
from .screenshot import Size
1818

@@ -55,7 +55,7 @@ def __repr__(self):
5555
return "{}<{} {}>".format(type(self).__name__, self.origin, self.size)
5656

5757

58-
class MSS(MSSBase):
58+
class MSS(MSSMixin):
5959
"""
6060
Multiple ScreenShots implementation for macOS.
6161
It uses intensively the CoreGraphics library.
@@ -180,7 +180,7 @@ def monitors(self):
180180
def grab(self, monitor):
181181
# type: (Dict[str, int]) -> ScreenShot
182182
"""
183-
See :meth:`MSSBase.grab <mss.base.MSSBase.grab>` for full details.
183+
See :meth:`MSSMixin.grab <mss.base.MSSMixin.grab>` for full details.
184184
"""
185185

186186
# Convert PIL bbox style

mss/linux.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import ctypes.util
99
import os
1010

11-
from .base import MSSBase
11+
from .base import MSSMixin
1212
from .exception import ScreenShotError
1313

1414
__all__ = ("MSS",)
@@ -138,7 +138,7 @@ class XRRCrtcInfo(ctypes.Structure):
138138
]
139139

140140

141-
class MSS(MSSBase):
141+
class MSS(MSSMixin):
142142
"""
143143
Multiple ScreenShots implementation for GNU/Linux.
144144
It uses intensively the Xlib and its Xrandr extension.

mss/windows.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import ctypes
1010
import ctypes.wintypes
1111

12-
from .base import MSSBase
12+
from .base import MSSMixin
1313
from .exception import ScreenShotError
1414

1515
__all__ = ("MSS",)
@@ -49,7 +49,7 @@ class BITMAPINFO(ctypes.Structure):
4949
]
5050

5151

52-
class MSS(MSSBase):
52+
class MSS(MSSMixin):
5353
""" Multiple ScreenShots implementation for Microsoft Windows. """
5454

5555
_bbox = {"height": 0, "width": 0}

tests/test_gnu_linux.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import pytest
88

99
import mss
10-
from mss.base import MSSBase
10+
from mss.base import MSSMixin
1111
from mss.exception import ScreenShotError
1212

1313

@@ -33,7 +33,7 @@ def test_factory_systems(monkeypatch):
3333
# GNU/Linux
3434
monkeypatch.setattr(platform, "system", lambda: "LINUX")
3535
with mss.mss() as sct:
36-
assert isinstance(sct, MSSBase)
36+
assert isinstance(sct, MSSMixin)
3737
monkeypatch.undo()
3838

3939
# macOS

0 commit comments

Comments
 (0)