Skip to content

Commit 4b15410

Browse files
committed
Tests and docs: remove useless lines between imports
1 parent 580e891 commit 4b15410

14 files changed

+12
-28
lines changed

docs/source/examples/fps.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@
99
import time
1010

1111
import cv2
12-
1312
import mss
14-
1513
import numpy
1614

1715

docs/source/examples/linux_display_keyword.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
Usage example with a specific display.
66
"""
77

8-
from mss.linux import MSS
8+
import mss
99

1010

11-
with MSS(display=":0.0") as sct:
11+
with mss.mss(display=":0.0") as sct:
1212
for filename in sct.save():
1313
print(filename)

docs/source/examples/opencv_numpy.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
import time
99

1010
import cv2
11-
1211
import mss
13-
1412
import numpy
1513

1614

docs/source/examples/pil.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
PIL example using frombytes().
66
"""
77

8-
from PIL import Image
9-
108
import mss
9+
from PIL import Image
1110

1211

1312
with mss.mss() as sct:

docs/source/examples/pil_pixels.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
PIL examples to play with pixels.
66
"""
77

8-
from PIL import Image
9-
108
import mss
9+
from PIL import Image
1110

1211

1312
with mss.mss() as sct:

tests/bench_bgra2rgb.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,9 @@
3131

3232
import time
3333

34-
from PIL import Image
35-
3634
import mss
37-
3835
import numpy
36+
from PIL import Image
3937

4038

4139
def mss_rgb(im):

tests/conftest.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
import os
88

99
import mss
10-
1110
import pytest
1211

1312

tests/test_bgra_to_rgb.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
Source: https://github.com/BoboTiG/python-mss
44
"""
55

6-
from mss.base import ScreenShot
7-
86
import pytest
7+
from mss.base import ScreenShot
98

109

1110
def test_bad_length():

tests/test_get_pixels.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
Source: https://github.com/BoboTiG/python-mss
44
"""
55

6+
import pytest
67
from mss.base import ScreenShot
78
from mss.exception import ScreenShotError
89

9-
import pytest
10-
1110

1211
def test_grab_monitor(sct):
1312
for mon in sct.monitors:

tests/test_gnu_linux.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@
88
import platform
99

1010
import mss
11+
import pytest
1112
from mss.base import MSSMixin
1213
from mss.exception import ScreenShotError
1314

14-
import pytest
15-
1615

1716
if platform.system().lower() != "linux":
1817
pytestmark = pytest.mark.skip

tests/test_leaks.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import platform
88
from typing import TYPE_CHECKING
99

10-
from mss import mss
11-
1210
import pytest
11+
from mss import mss
1312

1413
if TYPE_CHECKING:
1514
from typing import Callable # noqa

tests/test_macos.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import platform
88

99
import mss
10-
from mss.exception import ScreenShotError
11-
1210
import pytest
11+
from mss.exception import ScreenShotError
1312

1413

1514
if platform.system().lower() != "darwin":

tests/test_tools.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import os.path
88
import zlib
99

10-
from mss.tools import to_png
11-
1210
import pytest
11+
from mss.tools import to_png
1312

1413

1514
WIDTH = 10

tests/test_windows.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import platform
88

99
import mss
10-
from mss.exception import ScreenShotError
11-
1210
import pytest
11+
from mss.exception import ScreenShotError
1312

1413

1514
if platform.system().lower() != "windows":

0 commit comments

Comments
 (0)