kbasic 0.1.30__tar.gz → 0.1.32__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: kbasic
3
- Version: 0.1.30
3
+ Version: 0.1.32
4
4
  Summary: Keyan's basic utility functions.
5
5
  Author: Keyan Gootkin
6
6
  Author-email: Keyan Gootkin <keyangootkin@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "kbasic"
3
- version = "0.1.30"
3
+ version = "0.1.32"
4
4
  description = "Keyan's basic utility functions."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -4,7 +4,7 @@
4
4
  #pysim imports
5
5
  from kbasic.user_input import yesno
6
6
  #nonpysim imports
7
- from typing import Self
7
+ from typing import Self, Optional
8
8
  from numpy import ndarray
9
9
  from glob import glob
10
10
  from shutil import copy, move, copytree, rmtree
@@ -54,7 +54,7 @@ def could_be_path(path: str) -> bool:
54
54
  # >-|===|> Classes <|===|-<
55
55
  # !==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==!==
56
56
  class File:
57
- def __init__(self, path:str, master=None, verbose:bool=False) -> None:
57
+ def __init__(self, path: str|Self, master=None, verbose:bool=False) -> None:
58
58
  """A convenience class to deal with file io
59
59
 
60
60
  Args:
@@ -125,9 +125,9 @@ class TOML(File):
125
125
  self.__dict__ |= self._attrs
126
126
  self.lines = [f"{k}={v}" for k,v in self._attrs.items()]
127
127
  class Folder:
128
- def __init__(self, path:str, master=None) -> None:
128
+ def __init__(self, path: str|Self, master: Optional[Self]=None) -> None:
129
129
  if type(path)==type(self):
130
- self = path
130
+ self.__init__(path.path)
131
131
  return None
132
132
  self.path = clean_path(path)
133
133
  self.master = master if not isinstance(master, str) else Folder(master)
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