From 343612821061b45c3ccaf5fd16e57f3ca2dd6fa6 Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:04:55 +0700 Subject: [PATCH 1/6] Update README.rst Fix code not showing up in README --- README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/README.rst b/README.rst index 55a4bc6..2d0b7fe 100644 --- a/README.rst +++ b/README.rst @@ -82,6 +82,7 @@ Examples **GlobalJSON:** .. code:: python + import cool_utils cool_utils.GlobalJSON.open("sample") From 61ecd9b114e5b603654df102147221dfa917d1e6 Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:08:15 +0700 Subject: [PATCH 2/6] Remove P3ter GitHub link since it redirects to 404 3. `P3ter `__ --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 2d0b7fe..5fa5db7 100644 --- a/README.rst +++ b/README.rst @@ -100,9 +100,9 @@ Collaborators This wouldn’t be made possible without these people 1. `BenitzCoding `__ -2. `JDJG Inc. Official `__ -3. `P3ter `__ -4. `Proguy `__ +1. `JDJG Inc. Official `__ +1. `P3ter`__ +1. `Proguy `__ .. |Discord| image:: https://discord.com/api/guilds/886543799843688498/embed.png :target: https://discord.gg/5YY3W83YWg From 69d2f16becbce915f97084942448fcc54ce8d0f8 Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:08:37 +0700 Subject: [PATCH 3/6] Update README.rst --- README.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 5fa5db7..aa4cdf8 100644 --- a/README.rst +++ b/README.rst @@ -100,9 +100,9 @@ Collaborators This wouldn’t be made possible without these people 1. `BenitzCoding `__ -1. `JDJG Inc. Official `__ -1. `P3ter`__ -1. `Proguy `__ +2. `JDJG Inc. Official `__ +3. `P3ter`__ +4. `Proguy `__ .. |Discord| image:: https://discord.com/api/guilds/886543799843688498/embed.png :target: https://discord.gg/5YY3W83YWg From cfbed353f3f0e803c64b5b8803388721fd24debc Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:08:55 +0700 Subject: [PATCH 4/6] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index aa4cdf8..12be532 100644 --- a/README.rst +++ b/README.rst @@ -101,7 +101,7 @@ This wouldn’t be made possible without these people 1. `BenitzCoding `__ 2. `JDJG Inc. Official `__ -3. `P3ter`__ +3. `P3ter` 4. `Proguy `__ .. |Discord| image:: https://discord.com/api/guilds/886543799843688498/embed.png From 5ecac78cf23795d59caf342cc4f09ccfba4e423f Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:14:00 +0700 Subject: [PATCH 5/6] Change MISSING repr value --- cool_utils/_missing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cool_utils/_missing.py b/cool_utils/_missing.py index 56560e5..6a22e91 100644 --- a/cool_utils/_missing.py +++ b/cool_utils/_missing.py @@ -44,7 +44,7 @@ def __hash__(self): return 0 def __repr__(self): - return '' + return '...' MISSING: Any = _Missing() From feb3de264ff01bbc74d2986d920b2e2401fcb360 Mon Sep 17 00:00:00 2001 From: proguy914629 Date: Mon, 18 Apr 2022 19:18:35 +0700 Subject: [PATCH 6/6] Dumb cache fix --- cool_utils/cache.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cool_utils/cache.py b/cool_utils/cache.py index 0ce1de4..6aaee27 100644 --- a/cool_utils/cache.py +++ b/cool_utils/cache.py @@ -52,7 +52,7 @@ def store(variable: str, value: Any) -> None: raise ValueError("Cannot store _size") payload = { - "_size": (1 + _cache["size"]), + "_size": (1 + _cache["_size"]), f"{variable}": value } _cache.update(payload) @@ -117,14 +117,14 @@ def remove(variable: Any) -> Any: class Cache: def __init__(self): - self._cache = None + self._cache = {"_size": 0} def store(self, variable: str, value: Any) -> None: if variable == "_size": raise ValueError("Cannot store _size") payload = { - "_size": (1 + self._cache["size"]), + "_size": (1 + self._cache["_size"]), f"{variable}": value } self._cache.update(payload)