Skip to content

Commit c7d897f

Browse files
authored
Merge pull request #188 from python-ellar/folder_rename
Renamed examples to samples
2 parents 75f7f96 + d9c4814 commit c7d897f

File tree

108 files changed

+11
-13
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+11
-13
lines changed

.github/workflows/test_full.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,6 @@ jobs:
3838
- name: Install Dependencies
3939
run: flit install --symlink
4040
- name: Ruff Linting Check
41-
run: ruff check ellar tests examples
41+
run: ruff check ellar tests samples
4242
- name: mypy
4343
run: mypy ellar

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ install-full: ## Install dependencies
1919
pre-commit install -f
2020

2121
lint:fmt ## Run code linters
22-
ruff check ellar tests examples
22+
ruff check ellar tests samples
2323
mypy ellar
2424

2525
fmt format:clean ## Run code formatters
26-
ruff format ellar tests examples
27-
ruff check --fix ellar tests examples
26+
ruff format ellar tests samples
27+
ruff check --fix ellar tests samples
2828

2929
test:clean ## Run tests
3030
pytest

ellar/auth/interceptor.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,14 @@ async def intercept(
3939

4040
policies = self.get_route_handler_policy(context)
4141

42-
if not policies:
43-
return await next_interceptor()
42+
if policies:
43+
partial_get_policy_instance = partial(self._get_policy_instance, context)
4444

45-
partial_get_policy_instance = partial(self._get_policy_instance, context)
45+
for policy in map(partial_get_policy_instance, policies):
46+
result = await policy.handle(context)
4647

47-
for policy in map(partial_get_policy_instance, policies):
48-
result = await policy.handle(context)
49-
50-
if not result:
51-
self.raise_exception()
48+
if not result:
49+
self.raise_exception()
5250

5351
return await next_interceptor()
5452

ellar/samples/controllers/home.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ def index(self):
1818
"git_hub": github_url,
1919
"version": ellar.__version__,
2020
"release_url": f"{github_url}/releases/{ellar.__version__}",
21-
"example_project_url": f"{github_url}/tree/main/examples",
21+
"example_project_url": f"{github_url}/tree/main/samples",
2222
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)