kitty-common 0.4.0__py3-none-any.whl → 0.5.6__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.

Potentially problematic release.


This version of kitty-common might be problematic. Click here for more details.

common/color.py CHANGED
@@ -3,6 +3,7 @@
3
3
  BLACK = (0, 0, 0)
4
4
  BLUE = (75, 200, 255)
5
5
  BRIGHT_GREEN = (100, 255, 100)
6
+ BROWN = (120, 68, 33)
6
7
  DARK_GREY_1 = (190, 190, 190)
7
8
  DARK_GREY_2 = (150, 150, 150)
8
9
  GREY = (200, 200, 200)
common/img.py CHANGED
@@ -34,6 +34,9 @@ class RectFactory(Factory):
34
34
  def collidepoint(self, pos):
35
35
  return self.RECT.collidepoint(pos)
36
36
 
37
+ def move(self, delta):
38
+ self.RECT = self.RECT.move(delta)
39
+
37
40
 
38
41
  def _get_img_dir(path_type):
39
42
  if path_type is PathType.LOCAL:
common/state.py CHANGED
@@ -55,6 +55,7 @@ class GameState(abc.ABC):
55
55
 
56
56
  def run(self):
57
57
  while self.active:
58
+ pygame.display.init()
58
59
  for event in pygame.event.get():
59
60
  for handle in self._event_handlers:
60
61
  consumed = handle(event)
common/test_utils.py CHANGED
@@ -1,5 +1,6 @@
1
1
  """Test utilities."""
2
2
 
3
+ import sys
3
4
  import pygame
4
5
  from pygame.locals import *
5
6
  import unittest.mock
@@ -39,7 +40,7 @@ class PygameImagePatch:
39
40
  return self.__enter__()
40
41
 
41
42
  def stop(self):
42
- return self.__exit__()
43
+ return self.__exit__(*sys.exc_info())
43
44
 
44
45
 
45
46
  def patch(module, *args, **kwargs):
@@ -60,6 +61,7 @@ class MockEvent:
60
61
  class MockScreen:
61
62
 
62
63
  def __init__(self, rect=None):
64
+ pygame.init()
63
65
  self.rect = rect or pygame.Rect(0, 0, 0, 0)
64
66
  self.fullscreen = False
65
67
  self.mock = unittest.mock.MagicMock()
@@ -1,17 +1,22 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: kitty-common
3
- Version: 0.4.0
3
+ Version: 0.5.6
4
4
  Summary: kitty games common library
5
5
  Home-page: https://github.com/rchen152/common
6
- License: UNKNOWN
7
- Platform: UNKNOWN
8
6
  Classifier: Programming Language :: Python :: 3
9
7
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
10
8
  Classifier: Operating System :: POSIX :: Linux
11
- Requires-Python: >=3.6
9
+ Requires-Python: >=3.10
12
10
  Description-Content-Type: text/markdown
13
- Requires-Dist: pygame (==1.9.6)
11
+ License-File: LICENSE
12
+ Requires-Dist: pygame>=2.1.2
13
+ Dynamic: classifier
14
+ Dynamic: description
15
+ Dynamic: description-content-type
16
+ Dynamic: home-page
17
+ Dynamic: license-file
18
+ Dynamic: requires-dist
19
+ Dynamic: requires-python
20
+ Dynamic: summary
14
21
 
15
22
  # Kitty Common Library
16
-
17
-
@@ -0,0 +1,11 @@
1
+ common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ common/color.py,sha256=yrcC31eUfu0YSApITH8phBLKQIAHrN3PILdlHLqOc-E,267
3
+ common/img.py,sha256=ePJm_HUAoQVZ1QgMjBO3oLPbmqJUXl4LonAivDJFNKo,2121
4
+ common/state.py,sha256=2LTwTiP2iahRysRbm0Z8XeNqVF_2aeQhXEDDmEBOziA,2384
5
+ common/test_utils.py,sha256=vZvq__0erjgBLRf-Rs-sk-FFchx4cwZo7DYB8t0YgZY,2683
6
+ common/img/title_card.png,sha256=eL9ufnDlZZVcJTI_3u3zSb8dzwFN7wC-E-99AAI6i2s,68244
7
+ kitty_common-0.5.6.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
8
+ kitty_common-0.5.6.dist-info/METADATA,sha256=BAzhIBbdSYiEH55SA9YN7R2P1i7ZEeqBjmPfJyupe2Q,630
9
+ kitty_common-0.5.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
10
+ kitty_common-0.5.6.dist-info/top_level.txt,sha256=LOtYx8KZTmnxM_zLK4rwrcI3PRc40Ihwp5rgaQ-ceaI,7
11
+ kitty_common-0.5.6.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.34.2)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,11 +0,0 @@
1
- common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- common/color.py,sha256=YWndh9sxMS4XJSoHBPCs3n27iILNH8xKGOswwN7S2t8,245
3
- common/img.py,sha256=S6C7HlvKDik58RNkALMhFP2jX5t8Gl_6mHkCuacbr20,2051
4
- common/state.py,sha256=wV5uUbEOIYT8XZ5QgVCx-e9Nf5LIroGeyoOI01NBE2A,2350
5
- common/test_utils.py,sha256=3RI-4ynP8w4BpTHqXbS_qMn6boJuAEbhpEj85JToB_s,2635
6
- common/img/title_card.png,sha256=eL9ufnDlZZVcJTI_3u3zSb8dzwFN7wC-E-99AAI6i2s,68244
7
- kitty_common-0.4.0.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
8
- kitty_common-0.4.0.dist-info/METADATA,sha256=bOp-Zuj4TBmChiPGxkQx9WfVdgE8TjO0Db-UAcMi4Vc,466
9
- kitty_common-0.4.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
10
- kitty_common-0.4.0.dist-info/top_level.txt,sha256=LOtYx8KZTmnxM_zLK4rwrcI3PRc40Ihwp5rgaQ-ceaI,7
11
- kitty_common-0.4.0.dist-info/RECORD,,