dshellInterpreter 0.2.18.5__py3-none-any.whl → 0.2.18.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dshellInterpreter might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- from asyncio import sleep
1
+ from asyncio import sleep, run_coroutine_threadsafe, get_running_loop
2
2
  from re import findall
3
3
  from typing import TypeVar, Union, Any, Optional, Callable
4
4
  from copy import deepcopy
@@ -90,7 +90,7 @@ class DshellInterpreteur:
90
90
  '__guild_forum_channels__': ListNode([channel.id for channel in message.channel.guild.forum_channels]),
91
91
  '__guild_channels_count__': len(message.channel.guild.channels),
92
92
 
93
- } if message is not None and not debug else {'__ret__': None}
93
+ } if message is not None and not debug else {'__ret__': None} # {} is used in debug mode, when ctx is None
94
94
  if vars_env is not None: # add the variables to the environment
95
95
  self.env.update(vars_env)
96
96
  self.vars = vars if vars is not None else ''
@@ -223,7 +223,7 @@ class DshellInterpreteur:
223
223
  return self.env[token.value]
224
224
  return token.value
225
225
  elif token.type == DTT.EVAL_GROUP:
226
- self.execute(token.value)
226
+ run_coroutine_threadsafe(self.execute(token.value), get_running_loop())
227
227
  return self.env['__ret__']
228
228
  elif token.type == DTT.STR:
229
229
  for match in findall(rf"\$({'|'.join(self.env.keys())})", token.value):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.2.18.5
3
+ Version: 0.2.18.6
4
4
  Summary: A Discord bot interpreter for creating custom commands and automations.
5
5
  Home-page: https://github.com/BOXERRMD/Dshell_Interpreter
6
6
  Author: Chronos
@@ -16,7 +16,7 @@ Dshell/DISCORD_COMMANDS/utils/utils_permissions.py,sha256=Gi6vpCA2yXUZ20OCay5dkX
16
16
  Dshell/DISCORD_COMMANDS/utils/utils_string.py,sha256=2LvJG_PR_VkPdnsw0vKNTwhEQGNog-3gFd_rZIUpGKc,4709
17
17
  Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-eIFUigDSJfK9mT1ww,1457
18
18
  Dshell/_DshellInterpreteur/__init__.py,sha256=jl_gH8MoqerW--I-IHXwUZTo80JOtfr7AOA57xVgeGQ,58
19
- Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=JbCaQmeeWlvv7LE2TMK5Jd9wFoXAMVVog9UA9up0BZk,29105
19
+ Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=PmEW0BMbrxaf6UksB6RItaSX8ecsBN2GDdclTX91c1E,29240
20
20
  Dshell/_DshellInterpreteur/errors.py,sha256=0PJz_VYZfNZeKR_PEHxw3tRkgKNNUerV0wwrq2r1luA,250
21
21
  Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
22
22
  Dshell/_DshellParser/ast_nodes.py,sha256=6SGRQ4wTniah90f-teCKg-l9q3yNzazIhi7Obm38Vow,19636
@@ -25,8 +25,8 @@ Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8q
25
25
  Dshell/_DshellTokenizer/dshell_keywords.py,sha256=TI5O6y6gAXpM_dKxCW9Fk0H8VR-gmyxxKKOURgcHsCg,7219
26
26
  Dshell/_DshellTokenizer/dshell_token_type.py,sha256=bkug7eBKjYofkOGmwzPnAH9rQlU14cO0PelZbT0kGoQ,1544
27
27
  Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=aSXdzEyhqoYYLpMLsLwRpeQPp84PA1F5cjm9O1EYBQs,7350
28
- dshellinterpreter-0.2.18.5.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
29
- dshellinterpreter-0.2.18.5.dist-info/METADATA,sha256=F2brpKTL3vIVVhDdFBiHJrnUpuWB8X_HT6w1I-FeThc,1151
30
- dshellinterpreter-0.2.18.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- dshellinterpreter-0.2.18.5.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
32
- dshellinterpreter-0.2.18.5.dist-info/RECORD,,
28
+ dshellinterpreter-0.2.18.6.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
29
+ dshellinterpreter-0.2.18.6.dist-info/METADATA,sha256=8yPu443tTRWJO6pNWxR-tu4WUHgftqnYprAOBXyFiDE,1151
30
+ dshellinterpreter-0.2.18.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ dshellinterpreter-0.2.18.6.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
32
+ dshellinterpreter-0.2.18.6.dist-info/RECORD,,