-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #144 from Starry-OvO/develop
v3.7.2
- Loading branch information
Showing
16 changed files
with
102 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,6 +17,8 @@ | |
!docs/** | ||
!tests | ||
!tests/** | ||
!scripts | ||
!scripts/** | ||
|
||
*.py[cd] | ||
__pycache__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "3.7.1" | ||
__version__ = "3.7.2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
MAIN_VERSION = "12.45.7.0" | ||
MAIN_VERSION = "12.46.3.0" | ||
POST_VERSION = "12.35.1.0" | ||
|
||
APP_SECURE_SCHEME = "https" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#pragma once | ||
|
||
#include "tbcrypto/_python.h" | ||
#include "tbcrypto/pywrap.h" | ||
|
||
PyObject* sign(PyObject* Py_UNUSED(self), PyObject* args); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import subprocess | ||
from pathlib import Path | ||
|
||
commom_proto_pth = Path("aiotieba/api/_protobuf") | ||
|
||
for fpth in commom_proto_pth.glob('*_pb2.py'): | ||
fpth.unlink() | ||
|
||
subprocess.run("protoc --python_out=. *.proto", cwd=str(commom_proto_pth), check=True, timeout=60.0) | ||
|
||
for fpth in commom_proto_pth.glob('*_pb2.py'): | ||
bak_fpth = fpth.with_suffix('.bak') | ||
with ( | ||
fpth.open('r') as f, | ||
bak_fpth.open('w') as bak_f, | ||
): | ||
for row in f.readlines(): | ||
if row.startswith('#'): | ||
continue | ||
if row.startswith('import'): | ||
row = "from . " + row | ||
bak_f.write(row) | ||
fpth.unlink() | ||
bak_fpth.rename(fpth) | ||
|
||
for mod_pth in Path("aiotieba/api").glob('*/protobuf'): | ||
for fpth in mod_pth.glob('*_pb2.py'): | ||
fpth.unlink() | ||
|
||
subprocess.run("protoc -I../../_protobuf -I. --python_out=. *.proto", cwd=str(mod_pth), check=True, timeout=10.0) | ||
|
||
for fpth in mod_pth.glob('*_pb2.py'): | ||
bak_fpth = fpth.with_suffix('.bak') | ||
with ( | ||
fpth.open('r') as f, | ||
bak_fpth.open('w') as bak_f, | ||
): | ||
for row in f.readlines(): | ||
if row.startswith('#'): | ||
continue | ||
if row.startswith('import'): | ||
row = "from ..._protobuf " + row | ||
bak_f.write(row) | ||
fpth.unlink() | ||
bak_fpth.rename(fpth) | ||
|
||
subprocess.run("ruff . --fix", cwd='.', check=False, timeout=10.0) | ||
subprocess.run("black .", cwd='.', check=False, timeout=30.0) |