ria 0.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.
Potentially problematic release.
This version of ria might be problematic. Click here for more details.
- cli/__init__.py +0 -0
- cli/meow.py +33 -0
- ria/Cat.py +55 -0
- ria/__init__.py +0 -0
- ria-0.1.0.dist-info/LICENSE +674 -0
- ria-0.1.0.dist-info/METADATA +724 -0
- ria-0.1.0.dist-info/RECORD +10 -0
- ria-0.1.0.dist-info/WHEEL +5 -0
- ria-0.1.0.dist-info/entry_points.txt +2 -0
- ria-0.1.0.dist-info/top_level.txt +2 -0
cli/__init__.py
ADDED
|
File without changes
|
cli/meow.py
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
|
|
3
|
+
from ria.Cat import Cat
|
|
4
|
+
|
|
5
|
+
DESCRIPTION = "Meow a cat."
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def script_entry() -> None:
|
|
9
|
+
"""
|
|
10
|
+
The entry point for the ria script.
|
|
11
|
+
|
|
12
|
+
:return: None.
|
|
13
|
+
"""
|
|
14
|
+
parser = argparse.ArgumentParser(description=DESCRIPTION)
|
|
15
|
+
parser.add_argument(
|
|
16
|
+
'-n', '--name', required=True,
|
|
17
|
+
help='The name of the cat.'
|
|
18
|
+
)
|
|
19
|
+
parser.add_argument(
|
|
20
|
+
'-a', '--age', required=False,
|
|
21
|
+
help='The age of the cat in years.'
|
|
22
|
+
)
|
|
23
|
+
parser.add_argument(
|
|
24
|
+
'-c', '--colour', required=False,
|
|
25
|
+
help='The color of the cat\'s fur.'
|
|
26
|
+
)
|
|
27
|
+
parser.add_argument(
|
|
28
|
+
'-t', '--times', type=int, required=False, default=1,
|
|
29
|
+
help='The number of times the cat will meow. Default is 1.'
|
|
30
|
+
)
|
|
31
|
+
args = parser.parse_args()
|
|
32
|
+
|
|
33
|
+
Cat(name=args.name, age=args.age, color=args.colour).meow(times=args.times)
|
ria/Cat.py
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"""
|
|
2
|
+
The `Cat` module provides a simple representation of a verbose cat.
|
|
3
|
+
|
|
4
|
+
Classes:
|
|
5
|
+
- Cat: A class representing a cat.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
|
|
9
|
+
Creating and using a Cat instance::
|
|
10
|
+
|
|
11
|
+
from cats import Cat
|
|
12
|
+
|
|
13
|
+
my_cat = Cat(name="Whiskers", age=3, color="gray")
|
|
14
|
+
my_cat.meow() # Output: "Whiskers says meow"
|
|
15
|
+
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Cat:
|
|
20
|
+
"""
|
|
21
|
+
A class representing a cat.
|
|
22
|
+
|
|
23
|
+
:ivar name: The name of the cat.
|
|
24
|
+
:vartype name: str
|
|
25
|
+
:ivar age: The age of the cat in years.
|
|
26
|
+
:vartype age: int
|
|
27
|
+
:ivar color: The color of the cat's fur.
|
|
28
|
+
:vartype color: str
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
def __init__(self, name: str, age: int, color: str):
|
|
32
|
+
"""
|
|
33
|
+
Initialize a new Cat instance.
|
|
34
|
+
|
|
35
|
+
:param name: The name of the cat.
|
|
36
|
+
:type name: str
|
|
37
|
+
:param age: The age of the cat in years.
|
|
38
|
+
:type age: int
|
|
39
|
+
:param color: The color of the cat's fur.
|
|
40
|
+
:type color: str
|
|
41
|
+
"""
|
|
42
|
+
self.name = name
|
|
43
|
+
self.age = age
|
|
44
|
+
self.color = color
|
|
45
|
+
|
|
46
|
+
def meow(self, times: int = 1) -> None:
|
|
47
|
+
"""
|
|
48
|
+
Print out meows.
|
|
49
|
+
|
|
50
|
+
:param times: The number of times the cat will meow. Default is 1.
|
|
51
|
+
:type times: int
|
|
52
|
+
|
|
53
|
+
:return: None
|
|
54
|
+
"""
|
|
55
|
+
print(f"{self.name} says {'meow ' * times}")
|
ria/__init__.py
ADDED
|
File without changes
|