File tree Expand file tree Collapse file tree 5 files changed +16
-12
lines changed
Expand file tree Collapse file tree 5 files changed +16
-12
lines changed Original file line number Diff line number Diff line change 1111 - id : check-yaml
1212
1313 - repo : https://github.com/astral-sh/ruff-pre-commit
14- rev : v0.1.8
14+ rev : v0.1.13
1515 hooks :
1616 - id : ruff-format
1717 - id : ruff
Original file line number Diff line number Diff line change @@ -203,14 +203,17 @@ def start(format: bool = False):
203203 shutil .rmtree (DESTINATION_PATH / "functions" , ignore_errors = True )
204204 shutil .rmtree (DESTINATION_PATH / "base" , ignore_errors = True )
205205
206- with open (HOME_PATH / "source/auth_key.tl" ) as f1 , open (
207- HOME_PATH / "source/sys_msgs.tl"
208- ) as f2 , open (HOME_PATH / "source/main_api.tl" ) as f3 :
206+ with (
207+ open (HOME_PATH / "source/auth_key.tl" ) as f1 ,
208+ open (HOME_PATH / "source/sys_msgs.tl" ) as f2 ,
209+ open (HOME_PATH / "source/main_api.tl" ) as f3 ,
210+ ):
209211 schema = (f1 .read () + f2 .read () + f3 .read ()).splitlines ()
210212
211- with open (HOME_PATH / "template/type.txt" ) as f1 , open (
212- HOME_PATH / "template/combinator.txt"
213- ) as f2 :
213+ with (
214+ open (HOME_PATH / "template/type.txt" ) as f1 ,
215+ open (HOME_PATH / "template/combinator.txt" ) as f2 ,
216+ ):
214217 type_tmpl = f1 .read ()
215218 combinator_tmpl = f2 .read ()
216219
Original file line number Diff line number Diff line change @@ -70,9 +70,10 @@ def start():
7070 with Path (init ).open ("a" , encoding = "utf-8" ) as f_init :
7171 f_init .write (f"from .{ name .lower ()} _{ code } import *\n " )
7272
73- with Path (f"{ HOME } /source/{ i } " ).open (encoding = "utf-8" ) as f_csv , Path (
74- f"{ DEST } /{ name .lower ()} _{ code } .py"
75- ).open ("w" , encoding = "utf-8" ) as f_class :
73+ with (
74+ Path (f"{ HOME } /source/{ i } " ).open (encoding = "utf-8" ) as f_csv ,
75+ Path (f"{ DEST } /{ name .lower ()} _{ code } .py" ).open ("w" , encoding = "utf-8" ) as f_class ,
76+ ):
7677 reader = csv .reader (f_csv , delimiter = "\t " )
7778
7879 super_class = caml (name )
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ async def set_chat_photo(
8484 """
8585 peer = await self .resolve_peer (chat_id )
8686
87- if isinstance (photo , str ) and Path (photo ).is_file () or not isinstance (photo , str ):
87+ if ( isinstance (photo , str ) and Path (photo ).is_file () ) or not isinstance (photo , str ):
8888 photo = raw .types .InputChatUploadedPhoto (
8989 file = await self .save_file (photo ),
9090 video = await self .save_file (video ),
Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ async def send_photo(
153153 file = None
154154
155155 try :
156- if isinstance (photo , str ) and Path (photo ).is_file () or not isinstance (photo , str ):
156+ if ( isinstance (photo , str ) and Path (photo ).is_file () ) or not isinstance (photo , str ):
157157 file = await self .save_file (photo , progress = progress , progress_args = progress_args )
158158 media = raw .types .InputMediaUploadedPhoto (
159159 file = file ,
You can’t perform that action at this time.
0 commit comments