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

Run tests on python 3.11 and 3.12 prelease #115

Merged
merged 7 commits into from
Jul 1, 2023
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 .flake8
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[flake8]
ignore=W605
ignore=W605,E275
exclude=.git,__pycache__,docs,sysdic,work,mecab-ipadic-2.7.0-20070801,benchmark
max-line-length=120
26 changes: 11 additions & 15 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@ name: Checks

on:
push:
paths:
- 'janome/**'
- 'tests/**'
- 'ipadic/**'
- '.github/workflows/**'
branches:
- 'master'
pull_request:
paths:
- 'janome/**'
- 'tests/**'
- 'ipadic/**'
- '.github/workflows/**'


jobs:
test:
Expand All @@ -21,7 +14,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev']

steps:
- uses: actions/checkout@v2
Expand All @@ -31,19 +24,22 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Test
run: |
pip install psutil
pip install --upgrade pip
pip install --upgrade setuptools
pip install -r requirements-dev.txt
python setup.py test

check:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/setup-python@v2
- name: Unit tests for coverage
run: |
pip install coverage
pip install psutil
pip install --upgrade pip
pip install --upgrade setuptools
pip install -r requirements-dev.txt
python setup.py develop
coverage run -m unittest discover tests
- name: Coveralls
Expand Down
2 changes: 1 addition & 1 deletion janome/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Token(object):
A Token object contains all information for a token.
"""

def __init__(self, node: Node, extra: Tuple = None):
def __init__(self, node: Node, extra: Optional[Tuple] = None):
self.node = node
self.extra = extra

Expand Down
22 changes: 9 additions & 13 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
autopep8==1.5.4
flake8==3.8.3
mccabe==0.6.1
mypy==0.782
mypy-extensions==0.4.3
pycodestyle==2.6.0
pyflakes==2.2.0
toml==0.10.1
typed-ast==1.4.1
typing-extensions==3.7.4.2
twine==3.2.0
wheel==0.35.1
psutil==5.9.0
autopep8
flake8
mypy
pyflakes
toml
twine
wheel
psutil
coverage