neelthee-mansion 0.3.0.2__tar.gz → 0.3.0.3__tar.gz
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.
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/PKG-INFO +1 -1
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/utils.py +16 -2
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/PKG-INFO +1 -1
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/setup.py +1 -1
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/README.md +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/Mansion_of_Amnesia.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/Quests.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/Rooms.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/__init__.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/__main__.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/all_game_utils.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/creatures.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/items.py +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/SOURCES.txt +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/dependency_links.txt +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/entry_points.txt +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/requires.txt +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/top_level.txt +0 -0
- {neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/setup.cfg +0 -0
@@ -18,6 +18,8 @@ try:
|
|
18
18
|
import inspect
|
19
19
|
import threading
|
20
20
|
import json
|
21
|
+
import ast
|
22
|
+
import builtins
|
21
23
|
import requests
|
22
24
|
import keyboard
|
23
25
|
import pandas as pd
|
@@ -234,10 +236,22 @@ def clamp(value, min = 0, max = 0):
|
|
234
236
|
return value
|
235
237
|
|
236
238
|
def is_executable(code_str):
|
239
|
+
code_str = code_str.strip()
|
240
|
+
if not code_str: # Check for empty or whitespace-only string
|
241
|
+
return False
|
237
242
|
try:
|
238
|
-
|
243
|
+
# Parse the code to ensure it is syntactically correct
|
244
|
+
tree = ast.parse(code_str, mode='exec')
|
245
|
+
|
246
|
+
# Walk through the AST to find undefined names
|
247
|
+
for node in ast.walk(tree):
|
248
|
+
if isinstance(node, ast.Name) and isinstance(node.ctx, ast.Load):
|
249
|
+
# Check if the name is a built-in, defined locally in code, or globally available
|
250
|
+
if node.id not in dir(builtins) and node.id not in globals() and node.id not in locals():
|
251
|
+
return False # Name is not defined
|
252
|
+
|
239
253
|
return True
|
240
|
-
except SyntaxError:
|
254
|
+
except (SyntaxError, TypeError):
|
241
255
|
return False
|
242
256
|
|
243
257
|
def play_sound(sound_file):
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name='neelthee_mansion',
|
5
|
-
version='0.3.0.
|
5
|
+
version='0.3.0.3',
|
6
6
|
packages=find_packages(), # Automatically finds all packages and modules
|
7
7
|
install_requires=[
|
8
8
|
'wheel', 'psutil', 'playsound', 'requests', 'keyboard', 'pandas', 'validators', 'dicttoxml', 'pytz',
|
File without changes
|
{neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion/Mansion_of_Amnesia.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/dependency_links.txt
RENAMED
File without changes
|
{neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/entry_points.txt
RENAMED
File without changes
|
{neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/requires.txt
RENAMED
File without changes
|
{neelthee_mansion-0.3.0.2 → neelthee_mansion-0.3.0.3}/neelthee_mansion.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|