37
37
base_aliases : dict [str , t .Any ] = {}
38
38
if isinstance (Application .aliases , dict ):
39
39
# traitlets 5
40
- base_aliases .update (Application .aliases ) # type:ignore[arg-type]
40
+ base_aliases .update (Application .aliases )
41
41
_jupyter_aliases = {
42
42
"log-level" : "Application.log_level" ,
43
43
"config" : "JupyterApp.config_file" ,
47
47
base_flags : dict [str , t .Any ] = {}
48
48
if isinstance (Application .flags , dict ):
49
49
# traitlets 5
50
- base_flags .update (Application .flags ) # type:ignore[arg-type]
50
+ base_flags .update (Application .flags )
51
51
_jupyter_flags : dict [str , t .Any ] = {
52
52
"debug" : (
53
53
{"Application" : {"log_level" : logging .DEBUG }},
@@ -72,8 +72,8 @@ class JupyterApp(Application):
72
72
name = "jupyter" # override in subclasses
73
73
description = "A Jupyter Application"
74
74
75
- aliases = base_aliases # type:ignore[assignment]
76
- flags = base_flags # type:ignore[assignment]
75
+ aliases = base_aliases
76
+ flags = base_flags
77
77
78
78
def _log_level_default (self ) -> int :
79
79
return logging .INFO
@@ -156,8 +156,6 @@ def ask() -> str:
156
156
return
157
157
158
158
config_text = self .generate_config_file ()
159
- if isinstance (config_text , bytes ):
160
- config_text = config_text .decode ("utf8" )
161
159
print ("Writing default config to: %s" % config_file )
162
160
ensure_dir_exists (os .path .abspath (os .path .dirname (config_file )), 0o700 )
163
161
with open (config_file , mode = "w" , encoding = "utf-8" ) as f :
0 commit comments