zutool 0.3.2__tar.gz → 0.3.3__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.
@@ -1,19 +1,31 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: zutool
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Unofficial zutool (頭痛ール: https://zutool.jp/) API Wrapper
5
+ Project-URL: Documentation, https://egpl.dev/zutool/
6
+ Project-URL: Issues, https://github.com/eggplants/zutool/issues
5
7
  Project-URL: Repository, https://github.com/eggplants/zutool
6
8
  Author-email: eggplants <w10776e8w@yahoo.co.jp>
7
9
  License-Expression: MIT
8
10
  License-File: LICENSE.txt
9
- Keywords: zutool
11
+ Keywords: api-wrapper,cli,headache,japan,japanese,weather,weather-forecast,zutool
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Intended Audience :: End Users/Desktop
10
16
  Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Natural Language :: Japanese
18
+ Classifier: Operating System :: OS Independent
11
19
  Classifier: Programming Language :: Python :: 3 :: Only
12
20
  Classifier: Programming Language :: Python :: 3.10
13
21
  Classifier: Programming Language :: Python :: 3.11
14
22
  Classifier: Programming Language :: Python :: 3.12
15
23
  Classifier: Programming Language :: Python :: 3.13
16
24
  Classifier: Programming Language :: Python :: 3.14
25
+ Classifier: Programming Language :: Python :: 3.15
26
+ Classifier: Topic :: Internet :: WWW/HTTP
27
+ Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
29
  Classifier: Typing :: Typed
18
30
  Requires-Python: <4,>=3.10
19
31
  Requires-Dist: pydantic<3,>=2.10.5
@@ -6,18 +6,37 @@ requires = [ "hatchling", "uv-dynamic-versioning" ]
6
6
  name = "zutool"
7
7
  description = "Unofficial zutool (頭痛ール: https://zutool.jp/) API Wrapper"
8
8
  readme = "README.md"
9
- keywords = [ "zutool" ]
9
+ keywords = [
10
+ "api-wrapper",
11
+ "cli",
12
+ "headache",
13
+ "japan",
14
+ "japanese",
15
+ "weather",
16
+ "weather-forecast",
17
+ "zutool",
18
+ ]
10
19
  license = "MIT"
11
20
  authors = [ { name = "eggplants", email = "w10776e8w@yahoo.co.jp" } ]
12
21
  requires-python = ">=3.10,<4"
13
22
  classifiers = [
23
+ "Development Status :: 3 - Alpha",
24
+ "Environment :: Console",
25
+ "Intended Audience :: Developers",
26
+ "Intended Audience :: End Users/Desktop",
14
27
  "License :: OSI Approved :: MIT License",
28
+ "Natural Language :: Japanese",
29
+ "Operating System :: OS Independent",
15
30
  "Programming Language :: Python :: 3 :: Only",
16
31
  "Programming Language :: Python :: 3.10",
17
32
  "Programming Language :: Python :: 3.11",
18
33
  "Programming Language :: Python :: 3.12",
19
34
  "Programming Language :: Python :: 3.13",
20
35
  "Programming Language :: Python :: 3.14",
36
+ "Programming Language :: Python :: 3.15",
37
+ "Topic :: Internet :: WWW/HTTP",
38
+ "Topic :: Scientific/Engineering :: Atmospheric Science",
39
+ "Topic :: Software Development :: Libraries :: Python Modules",
21
40
  "Typing :: Typed",
22
41
  ]
23
42
  dynamic = [ "version" ]
@@ -26,13 +45,15 @@ dependencies = [
26
45
  "requests>=2.32.3,<3",
27
46
  "rich>=13.9.4,<16",
28
47
  ]
48
+ urls.Documentation = "https://egpl.dev/zutool/"
49
+ urls.Issues = "https://github.com/eggplants/zutool/issues"
29
50
  urls.Repository = "https://github.com/eggplants/zutool"
30
- scripts.zutool = "zutool.main:main"
51
+ scripts.zutool = "zutool.cli:main"
31
52
 
32
53
  [dependency-groups]
33
54
  dev = [
34
55
  "pymarkdownlnt>=0.9.33",
35
- "pyproject-fmt>=2.11.1",
56
+ "pyproject-fmt-py>=0",
36
57
  "pytest>=9.0.2",
37
58
  "pytest-asyncio>=1.3",
38
59
  "pytest-cov>=7",
@@ -53,6 +74,8 @@ default-groups = [
53
74
  "docs",
54
75
  ]
55
76
  exclude-newer = "P7D"
77
+ # Own package: no cooldown needed.
78
+ exclude-newer-package = { pyproject-fmt-py = "P0D" }
56
79
  preview = true
57
80
 
58
81
  [tool.ruff]
@@ -64,14 +87,15 @@ lint.select = [
64
87
  ]
65
88
  lint.ignore = [
66
89
  "COM812",
90
+ "CPY001", # Missing copyright notice (this project does not use file headers)
67
91
  "D",
68
92
  ]
69
- lint.per-file-ignores."main.py" = [
70
- "T201", # `print` found
71
- ]
72
93
  lint.per-file-ignores."tests/test_*.py" = [
73
94
  "S101", # Use of assert detected
74
95
  ]
96
+ lint.per-file-ignores."zutool/cli.py" = [
97
+ "T201", # `print` found
98
+ ]
75
99
  lint.per-file-ignores."zutool/models/*.py" = [
76
100
  "N805", # First argument of a method should be named `self`
77
101
  "PLC2401", # Variable name contains a non-ASCII character
@@ -0,0 +1,8 @@
1
+ """Support `python -m zutool`."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from .cli import main
6
+
7
+ if __name__ == "__main__":
8
+ main()
@@ -54,12 +54,12 @@ def func_pain_status(ns: argparse.Namespace) -> None:
54
54
  sickness_emojies = ("😃", "😐", "😞", "🤯")
55
55
 
56
56
  data: list[str] = []
57
- for emoji, sickness_key in zip(sickness_emojies, sickness_dic):
57
+ for emoji, sickness_key in zip(sickness_emojies, sickness_dic, strict=True):
58
58
  sickness_val = getattr(res, sickness_key)
59
59
  data.append(f"{emoji * int(sickness_val / 2)} {sickness_val}%")
60
60
  table.add_column("\n".join(data))
61
61
 
62
- emoji_label_dic = zip(sickness_emojies, sickness_dic.values())
62
+ emoji_label_dic = zip(sickness_emojies, sickness_dic.values(), strict=True)
63
63
  table.add_row(
64
64
  "[" + ", ".join([f"{emoji}・・・{key}" for emoji, key in emoji_label_dic]) + "]",
65
65
  )
@@ -207,7 +207,7 @@ def parse(test_args: list[str] | None = None) -> argparse.Namespace:
207
207
  weather_point_parser = subparsers.add_parser(
208
208
  "weather_point",
209
209
  aliases=["wp"],
210
- formatter_class=lambda prog: __get_formatter_class(prog),
210
+ formatter_class=__get_formatter_class,
211
211
  help="search weather point",
212
212
  )
213
213
  weather_point_parser.add_argument(
@@ -226,7 +226,7 @@ def parse(test_args: list[str] | None = None) -> argparse.Namespace:
226
226
  weather_status_parser = subparsers.add_parser(
227
227
  "weather_status",
228
228
  aliases=["ws"],
229
- formatter_class=lambda prog: __get_formatter_class(prog),
229
+ formatter_class=__get_formatter_class,
230
230
  help="get pain status by city",
231
231
  )
232
232
  weather_status_parser.add_argument(
@@ -249,7 +249,7 @@ def parse(test_args: list[str] | None = None) -> argparse.Namespace:
249
249
  otenki_asp_parser = subparsers.add_parser(
250
250
  "otenki_asp",
251
251
  aliases=["oa"],
252
- formatter_class=lambda prog: __get_formatter_class(prog),
252
+ formatter_class=__get_formatter_class,
253
253
  help="get weather infomations",
254
254
  )
255
255
  otenki_asp_parser.add_argument(
@@ -21,7 +21,7 @@ class _RawHead(BaseModel):
21
21
  return datetime.strptime(v, "%Y-%m-%d %H").replace(tzinfo=_JTC)
22
22
 
23
23
 
24
- _Property = tuple[datetime, Union[WeatherEnum, float, None]]
24
+ _Property = tuple[datetime, WeatherEnum | float | None]
25
25
 
26
26
 
27
27
  class _RawProperty(BaseModel):
@@ -68,7 +68,7 @@ class GetOtenkiASPResponse(BaseModel):
68
68
  def __init__(self, raw_res: _GetOtenkiASPRawResponse) -> None:
69
69
  elements: list[_Element] = []
70
70
  for i, (content_id, title) in enumerate(
71
- zip(raw_res.head.contents_id.split("--"), raw_res.head.title.split("--")),
71
+ zip(raw_res.head.contents_id.split("--"), raw_res.head.title.split("--"), strict=False),
72
72
  ):
73
73
  records = {record.property[0]: record.property[1] for record in raw_res.body.location.element[i].record}
74
74
  elements.append(
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes