Skip to content

Commit 0769ae7

Browse files
committed
addded missing type hints to Document() methods.
1 parent 94bedf6 commit 0769ae7

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.7.2
4+
* addded missing type hints to `Document()` methods.
5+
36
## 0.7.1
47

58
* fixed Documents.read() method which was broken by changes made in 0.6.9.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __getattr__(cls, name):
3636
author = 'Paul Bourne'
3737

3838
# The short X.Y version
39-
version = '0.7.1'
39+
version = '0.7.2'
4040
# The full version, including alpha/beta/rc tags
4141
release = version
4242

pycatia/in_interfaces/document.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def current_layer(self, value: str):
147147
self.document.CurrentLayer = value
148148

149149
@property
150-
def is_part(self):
150+
def is_part(self) -> bool:
151151
"""
152152
Determine whether the active document is a CATPart.
153153
@@ -160,7 +160,7 @@ def is_part(self):
160160
return False
161161

162162
@property
163-
def is_product(self):
163+
def is_product(self) -> bool:
164164
"""
165165
Determine whether the active document is a CATProduct.
166166
@@ -171,7 +171,7 @@ def is_product(self):
171171
return False
172172

173173
@property
174-
def is_saved(self):
174+
def is_saved(self) -> bool:
175175
"""
176176
Returns true if document is saved.
177177
@@ -197,7 +197,7 @@ def is_saved(self):
197197
return self.document.Saved
198198

199199
@property
200-
def full_name(self):
200+
def full_name(self) -> str:
201201
"""
202202
203203
.. note::
@@ -246,7 +246,7 @@ def read_only(self) -> bool:
246246
return self.document.ReadOnly
247247

248248
@property
249-
def see_hidden_elements(self):
249+
def see_hidden_elements(self) -> bool:
250250
"""
251251
.. note::
252252
:class: toggle
@@ -711,7 +711,7 @@ def indicate_3d(
711711
]
712712
)
713713

714-
def new_window(self):
714+
def new_window(self) -> Window:
715715
"""
716716
.. note::
717717
:class: toggle
@@ -735,7 +735,7 @@ def new_window(self):
735735
"""
736736
return Window(self.document.NewWindow())
737737

738-
def path(self):
738+
def path(self) -> Path:
739739
"""
740740
741741
Returns the pathlib.Path() object of the document fullname.
@@ -753,7 +753,7 @@ def path(self):
753753

754754
return Path(self.document.FullName)
755755

756-
def remove_filter(self, i_filter_name):
756+
def remove_filter(self, i_filter_name) -> None:
757757
"""
758758
.. note::
759759
:class: toggle
@@ -888,7 +888,7 @@ def search_for_items(self, selection_objects):
888888

889889
return selected
890890

891-
def spa_workbench(self):
891+
def spa_workbench(self) -> SPAWorkbench:
892892
"""
893893
:return:
894894
:rtype: SPAWorkbench

pycatia/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version = "0.7.1"
1+
version = "0.7.2"

0 commit comments

Comments
 (0)