Skip to content

Commit

Permalink
Fixed syntax error in deprecated code (ColinDuquesnoy#241)
Browse files Browse the repository at this point in the history
```
In [7]: qdarkstyle.load_stylesheet_from_environment(is_pyqtgraph=True)
Traceback (most recent call last):

  File "<ipython-input-7-7235cbc7ab37>", line 1, in <module>
    qdarkstyle.load_stylesheet_from_environment(is_pyqtgraph=True)

  File "C:\Users\Oscar\Anaconda3\lib\site-packages\qdarkstyle\__init__.py", line 388, in load_stylesheet_from_environment
    stylesheet = _load_stylesheet(qt_api=os.environ('PYQTGRAPH_QT_LIB'))

TypeError: '_Environ' object is not callable
```
Deprecated, but still good if no syntax errors occur...
  • Loading branch information
oscargus authored and juanis2112 committed Jan 21, 2021
1 parent 721e8b4 commit 2ed5195
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qdarkstyle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ def load_stylesheet_from_environment(is_pyqtgraph=False):
warnings.warn(DEPRECATION_MSG, DeprecationWarning)

if is_pyqtgraph:
stylesheet = _load_stylesheet(qt_api=os.environ('PYQTGRAPH_QT_LIB'))
stylesheet = _load_stylesheet(qt_api=os.environ.get('PYQTGRAPH_QT_LIB', None))
else:
stylesheet = _load_stylesheet()

Expand Down

0 comments on commit 2ed5195

Please sign in to comment.