Skip to content

Commit bbcb1c9

Browse files
committed
fix codestyle
1 parent ee9599d commit bbcb1c9

File tree

8 files changed

+122
-35
lines changed

8 files changed

+122
-35
lines changed

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
commit ee9599d0e084a1339435277de4ae4003d6840198
2+
Merge: 50841cf fa3067c
3+
Author: Alexeev Bronislav <[email protected]>
4+
Date: Fri Jul 4 07:28:44 2025 +0700
5+
6+
Merge branch 'main' of github.com:alexeev-prog/pyEchoNext
7+
8+
commit 50841cffe80235aa8a5bc86381b1c842aa259ca2
9+
Author: Alexeev Bronislav <[email protected]>
10+
Date: Fri Jul 4 07:21:15 2025 +0700
11+
12+
fix workflow
13+
14+
commit fa3067c61623e48ca43a5b6dcf8a2054cef53ce4
15+
Merge: 239bc8b 5e1fb65
16+
Author: Alexeev Bronislav <[email protected]>
17+
Date: Fri Jul 4 07:19:24 2025 +0700
18+
19+
Merge pull request #4 from alexeev-prog/dependabot/github_actions/actions/setup-python-5
20+
21+
build(deps): bump actions/setup-python from 2 to 5
22+
23+
commit 239bc8b5d85037035fb2a9a339cda18c3b1779cd
24+
Merge: b31548c 985c092
25+
Author: Alexeev Bronislav <[email protected]>
26+
Date: Fri Jul 4 07:19:06 2025 +0700
27+
28+
Merge pull request #5 from alexeev-prog/dependabot/github_actions/actions/checkout-4
29+
30+
build(deps): bump actions/checkout from 2 to 4
31+
132
commit b31548c24cdeceade5c6a5d786e0dc2ef3f13bb5
233
Author: Alexeev Bronislav <[email protected]>
334
Date: Fri Jul 4 07:18:45 2025 +0700
@@ -35,6 +66,47 @@ Date: Fri Jul 4 07:07:20 2025 +0700
3566

3667
Create python-package.yml
3768

69+
commit 5e1fb65315bd714ae919f5849ee3f667ebb2d3b3
70+
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
71+
Date: Fri Jul 4 00:04:13 2025 +0000
72+
73+
build(deps): bump actions/setup-python from 2 to 5
74+
75+
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 5.
76+
- [Release notes](https://github.com/actions/setup-python/releases)
77+
- [Commits](https://github.com/actions/setup-python/compare/v2...v5)
78+
79+
---
80+
updated-dependencies:
81+
- dependency-name: actions/setup-python
82+
dependency-version: '5'
83+
dependency-type: direct:production
84+
update-type: version-update:semver-major
85+
...
86+
87+
Signed-off-by: dependabot[bot] <[email protected]>
88+
89+
commit 985c09262e63e478a6a72b7cc09c571a32308cb3
90+
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
91+
Date: Fri Jul 4 00:03:40 2025 +0000
92+
93+
build(deps): bump actions/checkout from 2 to 4
94+
95+
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 4.
96+
- [Release notes](https://github.com/actions/checkout/releases)
97+
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
98+
- [Commits](https://github.com/actions/checkout/compare/v2...v4)
99+
100+
---
101+
updated-dependencies:
102+
- dependency-name: actions/checkout
103+
dependency-version: '4'
104+
dependency-type: direct:production
105+
update-type: version-update:semver-major
106+
...
107+
108+
Signed-off-by: dependabot[bot] <[email protected]>
109+
38110
commit 6dbeb8a8e2ddef13157443b85ebb3fe337641415
39111
Author: Alexeev Bronislav <[email protected]>
40112
Date: Fri Jul 4 07:03:26 2025 +0700

examples/random_examples/hashing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from pyechonext.security.hashing import (HashAlgorithm, PlainHasher,
2-
SaltedHasher)
1+
from pyechonext.security.hashing import HashAlgorithm, PlainHasher, SaltedHasher
32

43
hasher = PlainHasher(HashAlgorithm.BLAKE2S)
54
old_hash = hasher.hash("TEXT")

pyechonext/apidoc_ui/ui.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,17 +351,19 @@ def generate_html_page(self) -> str:
351351
"{{info_title}}": self.specification["info"]["title"],
352352
"{{info_version}}": self.specification["info"]["version"],
353353
"{{info_description}}": self.specification["info"]["description"],
354-
"{{sections}}": "\n".join([
355-
self.generate_section(
356-
path,
357-
value["get"]["summary"],
358-
value["post"]["summary"],
359-
value["get"]["responses"],
360-
value["post"]["responses"],
361-
value,
362-
)
363-
for path, value in self.specification["paths"].items()
364-
]),
354+
"{{sections}}": "\n".join(
355+
[
356+
self.generate_section(
357+
path,
358+
value["get"]["summary"],
359+
value["post"]["summary"],
360+
value["get"]["responses"],
361+
value["post"]["responses"],
362+
value,
363+
)
364+
for path, value in self.specification["paths"].items()
365+
]
366+
),
365367
}
366368

367369
for key, value in content.items():

pyechonext/app.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,19 @@
1212
from pyechonext.logging import logger
1313
from pyechonext.middleware import BaseMiddleware
1414
from pyechonext.mvc.controllers import PageController
15-
from pyechonext.mvc.routes import (Route, Router, RoutesTypes,
16-
generate_page_route)
15+
from pyechonext.mvc.routes import Route, Router, RoutesTypes, generate_page_route
1716
from pyechonext.request import Request
1817
from pyechonext.response import Response
1918
from pyechonext.static import StaticFile, StaticFilesManager
2019
from pyechonext.urls import URL
2120
from pyechonext.utils import prepare_url
22-
from pyechonext.utils.exceptions import (MethodNotAllow, RoutePathExistsError,
23-
TeapotError, URLNotFound, WebError)
21+
from pyechonext.utils.exceptions import (
22+
MethodNotAllow,
23+
RoutePathExistsError,
24+
TeapotError,
25+
URLNotFound,
26+
WebError,
27+
)
2428
from pyechonext.utils.stack import LIFOStack
2529

2630

@@ -361,17 +365,14 @@ def get_and_save_cache_item(self, key: str, value: Any) -> Any:
361365
"""
362366
key = str(key)
363367
item = self.main_cache.get(key)
364-
cache_key = key[:16].strip().replace('\n', '')
368+
cache_key = key[:16].strip().replace("\n", "")
365369

366370
if item is None:
367-
logger.info(
368-
f"Save item to cache: '{cache_key}...'"
369-
)
371+
logger.info(f"Save item to cache: '{cache_key}...'")
370372
self.main_cache.set(key, value)
371373
item = self.main_cache.get(key)
372374

373-
logger.info(
374-
f"Get item from cache: '{cache_key}...'")
375+
logger.info(f"Get item from cache: '{cache_key}...'")
375376

376377
return item
377378

pyechonext/docsgen/projgen.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
from typing import Any, Callable
22

33
from pyechonext.app import EchoNext
4-
from pyechonext.docsgen.document import (DocumentFolder, DocumentSection,
5-
InitiationSection, ProjectManager,
6-
ProjectTemplate, RoutesSubsection)
4+
from pyechonext.docsgen.document import (
5+
DocumentFolder,
6+
DocumentSection,
7+
InitiationSection,
8+
ProjectManager,
9+
ProjectTemplate,
10+
RoutesSubsection,
11+
)
712

813

914
class ProjDocumentation:

pyechonext/middleware.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,11 @@ def to_response(self, response: Response):
9393
f"Set session_id={session_id} for response"
9494
f" {response.status_code} {response.request.path}"
9595
)
96-
response.add_headers([
97-
("Set-Cookie", f"session_id={session_id}"),
98-
])
96+
response.add_headers(
97+
[
98+
("Set-Cookie", f"session_id={session_id}"),
99+
]
100+
)
99101

100102
def process_template(self, *args, **kwargs):
101103
"""Process template with middleware

tests/test_hashing.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# tests/test_hashing.py
22
import pytest
33

4-
from pyechonext.security.hashing import (HashAlgorithm, PlainHasher,
5-
SaltedHasher)
4+
from pyechonext.security.hashing import HashAlgorithm, PlainHasher, SaltedHasher
65

76

87
class TestHashing:

tests/test_permissions.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1-
from pyechonext.permissions import (AccessControlRule, AgeRestrictionsABP,
2-
DefaultPermissionChecker, Permission,
3-
Policy, Resource, Role, User,
4-
UserController)
1+
from pyechonext.permissions import (
2+
AccessControlRule,
3+
AgeRestrictionsABP,
4+
DefaultPermissionChecker,
5+
Permission,
6+
Policy,
7+
Resource,
8+
Role,
9+
User,
10+
UserController,
11+
)
512

613
view_users_perm = Permission("view_users")
714
edit_users_perm = Permission("edit_users")

0 commit comments

Comments
 (0)