Skip to content

Commit 02d5045

Browse files
authored
ci: Add workflow dispatch trigger for tag and push to pypi.
## Summary by Sourcery CI: - Add workflow dispatch trigger. --------- Signed-off-by: 5hojib <[email protected]>
1 parent 8612f15 commit 02d5045

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.github/workflows/tag_and_publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- dev
7+
workflow_dispatch:
78

89
jobs:
910
tag_and_publish:

compiler/api/compiler.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def get_type_hint(type: str) -> str:
119119
ns, name = type.split(".") if "." in type else ("", type)
120120
type = '"raw.base.' + ".".join([ns, name]).strip(".") + '"'
121121

122-
return f'{type}{" = None" if is_flag else ""}'
122+
return f"{type}{' = None' if is_flag else ''}"
123123

124124

125125
def sort_args(args: list[tuple[str, str]]):
@@ -365,7 +365,7 @@ def start() -> None: # noqa: C901
365365
arg_docs = arg_docs["params"].get(arg_name, "N/A") if arg_docs else "N/A"
366366

367367
docstring_args.append(
368-
f'{arg_name} ({get_docstring_arg_type(arg_type)}{", *optional*" if is_optional else ""}):\n {arg_docs}\n',
368+
f"{arg_name} ({get_docstring_arg_type(arg_type)}{', *optional*' if is_optional else ''}):\n {arg_docs}\n",
369369
)
370370

371371
if c.section == "types":
@@ -461,10 +461,10 @@ def start() -> None: # noqa: C901
461461

462462
write_types += "\n "
463463
write_types += f"if self.{arg_name} is not None:\n "
464-
write_types += f'b.write(Vector(self.{arg_name}{f", {sub_type.title()}" if sub_type in CORE_TYPES else ""}))\n '
464+
write_types += f"b.write(Vector(self.{arg_name}{f', {sub_type.title()}' if sub_type in CORE_TYPES else ''}))\n "
465465

466466
read_types += "\n "
467-
read_types += f'{arg_name} = TLObject.read(b{f", {sub_type.title()}" if sub_type in CORE_TYPES else ""}) if flags{number} & (1 << {index}) else []\n '
467+
read_types += f"{arg_name} = TLObject.read(b{f', {sub_type.title()}' if sub_type in CORE_TYPES else ''}) if flags{number} & (1 << {index}) else []\n "
468468
else:
469469
write_types += "\n "
470470
write_types += f"if self.{arg_name} is not None:\n "
@@ -486,10 +486,10 @@ def start() -> None: # noqa: C901
486486
elif "vector" in arg_type.lower():
487487
sub_type = arg_type.split("<")[1][:-1]
488488

489-
write_types += f'b.write(Vector(self.{arg_name}{f", {sub_type.title()}" if sub_type in CORE_TYPES else ""}))\n '
489+
write_types += f"b.write(Vector(self.{arg_name}{f', {sub_type.title()}' if sub_type in CORE_TYPES else ''}))\n "
490490

491491
read_types += "\n "
492-
read_types += f'{arg_name} = TLObject.read(b{f", {sub_type.title()}" if sub_type in CORE_TYPES else ""})\n '
492+
read_types += f"{arg_name} = TLObject.read(b{f', {sub_type.title()}' if sub_type in CORE_TYPES else ''})\n "
493493
else:
494494
write_types += f"b.write(self.{arg_name}.write())\n "
495495

compiler/docs/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def build(path, level=0) -> None:
8383

8484
for k, v in sorted(all_entities.items()):
8585
v = sorted(v)
86-
entities = [f'{i} <{snake(i).replace("_", "-")}>' for i in v]
86+
entities = [f"{i} <{snake(i).replace('_', '-')}>" for i in v]
8787

8888
if k != base:
8989
inner_path = base + "/" + k + "/index" + ".rst"

pyrogram/storage/sqlite_storage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ async def update_usernames(self, usernames: list[tuple[int, str]]) -> None:
149149
(user[0],),
150150
)
151151
await self.conn.executemany(
152-
"REPLACE INTO usernames (peer_id, id)" "VALUES (?, ?)",
152+
"REPLACE INTO usernames (peer_id, id)VALUES (?, ?)",
153153
usernames,
154154
)
155155

0 commit comments

Comments
 (0)