Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.0.1 #3

Merged
merged 4 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/py_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- name: Lint with flake8
run: |
poetry run flake8 *.py
poetry run flake8 jnc test_jnc.py

- name: Test with pytest
run: |
Expand Down
12 changes: 6 additions & 6 deletions jnc.py → jnc/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import re

__version__ = "1.0.0"
__version__ = "1.0.1"


class BaseJapaneseNumeralsException(Exception):
Expand Down Expand Up @@ -103,14 +103,14 @@ def ja_to_arabic(s: str, enable_validation: bool = True, accept_daiji: bool = Tr

Args:
s (str): number in japanese format
validation (bool, optional): Whether to enable validate or not. Defaults to True.
enable_validation (bool, optional): Whether to enable validation or not. Defaults to True.
accept_daiji (bool, optional): Whether to accept daiji or not. Defaults to True.

Raises:
TypeError: [description]
NotSupportedError: [description]
ValidationError: [description]
ParseError: [description]
TypeError: raises if s is not str.
NotSupportedError: raises if s is too long or contains unsupported chars.
ValidationError: raises if s is uncommon expression like ``千万, 二〇千, 一万兆``.
ParseError: raises if s is not parsable. (e.g.)``十十, 〇十, 四万三億``

Returns:
int: arabic number
Expand Down
Empty file added jnc/py.typed
Empty file.
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "japanese-number-converter"
version = "1.0.0"
version = "1.0.1"
description = "convert japanese numbers to arabic numbers"
authors = ["Haruki Kitagawa <[email protected]>"]
license = "MIT"
Expand All @@ -9,7 +9,8 @@ keywords = ["japanese", "number", "parser"]
homepage = "https://github.com/kitagawa-hr/japanese-numbers-converter"
repository = "https://github.com/kitagawa-hr/japanese-numbers-converter"
packages = [
{ include = "jnc.py" }
{ include = "jnc" },
{ include = "jnc/py.typed" }
]

[tool.poetry.dependencies]
Expand Down