nano-dev-utils 0.3.4__tar.gz → 0.3.5__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.

Potentially problematic release.


This version of nano-dev-utils might be problematic. Click here for more details.

Files changed (20) hide show
  1. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/workspace.xml +3 -1
  2. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/PKG-INFO +8 -8
  3. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/README.md +7 -7
  4. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/pyproject.toml +1 -1
  5. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.gitignore +0 -0
  6. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/.gitignore +0 -0
  7. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  8. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/misc.xml +0 -0
  9. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/modules.xml +0 -0
  10. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/nano_dev_utils.iml +0 -0
  11. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/.idea/vcs.xml +0 -0
  12. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/LICENSE.md +0 -0
  13. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/src/nano_dev_utils/__init__.py +0 -0
  14. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/src/nano_dev_utils/dynamic_importer.py +0 -0
  15. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/src/nano_dev_utils/release_ports.py +0 -0
  16. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/src/nano_dev_utils/timers.py +0 -0
  17. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/tests/__init__.py +0 -0
  18. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/tests/testing_dynamic_importer.py +0 -0
  19. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/tests/testing_release_ports.py +0 -0
  20. {nano_dev_utils-0.3.4 → nano_dev_utils-0.3.5}/tests/testing_timer.py +0 -0
@@ -4,7 +4,9 @@
4
4
  <option name="autoReloadType" value="SELECTIVE" />
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
- <list default="true" id="96bbbefe-efb6-42c4-93da-e069ac3e654f" name="Changes" comment="minor update" />
7
+ <list default="true" id="96bbbefe-efb6-42c4-93da-e069ac3e654f" name="Changes" comment="minor update">
8
+ <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
9
+ </list>
8
10
  <option name="SHOW_DIALOG" value="false" />
9
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
10
12
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nano_dev_utils
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: A collection of small Python utilities for developers.
5
5
  Project-URL: Homepage, https://github.com/yaronday/nano_utils
6
6
  Project-URL: Issues, https://github.com/yaronday/nano_utils/issues
@@ -26,13 +26,13 @@ This module provides a `Timer` class for measuring the execution time of code bl
26
26
 
27
27
  * **`__init__(self, precision=4, verbose=False)`**: Initializes a `Timer` instance.
28
28
  * `precision` (int, optional): The number of decimal places to record and
29
- * display time durations. Defaults to 4.
30
- * `verbose` (bool, optional): If `True`, the function's arguments and keyword
31
- * arguments will be included in the printed timing output. Defaults to `False`.
29
+ display time durations. Defaults to 4.
30
+ * `verbose` (bool, optional): If `True`, the function's arguments (args) and keyword arguments (kwargs)
31
+ will be included in the printed timing output. Defaults to `False`.
32
32
 
33
33
  * **`timeit(self, func)`**: A decorator that measures the execution time of the decorated function.
34
34
  * When the decorated function is called, this decorator records the start and end times,
35
- * calculates the total execution time, prints the function name and execution time
35
+ * calculates the total execution time, prints the function name and execution time.
36
36
  * (optionally including arguments if `verbose` is `True`), and returns the result of the original function.
37
37
 
38
38
  #### Example Usage:
@@ -101,16 +101,16 @@ listening on specified TCP ports. It supports Windows, Linux, and macOS.
101
101
 
102
102
  * **`get_pid_by_port(port: int) -> Optional[int]`**: A static method that attempts to
103
103
  * find the process ID (PID) listening on the given `port`. It uses platform-specific
104
- * commands (`netstat`, `ss`, `lsof`). Returns the PID if found, otherwise `None`.
104
+ commands (`netstat`, `ss`, `lsof`). Returns the PID if found, otherwise `None`.
105
105
 
106
106
  * **`kill_process(pid: int) -> bool`**: A static method that attempts to kill the process
107
- * with the given `pid`. It uses platform-specific commands (`taskkill`, `kill -9`).
107
+ with the given `pid`. It uses platform-specific commands (`taskkill`, `kill -9`).
108
108
  * Returns `True` if the process was successfully killed, `False` otherwise.
109
109
 
110
110
  * **`release_all(self, ports: Optional[list[int]] = None) -> None`**: Releases all processes
111
111
  * listening on the specified `ports`.
112
112
  * `ports` (`list[int]`, *optional*): A list of ports to release. If `None`, it uses the
113
- * `default_ports` defined during initialization.
113
+ `default_ports` defined during initialization.
114
114
  * For each port, it first tries to get the PID and then attempts to kill the process.
115
115
  * It logs the actions and any errors encountered. Invalid port numbers in the provided list are skipped.
116
116
 
@@ -12,13 +12,13 @@ This module provides a `Timer` class for measuring the execution time of code bl
12
12
 
13
13
  * **`__init__(self, precision=4, verbose=False)`**: Initializes a `Timer` instance.
14
14
  * `precision` (int, optional): The number of decimal places to record and
15
- * display time durations. Defaults to 4.
16
- * `verbose` (bool, optional): If `True`, the function's arguments and keyword
17
- * arguments will be included in the printed timing output. Defaults to `False`.
15
+ display time durations. Defaults to 4.
16
+ * `verbose` (bool, optional): If `True`, the function's arguments (args) and keyword arguments (kwargs)
17
+ will be included in the printed timing output. Defaults to `False`.
18
18
 
19
19
  * **`timeit(self, func)`**: A decorator that measures the execution time of the decorated function.
20
20
  * When the decorated function is called, this decorator records the start and end times,
21
- * calculates the total execution time, prints the function name and execution time
21
+ * calculates the total execution time, prints the function name and execution time.
22
22
  * (optionally including arguments if `verbose` is `True`), and returns the result of the original function.
23
23
 
24
24
  #### Example Usage:
@@ -87,16 +87,16 @@ listening on specified TCP ports. It supports Windows, Linux, and macOS.
87
87
 
88
88
  * **`get_pid_by_port(port: int) -> Optional[int]`**: A static method that attempts to
89
89
  * find the process ID (PID) listening on the given `port`. It uses platform-specific
90
- * commands (`netstat`, `ss`, `lsof`). Returns the PID if found, otherwise `None`.
90
+ commands (`netstat`, `ss`, `lsof`). Returns the PID if found, otherwise `None`.
91
91
 
92
92
  * **`kill_process(pid: int) -> bool`**: A static method that attempts to kill the process
93
- * with the given `pid`. It uses platform-specific commands (`taskkill`, `kill -9`).
93
+ with the given `pid`. It uses platform-specific commands (`taskkill`, `kill -9`).
94
94
  * Returns `True` if the process was successfully killed, `False` otherwise.
95
95
 
96
96
  * **`release_all(self, ports: Optional[list[int]] = None) -> None`**: Releases all processes
97
97
  * listening on the specified `ports`.
98
98
  * `ports` (`list[int]`, *optional*): A list of ports to release. If `None`, it uses the
99
- * `default_ports` defined during initialization.
99
+ `default_ports` defined during initialization.
100
100
  * For each port, it first tries to get the PID and then attempts to kill the process.
101
101
  * It logs the actions and any errors encountered. Invalid port numbers in the provided list are skipped.
102
102
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nano_dev_utils"
3
- version = "0.3.4"
3
+ version = "0.3.5"
4
4
 
5
5
  authors = [
6
6
  { name="Yaron Dayan", email="yaronday77@gmail.com" },