Skip to content

Commit

Permalink
fixing imports for class Shortcut
Browse files Browse the repository at this point in the history
  • Loading branch information
ye11owSub committed Aug 17, 2024
1 parent 11d1f60 commit 1343794
Show file tree
Hide file tree
Showing 17 changed files with 30 additions and 18 deletions.
4 changes: 3 additions & 1 deletion modules/pymol/commanding.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#-*
#Z* -------------------------------------------------------------------

from pymol.shortcut import Shortcut

if True:

import sys
Expand Down Expand Up @@ -39,7 +41,7 @@
cmd = sys.modules["pymol.cmd"]
import pymol

from .cmd import _cmd, Shortcut, QuietException, \
from .cmd import _cmd, QuietException, \
fb_module, fb_mask, is_list, \
DEFAULT_ERROR, DEFAULT_SUCCESS, is_ok, is_error, is_string

Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/constants.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# constant objects

from pymol.shortcut import Shortcut
from .parsing import QuietException
from .shortcut import Shortcut
from .constants_palette import palette_dict
import re

Expand Down
4 changes: 2 additions & 2 deletions modules/pymol/controlling.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@
#-*
#Z* -------------------------------------------------------------------

from pymol.shortcut import Shortcut

if True:
try:
from . import selector, internal
from .shortcut import Shortcut
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd, QuietException, is_string, \
boolean_dict, boolean_sc, \
DEFAULT_ERROR, DEFAULT_SUCCESS, is_ok, is_error, \
location_code, location_sc
import pymol
except:
from shortcut import Shortcut
cmd = None


Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/creating.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#-*
#Z* -------------------------------------------------------------------

from pymol.shortcut import Shortcut
from .constants import CURRENT_STATE, ALL_STATES

if True:
Expand All @@ -23,7 +24,7 @@
import re
import gzip
import os
from .cmd import _cmd, Shortcut, is_list, is_string, \
from .cmd import _cmd, is_list, is_string, \
safe_list_eval, safe_alpha_list_eval, \
DEFAULT_ERROR, DEFAULT_SUCCESS, is_ok, is_error, \
is_tuple
Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/editing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#Z* -------------------------------------------------------------------

import pymol
from pymol.shortcut import Shortcut
from .constants import CURRENT_STATE, ALL_STATES


Expand Down Expand Up @@ -67,7 +68,7 @@ def _iterate_prepare_args(expression, space, _self):
import math
from . import selector
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd,lock,unlock,Shortcut,is_string, \
from .cmd import _cmd,lock,unlock,is_string, \
boolean_sc,boolean_dict,safe_list_eval, is_sequence, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error
from chempy import cpv
Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/experimenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
if True:

from . import selector
from .cmd import _cmd,lock,unlock,Shortcut,QuietException, \
from .cmd import _cmd,lock,unlock,QuietException, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error
cmd = __import__("sys").modules["pymol.cmd"]
import threading
Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/exporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#-*
#Z* -------------------------------------------------------------------

from pymol.shortcut import Shortcut
from . import colorprinting

if True:
Expand All @@ -24,7 +25,7 @@

import pymol
cmd = sys.modules["pymol.cmd"]
from .cmd import _cmd,Shortcut,QuietException
from .cmd import _cmd,QuietException
from chempy import io
from chempy.pkl import cPickle
from .cmd import _feedback,fb_module,fb_mask, \
Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/externing.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import traceback

from glob import glob
from .cmd import _cmd,lock,unlock,Shortcut,QuietException, \
from .cmd import _cmd,lock,unlock,QuietException, \
_feedback,fb_module,fb_mask, exp_path, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error

Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/feedingback.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import sys
from pymol.shortcut import Shortcut
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import Shortcut, is_string, QuietException
from .cmd import is_string, QuietException
from .cmd import fb_module, fb_mask, fb_action,_raising
import copy

Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import os
import pymol

from .cmd import _cmd,lock,unlock,Shortcut, \
from .cmd import _cmd,lock,unlock, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error


Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/internal.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import sys
cmd = sys.modules["pymol.cmd"]
from pymol.shortcut import Shortcut
from pymol import _cmd
import threading
import traceback
Expand All @@ -14,7 +15,7 @@

import chempy.io

from .cmd import DEFAULT_ERROR, DEFAULT_SUCCESS, loadable, _load2str, Shortcut, \
from .cmd import DEFAULT_ERROR, DEFAULT_SUCCESS, loadable, _load2str, \
is_string, is_ok

# cache management:
Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/moving.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#-*
#-*
#Z* -------------------------------------------------------------------
from pymol.shortcut import Shortcut

if True:

Expand All @@ -21,7 +22,7 @@
import pymol
import re
cmd = sys.modules["pymol.cmd"]
from .cmd import _cmd,Shortcut, \
from .cmd import _cmd, \
toggle_dict,toggle_sc, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error

Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/querying.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from . import selector
import pymol
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd,lock,unlock,Shortcut, \
from .cmd import _cmd,lock,unlock, \
_feedback,fb_module,fb_mask,is_list, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error

Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/selecting.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@
#-*
#-*
#Z* -------------------------------------------------------------------
from pymol.shortcut import Shortcut

if True:

from . import selector

cmd = __import__("sys").modules["pymol.cmd"]

from .cmd import _cmd,Shortcut, \
from .cmd import _cmd, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error

import pymol
Expand Down
4 changes: 3 additions & 1 deletion modules/pymol/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#Z* -------------------------------------------------------------------

# must match layer1/Setting.h
from pymol.shortcut import Shortcut


cSetting_tuple = -1
cSetting_blank = 0
cSetting_boolean = 1
Expand All @@ -26,7 +29,6 @@

import traceback
from . import selector
from .shortcut import Shortcut
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd,lock,lock_attempt,unlock,QuietException, \
is_string, \
Expand Down
3 changes: 2 additions & 1 deletion modules/pymol/viewing.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#-*
#Z* -------------------------------------------------------------------

from pymol.shortcut import Shortcut
from . import colorprinting

if True:
Expand All @@ -25,7 +26,7 @@
import re
cmd = sys.modules["pymol.cmd"]

from .cmd import _cmd, Shortcut, \
from .cmd import _cmd, \
_feedback,fb_module,fb_mask, \
repres,repres_sc, is_string, is_list, \
repmasks,repmasks_sc, \
Expand Down
2 changes: 1 addition & 1 deletion modules/pymol/wizarding.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import pymol
import sys
cmd = __import__("sys").modules["pymol.cmd"]
from .cmd import _cmd,lock,unlock,Shortcut,QuietException,_raising, \
from .cmd import _cmd,lock,unlock,QuietException,_raising, \
_feedback,fb_module,fb_mask, \
DEFAULT_ERROR, DEFAULT_SUCCESS, _raising, is_ok, is_error

Expand Down

0 comments on commit 1343794

Please sign in to comment.