salabim 25.0.5__py3-none-any.whl → 25.0.7__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.
salabim/salabim.py CHANGED
@@ -1,13 +1,13 @@
1
- # _ _ _ ____ ____ ___ ____
2
- # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | ___| / _ \ | ___|
3
- # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) ||___ \ | | | | |___ \
4
- # \__ \| (_| || || (_| || |_) || || | | | | | / __/ ___) | _ | |_| | _ ___) |
5
- # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____||____/ (_) \___/ (_)|____/
1
+ # _ _ _ ____ ____ ___ _____
2
+ # ___ __ _ | | __ _ | |__ (_) _ __ ___ |___ \ | ___| / _ \ |___ |
3
+ # / __| / _` || | / _` || '_ \ | || '_ ` _ \ __) ||___ \ | | | | / /
4
+ # \__ \| (_| || || (_| || |_) || || | | | | | / __/ ___) | _ | |_| | _ / /
5
+ # |___/ \__,_||_| \__,_||_.__/ |_||_| |_| |_| |_____||____/ (_) \___/ (_) /_/
6
6
  # discrete event simulation
7
7
  #
8
8
  # see www.salabim.org for more information, the documentation and license information
9
9
 
10
- __version__ = "25.0.5"
10
+ __version__ = "25.0.7"
11
11
  import heapq
12
12
  import random
13
13
  import time
@@ -3209,7 +3209,7 @@ class Monitor:
3209
3209
  if ex0:
3210
3210
  x0 = [vx for vx in x if vx != 0]
3211
3211
  if typecode:
3212
- x0 = array.array(typecode, x)
3212
+ x0 = array.array(typecode, x0)
3213
3213
 
3214
3214
  if self._weight:
3215
3215
  if ex0:
@@ -7201,20 +7201,11 @@ class Component:
7201
7201
  else:
7202
7202
  self.env.print_trace("", "", self.name() + " create data component", self._modetxt())
7203
7203
  else:
7204
- _check_overlapping_parameters(self, "__init__", "process")
7205
- _check_overlapping_parameters(self, "setup", "process")
7204
+ _check_overlapping_parameters(self, "__init__", process_name,process=p)
7205
+ _check_overlapping_parameters(self, "setup", process_name,process=p)
7206
7206
 
7207
7207
  self.env.print_trace("", "", self.name() + " create", self._modetxt())
7208
7208
 
7209
- process_parameters = inspect.signature(self.process).parameters
7210
- init_parameters = inspect.signature(self.__init__).parameters
7211
- if process_parameters:
7212
- for parameter in process_parameters:
7213
- if parameter in init_parameters:
7214
- raise AttributeError(
7215
- f"{self.__class__.__name__}.process() error: parameter '{parameter}' not allowed, because it is a parameter of {self.__class__.__name__}.__init__()"
7216
- )
7217
-
7218
7209
  kwargs_p = {}
7219
7210
 
7220
7211
  if kwargs:
@@ -25120,7 +25111,7 @@ def _set_name(name, _nameserialize, object):
25120
25111
  object._name = name
25121
25112
 
25122
25113
 
25123
- def _check_overlapping_parameters(obj, method_name0, method_name1):
25114
+ def _check_overlapping_parameters(obj, method_name0, method_name1,process=None):
25124
25115
  """
25125
25116
  this function is a helper to see whether __init__, setup and process parameters overlap
25126
25117
 
@@ -25134,8 +25125,18 @@ def _check_overlapping_parameters(obj, method_name0, method_name1):
25134
25125
 
25135
25126
  method_name1 : str
25136
25127
  name of the second method to be tested
25128
+
25129
+ process: method
25130
+ used for process check: should be the process methoc
25137
25131
  """
25138
- overlapping_parameters = set(inspect.signature(getattr(obj, method_name0)).parameters) & set(inspect.signature(getattr(obj, method_name1)).parameters)
25132
+ method0=getattr(obj, method_name0)
25133
+
25134
+ if process is None:
25135
+ method1=getattr(obj, method_name1)
25136
+ else:
25137
+ method1=process
25138
+
25139
+ overlapping_parameters = set(inspect.signature(method0).parameters) & set(inspect.signature(method1).parameters)
25139
25140
  if overlapping_parameters:
25140
25141
  raise TypeError(
25141
25142
  f"{obj.__class__.__name__}.{method_name1}() error: parameter '{list(overlapping_parameters)[0]}' not allowed, because it is also a parameter of {obj.__class__.__name__}.{method_name0}()"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: salabim
3
- Version: 25.0.5
3
+ Version: 25.0.7
4
4
  Summary: salabim - discrete event simulation in Python
5
5
  Author-email: Ruud van der Ham <rt.van.der.ham@gmail.com>
6
6
  Project-URL: Homepage, https://salabim.org
@@ -60,7 +60,7 @@ Contributions to salabim are highly appreciated! You can contribute by issuing a
60
60
 
61
61
  ### License
62
62
 
63
- Salabim is licensed under the MIT License. For details, please refer to the [LICENSE](LICENSE) file.
63
+ Salabim is licensed under the MIT License.
64
64
 
65
65
  ### Support
66
66
 
@@ -3,8 +3,8 @@ salabim/LICENSE.txt,sha256=eTPlcDJz4G0096Qv-wfMjm1Wxbd4ilDlsYg5rN4HjWQ,1106
3
3
  salabim/__init__.py,sha256=r7qPLvlmX0dkZDyjuTo8Jo3ex3sD1L4pmK6K5ib9vyw,56
4
4
  salabim/calibri.ttf,sha256=RWpf8Uo31RfvGGNaSt9-2sXSuN87AVE_NFMRsV3LhBk,1330156
5
5
  salabim/mplus-1m-regular.ttf,sha256=EuFHr90BJjuAn_r5MleJFN-WfkeWJ4tf7DweI5zr8tU,289812
6
- salabim/salabim.py,sha256=8JPEhiyjRY0_wPsfbcyDbMXciSKdCSzM3bbNOCeFYmc,1126040
7
- salabim-25.0.5.dist-info/METADATA,sha256=Ia0_uZ1GmfCXq8sOlrLmwF9ART30RrA8jTYVrpIP7zc,3457
8
- salabim-25.0.5.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
9
- salabim-25.0.5.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
- salabim-25.0.5.dist-info/RECORD,,
6
+ salabim/salabim.py,sha256=fPJt1KQCzcKvY1zxVVsaZMWumB9KCUa03SySJaMYwoE,1125723
7
+ salabim-25.0.7.dist-info/METADATA,sha256=ETRykdUqh-or7N6LKOHNYFV_FXhwa0QmCFYJx4jKPgI,3399
8
+ salabim-25.0.7.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
9
+ salabim-25.0.7.dist-info/top_level.txt,sha256=UE6zVlbi3F6T5ma1a_5TrojMaF21GYKDt9svvm0U4cQ,8
10
+ salabim-25.0.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.0.0)
2
+ Generator: setuptools (76.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5