Skip to content

Commit

Permalink
Merge pull request #17 from Rin204/fix-workflow
Browse files Browse the repository at this point in the history
upd workflow
  • Loading branch information
Rin204 authored Nov 14, 2023
2 parents 7fe497c + 63117e0 commit 564d74c
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/setup-python@v1

- name: Install dependencies
run: pip3 install black ruff
run: pip3 install black==23.11.0 ruff==0.1.5

- name: run black
run: black --check .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.11.4
python-version: 3.11

- name: Install dependencies
run: pip3 install -U online-judge-verify-helper

- name: Copy dependencies
run: |
rm -rf /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/onlinejudge_verify
cp -r ./.github/oj-verify /opt/hostedtoolcache/Python/3.11.4/x64/lib/python3.11/site-packages/onlinejudge_verify
rm -rf /opt/hostedtoolcache/Python/3.11/x64/lib/python3.11/site-packages/onlinejudge_verify
cp -r ./.github/oj-verify /opt/hostedtoolcache/Python/3.11/x64/lib/python3.11/site-packages/onlinejudge_verify
sleep 5
- name: run verify
- name: create docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
YUKICODER_TOKEN: ${{ secrets.YUKICODER_TOKEN }}
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,6 @@ ruff:

oj: verify docs

verify-src:
oj-verify run src/_tests/*/*.test.py

verify-exp:
oj-verify run expansion/_tests/*/*.test.py

verify:
oj-verify run

Expand Down
4 changes: 2 additions & 2 deletions expansion/$tests/polynomial/inv_of_FormalPowerSeries.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -284,7 +284,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down
4 changes: 2 additions & 2 deletions expansion/$tests/polynomial/log_of_FormalPowerSeries.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -284,7 +284,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down
4 changes: 2 additions & 2 deletions expansion/$tests/polynomial/pow_of_FormalPowerSeries.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -284,7 +284,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down
4 changes: 2 additions & 2 deletions expansion/$tests/polynomial/sqrt_of_FormalPowerSeries.test.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -284,7 +284,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down
4 changes: 2 additions & 2 deletions expansion/polynomial/FormalPowerSeries998.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -277,7 +277,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down
4 changes: 2 additions & 2 deletions src/polynomial/FormalPowerSeries998.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class FormalPowerSeries998(list):
Comb = Combination(200000)

def __init__(self, n):
if type(n) == int:
if isinstance(n, int):
super().__init__([0] * n)
else:
super().__init__(n)
Expand Down Expand Up @@ -68,7 +68,7 @@ def __isub__(self, other):
return self

def __mul__(self, other):
if type(other) == int:
if isinstance(other, int):
return FormalPowerSeries998([x * other % 998244353 for x in self])
return FormalPowerSeries998(NTT998.multiply(list(self), list(other)))

Expand Down

0 comments on commit 564d74c

Please sign in to comment.