Skip to content

add window_specification module and move WindowSpecification definition to that#1326

Draft
junkmd wants to merge 6 commits into
pywinauto:masterfrom
junkmd:separate_window_spec_module
Draft

add window_specification module and move WindowSpecification definition to that#1326
junkmd wants to merge 6 commits into
pywinauto:masterfrom
junkmd:separate_window_spec_module

Conversation

@junkmd

@junkmd junkmd commented Aug 28, 2023

Copy link
Copy Markdown
Contributor

The WindowSpecification is referred from both Application and Desktop, but it was defined in the base_application module.
Thus, the Desktop needs to import the WindowSpecification from base_application module. It makes an undesirable dependency.

Additionally, WindowSpecification is a concrete class, and defining it in a module named base_... feels somewhat out of place.

I moved the definition of WindowSpecification to a module named window_specification, similar to how BackEnd in the backend module.

@codecov

codecov Bot commented Aug 28, 2023

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.60274% with 27 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.16%. Comparing base (e60cf9e) to head (6036a45).
⚠️ Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1326      +/-   ##
==========================================
+ Coverage   87.89%   94.16%   +6.27%     
==========================================
  Files          60       61       +1     
  Lines       23063    23069       +6     
==========================================
+ Hits        20271    21724    +1453     
+ Misses       2792     1345    -1447     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@junkmd junkmd closed this Sep 12, 2023
@junkmd junkmd reopened this Sep 12, 2023
Comment thread pywinauto/base_wrapper.py
Current wrapper object is used as a parent while searching in the subtree.
"""
from .base_application import WindowSpecification
from .window_specification import WindowSpecification

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [pywinauto.window_specification](1) begins an import cycle.

from . import controls
from . import findbestmatch
from . import findwindows

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [pywinauto.findwindows](1) begins an import cycle.
from . import findbestmatch
from . import findwindows

from . import backend as backends

Check notice

Code scanning / CodeQL

Cyclic import

Import of module [pywinauto.backend](1) begins an import cycle.
@junkmd
junkmd marked this pull request as draft March 26, 2025 14:34
@junkmd
junkmd changed the base branch from atspi to master April 3, 2025 11:39
@junkmd
junkmd force-pushed the separate_window_spec_module branch from 4a52153 to 6036a45 Compare April 3, 2025 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants