Skip to content

Commit b7f735d

Browse files
authored
chore: update ubuntu and py (#46)
* chore: update ubuntu and py * docs: add newer py * fix: drop pkg_resources/bump patch
1 parent 299a3ce commit b7f735d

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

.circleci/config.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,21 @@ version: 2.1
33
jobs:
44
test:
55
machine:
6-
image: ubuntu-2004:2022.10.1
6+
image: ubuntu-2204:current
77
resource_class: large
88
steps:
99
- checkout
10+
- run:
11+
name: Display Python version
12+
command: python3 -V
1013
- run:
1114
name: Install deps
1215
command: |
1316
pip3 install poetry
1417
poetry install
18+
- run:
19+
name: Display Ditto version
20+
command: poetry run ditto --version
1521
- run:
1622
name: Lint code
1723
command: poetry run black pokeapi_ditto

pokeapi_ditto/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import argparse
22
import sys
3-
4-
import pkg_resources
3+
import importlib.metadata
54

65
from pokeapi_ditto.commands import analyze, clone, transform
76

@@ -12,7 +11,7 @@ def __init__(self):
1211
parser.add_argument(
1312
"--version",
1413
action="version",
15-
version=pkg_resources.get_distribution("pokeapi-ditto").version,
14+
version=importlib.metadata.version('pokeapi-ditto'),
1615
)
1716
subparsers = parser.add_subparsers(dest="command")
1817

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "pokeapi-ditto"
3-
version = "1.0.1"
3+
version = "1.0.2"
44
description = "Ditto is a command line tool for performing meta operations over PokéAPI data."
55
license = "Apache-2.0"
66
authors = ["Sargun Vohra <[email protected]>"]
@@ -17,6 +17,8 @@ classifiers = [
1717
"Programming Language :: Python :: 3",
1818
"Programming Language :: Python :: 3.6",
1919
"Programming Language :: Python :: 3.10",
20+
"Programming Language :: Python :: 3.11",
21+
"Programming Language :: Python :: 3.12",
2022
]
2123

2224
[tool.poetry.scripts]

0 commit comments

Comments
 (0)