flyshell 1.5.5__tar.gz → 1.5.6__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.
Files changed (76) hide show
  1. {flyshell-1.5.5/src/flyshell.egg-info → flyshell-1.5.6}/PKG-INFO +1 -1
  2. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/abstract/base_cmd.py +7 -1
  3. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/abstract/base_plugin.py +5 -2
  4. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/abstract/parent_cmd.py +1 -2
  5. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/constants.py +3 -3
  6. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/core/data.py +3 -1
  7. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/core/directory.py +1 -1
  8. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/startup/deps.py +1 -1
  9. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/startup/env.py +1 -1
  10. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/startup/loader.py +3 -3
  11. {flyshell-1.5.5 → flyshell-1.5.6/src/flyshell.egg-info}/PKG-INFO +1 -1
  12. {flyshell-1.5.5 → flyshell-1.5.6}/LICENSE +0 -0
  13. {flyshell-1.5.5 → flyshell-1.5.6}/MANIFEST.in +0 -0
  14. {flyshell-1.5.5 → flyshell-1.5.6}/README.md +0 -0
  15. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/diskops.c +0 -0
  16. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/cat.c +0 -0
  17. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/cp.c +0 -0
  18. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/dir.c +0 -0
  19. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/mkdir.c +0 -0
  20. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/mv.c +0 -0
  21. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/rename.c +0 -0
  22. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/rm.c +0 -0
  23. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/rmdir.c +0 -0
  24. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/posix/touch.c +0 -0
  25. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/shared/dir_types.c +0 -0
  26. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/shared/dir_types.h +0 -0
  27. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/shared/native_errors.h +0 -0
  28. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/shared/win32_utf.h +0 -0
  29. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/cat.c +0 -0
  30. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/cp.c +0 -0
  31. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/dir.c +0 -0
  32. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/mkdir.c +0 -0
  33. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/mv.c +0 -0
  34. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/rename.c +0 -0
  35. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/rm.c +0 -0
  36. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/rmdir.c +0 -0
  37. {flyshell-1.5.5 → flyshell-1.5.6}/c_src/diskops/win32/touch.c +0 -0
  38. {flyshell-1.5.5 → flyshell-1.5.6}/pyproject.toml +0 -0
  39. {flyshell-1.5.5 → flyshell-1.5.6}/setup.cfg +0 -0
  40. {flyshell-1.5.5 → flyshell-1.5.6}/setup.py +0 -0
  41. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/__init__.py +0 -0
  42. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/abstract/__init__.py +0 -0
  43. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/accounts/__init__.py +0 -0
  44. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/accounts/auth.py +0 -0
  45. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/bin/__init__.py +0 -0
  46. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/builtin/__init__.py +0 -0
  47. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/builtin/fs.py +0 -0
  48. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/builtin/pkg.py +0 -0
  49. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/builtin/system.py +0 -0
  50. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/builtin/utils.py +0 -0
  51. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/core/__init__.py +0 -0
  52. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/core/console.py +0 -0
  53. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/main.py +0 -0
  54. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/native/__init__.py +0 -0
  55. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/native/diskops_bridge.py +0 -0
  56. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/native/diskops_handler.py +0 -0
  57. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/native/legacy/__init__.py +0 -0
  58. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/native/legacy/diskops.py +0 -0
  59. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell/startup/__init__.py +0 -0
  60. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell.egg-info/SOURCES.txt +0 -0
  61. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell.egg-info/dependency_links.txt +0 -0
  62. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell.egg-info/entry_points.txt +0 -0
  63. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell.egg-info/requires.txt +0 -0
  64. {flyshell-1.5.5 → flyshell-1.5.6}/src/flyshell.egg-info/top_level.txt +0 -0
  65. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_auth.py +0 -0
  66. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_data.py +0 -0
  67. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_deps.py +0 -0
  68. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_directory.py +0 -0
  69. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_diskops_ext.py +0 -0
  70. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_diskops_lgc.py +0 -0
  71. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_env.py +0 -0
  72. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_fs.py +0 -0
  73. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_loader.py +0 -0
  74. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_pkg.py +0 -0
  75. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_security.py +0 -0
  76. {flyshell-1.5.5 → flyshell-1.5.6}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.5.5
3
+ Version: 1.5.6
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
@@ -8,7 +8,13 @@ class BaseCmd:
8
8
  description: str = ""
9
9
  min_args: int = 0
10
10
  options: Optional[str] = None
11
- aliases: List[str] = []
11
+ aliases: Optional[List[str]] = None
12
+
13
+ def __init__(self):
14
+ if self.aliases is None:
15
+ self.aliases = []
16
+ else:
17
+ self.aliases = list(self.aliases)
12
18
 
13
19
  def execute(self, args: List[str]) -> Tuple[int, str]:
14
20
  raise NotImplementedError(
@@ -3,6 +3,7 @@
3
3
  from flyshell.core import data
4
4
 
5
5
  from pathlib import Path
6
+ from typing import Optional
6
7
 
7
8
 
8
9
  class BasePlugin:
@@ -13,10 +14,12 @@ class BasePlugin:
13
14
  identifier: str = ""
14
15
  usage: str = ""
15
16
  extended_help: str = ""
16
- api_keys: list = []
17
- third_pty_libs: list = []
17
+ api_keys: Optional[list] = None
18
+ third_pty_libs: Optional[list] = None
18
19
 
19
20
  def __init__(self, context: dict):
21
+ self.api_keys = list(self.api_keys) if self.api_keys else []
22
+ self.third_pty_libs = list(self.third_pty_libs) if self.third_pty_libs else []
20
23
  self.context = context
21
24
  self.plugin_name = context.get("plugin_name", self.name)
22
25
  self.storage = context.get("storage", {})
@@ -7,10 +7,9 @@ from typing import Dict, List, Tuple
7
7
 
8
8
  class ParentCmd(BaseCmd):
9
9
  min_args: int = 1
10
- subcommands: Dict[str, BaseCmd] = {}
11
10
 
12
11
  def __init__(self):
13
- super().__init__() if hasattr(super(), "__init__") else None
12
+ super().__init__()
14
13
  self._sub_registry: Dict[str, BaseCmd] = {}
15
14
  self._build_registry()
16
15
 
@@ -5,9 +5,9 @@ import os
5
5
  import platform
6
6
  import time
7
7
 
8
- BUILD = 186
9
- VERFULL = "1.5.5d"
10
- VERSION = "1.5.5"
8
+ BUILD = 190
9
+ VERFULL = "1.5.6d"
10
+ VERSION = "1.5.6"
11
11
 
12
12
 
13
13
  def _resolve_app_dir() -> Path:
@@ -26,7 +26,9 @@ def _get_connection(filename=c.FILE_PATH):
26
26
  return conn
27
27
 
28
28
 
29
- def initialise(filename=c.FILE_PATH, initialised=c.INITIALISED):
29
+ def initialise(filename=c.FILE_PATH, initialised=None):
30
+ if initialised is None:
31
+ initialised = c.INITIALISED
30
32
  target = str(filename)
31
33
  if target in initialised:
32
34
  return
@@ -165,7 +165,7 @@ def _execute_single(raw_cmd: str) -> int:
165
165
  elif cmd_name in c.PLUGINS:
166
166
  log(raw_cmd)
167
167
  plugin = c.PLUGINS[cmd_name]
168
- required_keys = getattr(plugin, "api_keys", [])
168
+ required_keys = getattr(plugin, "api_keys", None) or []
169
169
  available_keys = getattr(plugin, "api_keys_data", {})
170
170
  available_lower = {k.lower() for k in available_keys}
171
171
  missing = [k for k in required_keys if k.lower() not in available_lower]
@@ -13,7 +13,7 @@ def check_module_installed(module_name: str) -> bool:
13
13
 
14
14
 
15
15
  def verify_plugin_dependencies(plugin) -> Tuple[List[str], List[str]]:
16
- declared = getattr(plugin, "third_pty_libs", [])
16
+ declared = getattr(plugin, "third_pty_libs", None) or []
17
17
  installed = []
18
18
  missing = []
19
19
  for dep in declared:
@@ -119,7 +119,7 @@ def get_plugin_keys_formatted(target_name: str) -> tuple[int, str]:
119
119
  return (1, f"File Config Error: Environment file not found at '{env_path}'.")
120
120
  dir_name, plugin = _resolve_plugin_dir_name(target_name)
121
121
  configured_keys = get_plugin_api_keys(target_name)
122
- required_keys = getattr(plugin, "api_keys", []) if plugin else []
122
+ required_keys = (getattr(plugin, "api_keys", None) or []) if plugin else []
123
123
  if not configured_keys and not required_keys:
124
124
  return (0, f"No API keys found or required for plugin '{target_name}'.")
125
125
  lines = [f"API Keys for plugin '{target_name}' (folder: '{dir_name}'):"]
@@ -62,7 +62,7 @@ def scan_plugins(plugin_folder=None):
62
62
  )
63
63
  break
64
64
  ctx = build_context(resolved_name, default_name, file_path)
65
- required_keys = getattr(obj, "api_keys", [])
65
+ required_keys = getattr(obj, "api_keys", None) or []
66
66
  found_keys = ctx["api_keys"]
67
67
  found_keys_lower = {k.lower(): v for k, v in found_keys.items()}
68
68
  missing_keys = [
@@ -136,7 +136,7 @@ def check_plugin_api_keys():
136
136
  print("\nFlyshell will now check plugin API keys.")
137
137
  has_keys_to_report = False
138
138
  for identifier, plugin in c.PLUGINS.items():
139
- required_keys = getattr(plugin, "api_keys", [])
139
+ required_keys = getattr(plugin, "api_keys", None) or []
140
140
  configured_keys = getattr(plugin, "api_keys_data", {})
141
141
  dir_name = plugin.context.get("plugin_dir_name", identifier)
142
142
  if not required_keys and not configured_keys:
@@ -168,7 +168,7 @@ def check_all_plugin_dependencies() -> Dict[str, List[str]]:
168
168
  plugins_with_deps = False
169
169
  all_missing: Dict[str, List[str]] = {}
170
170
  for identifier, plugin in c.PLUGINS.items():
171
- declared = getattr(plugin, "third_pty_libs", [])
171
+ declared = getattr(plugin, "third_pty_libs", None) or []
172
172
  if not declared:
173
173
  continue
174
174
  plugins_with_deps = True
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flyshell
3
- Version: 1.5.5
3
+ Version: 1.5.6
4
4
  Summary: A modular, zero-dependency command-line environment in Python.
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
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
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes