Skip to content

Commit 9bb79df

Browse files
authored
Merge branch 'master' into ellar_refactor_fix
2 parents 1eea013 + 2f7cdcc commit 9bb79df

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

ellar_cli/manage_commands/runserver.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
HTTP_PROTOCOLS,
1212
INTERFACES,
1313
LIFESPAN,
14+
LOG_LEVELS,
1415
LOGGING_CONFIG,
1516
LOOP_SETUPS,
1617
SSL_PROTOCOL_VERSION,
@@ -32,6 +33,8 @@
3233
"LOOP_CHOICES", *[key for key in LOOP_SETUPS.keys() if key != "none"]
3334
)
3435
INTERFACE_CHOICES = create_enums_from_list("INTERFACES", *INTERFACES)
36+
_LOG_LEVELS = dict(**LOG_LEVELS, NOT_SET=0)
37+
LOG_LEVELS_CHOICES = create_enums_from_list("LOG_LEVELS", *list(_LOG_LEVELS.keys()))
3538

3639

3740
def runserver(
@@ -112,8 +115,8 @@ def runserver(
112115
env_file: t.Optional[Path] = typer.Option(
113116
None, show_default=True, exists=True, help="Environment configuration file."
114117
),
115-
log_level: t.Optional[LOG_LEVELS] = typer.Option(
116-
None,
118+
log_level: LOG_LEVELS_CHOICES = typer.Option(
119+
LOG_LEVELS_CHOICES.NOT_SET.value,
117120
show_default=True,
118121
help="Log level. [default: None]",
119122
),
@@ -266,7 +269,7 @@ def runserver(
266269
lifespan=lifespan.value,
267270
env_file=env_file,
268271
log_config=LOGGING_CONFIG if log_config is None else log_config,
269-
log_level=_log_level.name,
272+
log_level=_log_level.value if _log_level.value != "NOT_SET" else None,
270273
access_log=access_log,
271274
interface=interface.value,
272275
reload=reload,

ellar_cli/scaffolding/module_template/module_name/tests/__init__.ellar

Whitespace-only changes.

ellar_cli/scaffolding/module_template/setup.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"name": "tests",
2828
"is_directory": "true",
2929
"files": [
30+
{
31+
"name": "__init__.ellar"
32+
},
3033
{
3134
"name": "test_controllers.ellar"
3235
},

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ classifiers = [
4343
dependencies = [
4444
# exclude 0.11.2 and 0.11.3 due to https://github.com/sdispater/tomlkit/issues/225
4545
"tomlkit >=0.11.1,<1.0.0,!=0.11.2,!=0.11.3",
46-
"uvicorn[standard] == 0.20.0",
47-
"ellar == 0.3.6"
46+
"uvicorn[standard] == 0.22.0",
47+
"ellar >= 0.3.8"
4848
]
4949

5050
[project.scripts]

0 commit comments

Comments
 (0)