turtleshell 1.0.0__py3-none-any.whl → 1.1.0__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.
turtleshell/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  from .core import Screen, Turtle
2
2
 
3
- __version__ = "1.0.0"
3
+ __version__ = "1.1.0"
turtleshell/core.py CHANGED
@@ -44,6 +44,7 @@ class Turtle(turtle.RawTurtle):
44
44
 
45
45
  _pen = None
46
46
  _screen = None
47
+ MULT = 20
47
48
 
48
49
  def __init__(self,
49
50
  shape=turtle._CFG["shape"],
@@ -55,7 +56,7 @@ class Turtle(turtle.RawTurtle):
55
56
  shape=shape,
56
57
  undobuffersize=undobuffersize,
57
58
  visible=visible)
58
- self.shapesize(20)
59
+ self.shapesize(Turtle.MULT)
59
60
  self._pen_hsv = HSV(0, 1, 1)
60
61
  self._fill_hsv = HSV(0, 1, 1)
61
62
 
@@ -122,9 +123,14 @@ class Turtle(turtle.RawTurtle):
122
123
  self.fillcolor(_hsv_to_rgb(self._fill_hsv))
123
124
 
124
125
  def shapesize(self, stretch_wid=None, stretch_len=None, outline=None):
125
- stretch_wid = stretch_wid/20 if stretch_wid else None
126
- stretch_len = stretch_len/20 if stretch_len else None
127
- super().shapesize(stretch_wid, stretch_len, outline)
126
+ if stretch_wid is None and stretch_len is None and outline is None:
127
+ stretch_wid, stretch_len, outline = super().shapesize()
128
+ return stretch_wid*Turtle.MULT, stretch_len*Turtle.MULT, outline
129
+
130
+ stretch_wid = stretch_wid/Turtle.MULT if stretch_wid else None
131
+ stretch_len = stretch_len/Turtle.MULT if stretch_len else None
132
+ ret = super().shapesize(stretch_wid, stretch_len, outline)
133
+ return ret
128
134
 
129
135
  def teleport(self, x, y):
130
136
  pendown = self.isdown()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: turtleshell
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: Convenience wrapper around turtle.Turtle and turtle.Screen
5
5
  Author-email: Sam Mangan <sam.mangan2@gmail.com>
6
6
  License-Expression: MIT
@@ -16,3 +16,42 @@ Requires-Dist: pytest; extra == "dev"
16
16
  # TurtleShell
17
17
 
18
18
  Convenience wrapper around Python turtle standard library.
19
+
20
+ ## Development
21
+ Do all this in a virtual environment, e.g.
22
+ ```
23
+ python3 -m venv venv
24
+ ./venv/bin/activate
25
+ ```
26
+
27
+ Test changes:
28
+ ```
29
+ pip install pytest
30
+ pytest
31
+ ```
32
+
33
+ Push changes.
34
+
35
+ Update package version:
36
+ ```
37
+ pip install bumpver
38
+ bumpver update --minor
39
+ ```
40
+
41
+ Build and check package with twine:
42
+ ```
43
+ pip install build twine
44
+ python -m build
45
+ twine check dist/*
46
+ ```
47
+
48
+ Upload to Test PyPI, install, and test:
49
+ ```
50
+ twine upload -r testpypi dist/*
51
+ pip install -i https://test.pypi.org/simple turtleshell
52
+ ```
53
+
54
+ Upload to PyPI:
55
+ ```
56
+ twine upload dist/*
57
+ ```
@@ -0,0 +1,6 @@
1
+ turtleshell/__init__.py,sha256=ESul5N9bShIY7Z0FuUui9-D-dWtgelBrhqe9P5oYZp4,55
2
+ turtleshell/core.py,sha256=ZwYPwarjk7P0Lo1ELFx_8kh4I3H2ZXs1th85U5Vuuts,4709
3
+ turtleshell-1.1.0.dist-info/METADATA,sha256=Mf38yRHRyL02a1J7oJ9A0d-I3CElSmssLG7DSKQqHZI,1124
4
+ turtleshell-1.1.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
5
+ turtleshell-1.1.0.dist-info/top_level.txt,sha256=nIp6ZtgikYbeYxpXq6zs04zeIaXIMs3ZzAx5QREfkYM,12
6
+ turtleshell-1.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.3.1)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,6 +0,0 @@
1
- turtleshell/__init__.py,sha256=h6t_4SE0atKJUhhgKKa_b-sPBTxZss4hnR-EnqRIixU,55
2
- turtleshell/core.py,sha256=6MXthwzvQmFWqnGJKijjn1olIzG_jS8WyGcMoXH1i1A,4437
3
- turtleshell-1.0.0.dist-info/METADATA,sha256=OOy35r3xo3pqEC-JNtB1z_wEmKaePxOf4fHjWxABPBA,590
4
- turtleshell-1.0.0.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
5
- turtleshell-1.0.0.dist-info/top_level.txt,sha256=nIp6ZtgikYbeYxpXq6zs04zeIaXIMs3ZzAx5QREfkYM,12
6
- turtleshell-1.0.0.dist-info/RECORD,,