|
15 | 15 | import string
|
16 | 16 | from collections import OrderedDict, namedtuple
|
17 | 17 | import threading
|
18 |
| -from functools import wraps |
19 | 18 | import datetime
|
20 | 19 | import webbrowser
|
21 | 20 |
|
|
47 | 46 | from pyrevit import versionmgr
|
48 | 47 | from pyrevit.userconfig import user_config
|
49 | 48 |
|
50 |
| -import pyevent # pylint: disable=import-error |
| 49 | +import pyevent |
51 | 50 |
|
52 | 51 | import Autodesk.Windows.ComponentManager # pylint: disable=import-error
|
53 | 52 | import Autodesk.Internal.InfoCenter # pylint: disable=import-error
|
@@ -696,7 +695,7 @@ def show(
|
696 | 695 | title="User Input",
|
697 | 696 | width=DEFAULT_INPUTWINDOW_WIDTH,
|
698 | 697 | height=DEFAULT_INPUTWINDOW_HEIGHT,
|
699 |
| - **kwargs |
| 698 | + **kwargs, |
700 | 699 | ):
|
701 | 700 | """Show user input window.
|
702 | 701 |
|
@@ -1182,29 +1181,26 @@ def clear_search(self, sender, args): # pylint: disable=W0613
|
1182 | 1181 | self.search_tb.Focus()
|
1183 | 1182 |
|
1184 | 1183 | @classmethod
|
1185 |
| - def show( |
1186 |
| - cls, |
1187 |
| - context, |
1188 |
| - title='User Input', |
1189 |
| - width=DEFAULT_INPUTWINDOW_WIDTH, |
1190 |
| - height=DEFAULT_INPUTWINDOW_HEIGHT, |
1191 |
| - exitscript=False |
1192 |
| - **kwargs |
1193 |
| - ): |
1194 |
| - """Show user input window. |
1195 |
| - |
1196 |
| - Args: |
1197 |
| - context (any): window context element(s) |
1198 |
| - width: ... |
1199 |
| - height: ... |
1200 |
| - exitscript: exit the script if the user cancels the dialog. Defaults to False |
1201 |
| - """ |
1202 |
| - dlg = cls(context, title, width, height, **kwargs) |
1203 |
| - dlg.ShowDialog() |
1204 |
| - |
1205 |
| - if exitscript and not dlg.response: |
1206 |
| - sys.exit() |
1207 |
| - |
| 1184 | + def show( |
| 1185 | + cls, |
| 1186 | + context, |
| 1187 | + title="User Input", |
| 1188 | + width=DEFAULT_INPUTWINDOW_WIDTH, |
| 1189 | + height=DEFAULT_INPUTWINDOW_HEIGHT, |
| 1190 | + exitscript=False, |
| 1191 | + **kwargs, |
| 1192 | + ): |
| 1193 | + """Show user input window. |
| 1194 | + Args: |
| 1195 | + context (any): window context element(s) |
| 1196 | + width: ... |
| 1197 | + height: ... |
| 1198 | + exitscript: exit the script if the user cancels the dialog. Defaults to False |
| 1199 | + """ |
| 1200 | + dlg = cls(context, title, width, height, **kwargs) |
| 1201 | + dlg.ShowDialog() |
| 1202 | + if exitscript and not dlg.response: |
| 1203 | + sys.exit() |
1208 | 1204 | return dlg.response
|
1209 | 1205 |
|
1210 | 1206 |
|
@@ -2011,7 +2007,7 @@ def show(
|
2011 | 2007 | search_db, # pylint: disable=W0221
|
2012 | 2008 | width=DEFAULT_SEARCHWND_WIDTH,
|
2013 | 2009 | height=DEFAULT_SEARCHWND_HEIGHT,
|
2014 |
| - **kwargs |
| 2010 | + **kwargs, |
2015 | 2011 | ):
|
2016 | 2012 | """Show search prompt."""
|
2017 | 2013 | dlg = cls(search_db, width, height, **kwargs)
|
@@ -2851,7 +2847,7 @@ def select_family_parameters(
|
2851 | 2847 | if not include_labeled and family_param.Id in label_param_ids:
|
2852 | 2848 | continue
|
2853 | 2849 |
|
2854 |
| - associated_to_others = not (family_param.AssociatedParameters.IsEmpty) |
| 2850 | + associated_to_others = not family_param.AssociatedParameters.IsEmpty |
2855 | 2851 | if not include_associated and associated_to_others:
|
2856 | 2852 | continue
|
2857 | 2853 |
|
@@ -3556,7 +3552,7 @@ def ask_for_unique_string(
|
3556 | 3552 | prompt=prompt,
|
3557 | 3553 | title=title,
|
3558 | 3554 | reserved_values=reserved_values,
|
3559 |
| - **kwargs |
| 3555 | + **kwargs, |
3560 | 3556 | )
|
3561 | 3557 |
|
3562 | 3558 |
|
@@ -3593,7 +3589,7 @@ def ask_for_one_item(items, default=None, prompt=None, title=None, **kwargs):
|
3593 | 3589 | default=default,
|
3594 | 3590 | prompt=prompt,
|
3595 | 3591 | title=title,
|
3596 |
| - **kwargs |
| 3592 | + **kwargs, |
3597 | 3593 | )
|
3598 | 3594 |
|
3599 | 3595 |
|
@@ -3667,7 +3663,7 @@ def ask_for_number_slider(
|
3667 | 3663 | max=max,
|
3668 | 3664 | min=min,
|
3669 | 3665 | interval=interval,
|
3670 |
| - **kwargs |
| 3666 | + **kwargs, |
3671 | 3667 | )
|
3672 | 3668 |
|
3673 | 3669 |
|
|
0 commit comments