Skip to content

Commit 34b628d

Browse files
committed
v0.7 pre-release
1 parent 3b22bf8 commit 34b628d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,9 @@ or
251251

252252
python3 -m pip install pywinctl
253253

254-
Alternatively, you can download the wheel file (.whl) available in the [Download page](https://pypi.org/project/PyWinCtl/#files) and the [dist folder](https://github.com/Kalmat/PyWinCtl/tree/master/dist), and run this (don't forget to replace 'x.x.xx' with proper version number):
254+
Alternatively, you can download the wheel file (.whl) available in the [Download page](https://pypi.org/project/PyWinCtl/#files) and run this (don't forget to replace 'x.xx' with proper version number):
255255

256-
pip install PyWinCtl-x.x.xx-py3-none-any.whl
256+
pip install PyWinCtl-x.xx-py3-none-any.whl
257257

258258
You may want to add `--force-reinstall` option to be sure you are installing the right dependencies version.
259259

src/pywinctl/_pywinctl_macos.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def __init__(self, app: AppKit.NSRunningApplication, title: str):
507507
self._appName: str = self.getProcName(self._appPID)
508508
if not self._appName:
509509
# localizedName() is not recognized in AppleScript for non-English languages
510-
self._appName: str = app.localizedName()
510+
self._appName = app.localizedName()
511511
self._initTitle: str = title
512512
self._winTitle: str = title
513513
# self._parent = self.getParent() # It is slow and not required by now
@@ -1301,8 +1301,7 @@ def visible(self) -> bool:
13011301
13021302
:return: ``True`` if the window is currently visible
13031303
"""
1304-
return self._winTitle and self._winTitle in _getAppWindowsTitles(self._app)
1305-
1304+
return bool(self._winTitle and self._winTitle in _getAppWindowsTitles(self._app))
13061305
isVisible: bool = cast(bool, visible) # isVisible is an alias for the visible property.
13071306

13081307
@property

src/pywinctl/_pywinctl_win.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ def isParent(self, child: int) -> bool:
823823
:param child: handle of the window you want to check if the current window is parent of
824824
:return: ''True'' if current window is parent of the given window
825825
"""
826-
return child and win32gui.GetParent(child) == self._hWnd
826+
return bool(child and win32gui.GetParent(child) == self._hWnd)
827827
isParentOf = isParent # isParentOf is an alias of isParent method
828828

829829
def isChild(self, parent: int) -> bool:

0 commit comments

Comments
 (0)