Skip to content

Commit 3d89b50

Browse files
committed
Turn off pyright(reportFunctionMemberAccess) in favor of pylint(no-member)
1 parent ef26562 commit 3d89b50

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ ignore = [
2929
reportMissingTypeStubs = "information"
3030
# False positives with TYPE_CHECKING
3131
reportImportCycles = "information"
32-
# PyQt .connect
33-
reportFunctionMemberAccess = "information"
32+
# False positives with PyQt .connect. pylint(no-member) works instead
33+
reportFunctionMemberAccess = "none"
3434
# Extra runtime safety
3535
reportUnnecessaryComparison = "warning"
3636
# Flake8 does a better job

src/capture_windows.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,15 @@ def capture_region(hwnd: int, selection: Region, print_window: bool):
4848
if print_window:
4949
ctypes.windll.user32.PrintWindow(hwnd, dc_object.GetSafeHdc(), PW_RENDERFULLCONTENT)
5050

51-
compatible_dc = cast(PyCDC, dc_object.CreateCompatibleDC())
51+
compatible_dc = dc_object.CreateCompatibleDC()
5252
bitmap: PyCBitmap = win32ui.CreateBitmap()
5353
bitmap.CreateCompatibleBitmap(dc_object, selection.width, selection.height)
5454
compatible_dc.SelectObject(bitmap)
55-
compatible_dc.BitBlt((0, 0), (selection.width, selection.height), dc_object,
56-
(selection.x, selection.y), win32con.SRCCOPY)
55+
compatible_dc.BitBlt((0, 0),
56+
(selection.width, selection.height),
57+
dc_object,
58+
(selection.x, selection.y),
59+
win32con.SRCCOPY)
5760
# https://github.com/kaluluosi/pywin32-stubs/issues/5
5861
# pylint: disable=no-member
5962
except (win32ui.error, pywintypes.error): # type: ignore

typings/cv2-stubs/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def AKAZE_create(
3636
nOctaves=...,
3737
nOctaveLayers=...,
3838
diffusivity=...
39-
) -> typing.Any:
39+
) -> typing.Any:
4040
'AKAZE_create([, descriptor_type[, descriptor_size[, descriptor_channels[, threshold[, nOctaves[, nOctaveLayers[, diffusivity]]]]]]]) -> retval\n. @brief The AKAZE constructor\n. \n. @param descriptor_type Type of the extracted descriptor: DESCRIPTOR_KAZE,\n. DESCRIPTOR_KAZE_UPRIGHT, DESCRIPTOR_MLDB or DESCRIPTOR_MLDB_UPRIGHT.\n. @param descriptor_size Size of the descriptor in bits. 0 -\\> Full size\n. @param descriptor_channels Number of channels in the descriptor (1, 2, 3)\n. @param threshold Detector response threshold to accept point\n. @param nOctaves Maximum octave evolution of the image\n. @param nOctaveLayers Default number of sublevels per scale level\n. @param diffusivity Diffusivity type. DIFF_PM_G1, DIFF_PM_G2, DIFF_WEICKERT or\n. DIFF_CHARBONNIER'
4141
...
4242

typings/pyautogui/__init__.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ImageNotFoundException(PyAutoGUIException):
2323
...
2424

2525

26-
if sys.version_info[0] == 2 or sys.version_info[0:2] in ((3, 1), (3, 2)):
26+
if sys.version_info[0] == 2 or sys.version_info[0:2] in ((3, 1), (3, 2)): # noqa: Y003,Y006
2727
# Python 2 and 3.1 and 3.2 uses collections.Sequence
2828
import collections
2929

0 commit comments

Comments
 (0)