File tree Expand file tree Collapse file tree 5 files changed +13
-6
lines changed
Expand file tree Collapse file tree 5 files changed +13
-6
lines changed Original file line number Diff line number Diff line change 3535
3636 - name : Run Ruff
3737 run : |
38- ruff check mytonctrl modules mytoninstaller mytoncore # wip adding ruff linting across the whole project
38+ ruff check
3939
4040 - name : Build project
4141 run : |
Original file line number Diff line number Diff line change 66import os
77import sys
88import subprocess
9+ from mytonctrl .mytonctrl import run_migrations
910
1011requirements_path = "/usr/src/mytonctrl/requirements.txt"
1112if os .path .isfile (requirements_path ):
1617sys .path .insert (0 , '/usr/bin/mytonctrl' ) # Add path to mytonctrl module
1718
1819
19- from mytonctrl .mytonctrl import run_migrations
20-
2120if __name__ == '__main__' :
2221 print ('Found new version of mytonctrl! Migrating!' )
2322 run_migrations ()
Original file line number Diff line number Diff line change 1+ exclude = [
2+ " mypylib" ,
3+ " mypyconsole" ,
4+ " tests" ,
5+ ]
6+ [lint ]
7+ ignore = [" E741" ]
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ def validate_digits_or_empty(value):
7575
7676def validate_state_ttl (value , archive_ttl ):
7777 v = validate_digits_or_empty (value )
78- if v is not True : return v
78+ if v is not True :
79+ return v
7980 if archive_ttl and value and int (value ) > int (archive_ttl ):
8081 return "State TTL cannot be greater than blocks TTL"
8182 return True
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ def run_vc(cmd: str):
3333subprocess .run (f'tar -xzf { name } -C { tmp_dir } ' , shell = True )
3434
3535subprocess .run (f'cp -rf { tmp_dir } /db/keyring /var/ton-work/db/' , shell = True )
36- subprocess .run (f 'chown -R validator:validator /var/ton-work/db/keyring' , shell = True )
36+ subprocess .run ('chown -R validator:validator /var/ton-work/db/keyring' , shell = True )
3737
3838with open (f'{ tmp_dir } /db/config.json' , 'r' ) as f :
3939 config = json .load (f )
@@ -46,4 +46,4 @@ def run_vc(cmd: str):
4646 run_vc (f'addadnl { b64tohex (adnl ["id" ])} 0' )
4747 run_vc (f'addvalidatoraddr { b64tohex (v ["id" ])} { b64tohex (adnl ["id" ])} { v ["expire_at" ]} ' )
4848
49- subprocess .run (f 'systemctl restart validator' , shell = True )
49+ subprocess .run ('systemctl restart validator' , shell = True )
You can’t perform that action at this time.
0 commit comments