summaryrefslogtreecommitdiff
path: root/ATRI/plugins/rich/data_source.py
diff options
context:
space:
mode:
authorLint Action <[email protected]>2021-05-04 06:29:07 +0000
committerLint Action <[email protected]>2021-05-04 06:29:07 +0000
commit8804f1e10d507ba293fafc77a7e93d3a84a5814b (patch)
treee107da61f76dfe64dfb96feb5e961bbc4bbd8d52 /ATRI/plugins/rich/data_source.py
parentea7f48011c34fdaec7e91af7eb373c8174e439e6 (diff)
downloadATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.tar.gz
ATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.tar.bz2
ATRI-8804f1e10d507ba293fafc77a7e93d3a84a5814b.zip
:rotating_light: 自动进行代码格式化
Diffstat (limited to 'ATRI/plugins/rich/data_source.py')
-rw-r--r--ATRI/plugins/rich/data_source.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/ATRI/plugins/rich/data_source.py b/ATRI/plugins/rich/data_source.py
index 32ac219..59474ff 100644
--- a/ATRI/plugins/rich/data_source.py
+++ b/ATRI/plugins/rich/data_source.py
@@ -1,4 +1,4 @@
-table = 'fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF'
+table = "fZodR9XQDSUm21yCkr6zBqiveYah8bt4xsWpHnJE7jL5VG3guMTKNPAwcF"
tr = {}
for i in range(58):
tr[table[i]] = i
@@ -10,13 +10,13 @@ add = 8728348608
def dec(x) -> int:
r = 0
for i in range(6):
- r += tr[x[s[i]]] * 58**i
+ r += tr[x[s[i]]] * 58 ** i
return (r - add) ^ xor
def enc(x) -> str:
x = (x ^ xor) + add
- r = list('BV1 4 1 7 ')
+ r = list("BV1 4 1 7 ")
for i in range(6):
- r[s[i]] = table[x // 58**i % 58]
- return ''.join(r)
+ r[s[i]] = table[x // 58 ** i % 58]
+ return "".join(r)