Skip to content

Commit

Permalink
Typing fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed Oct 3, 2023
1 parent 6d6ce62 commit d8cf168
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions traitlets/config/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,21 +153,21 @@ class Application(SingletonConfigurable):

# The name of the application, will usually match the name of the command
# line application
name = Unicode("application")
name: str | Unicode[str, str | bytes] = Unicode("application")

# The description of the application that is printed at the beginning
# of the help.
description = Unicode("This is an application.")
description: str | Unicode[str, str | bytes] = Unicode("This is an application.")
# default section descriptions
option_description = Unicode(option_description)
keyvalue_description = Unicode(keyvalue_description)
subcommand_description = Unicode(subcommand_description)
option_description: str | Unicode[str, str | bytes] = Unicode(option_description)
keyvalue_description: str | Unicode[str, str | bytes] = Unicode(keyvalue_description)
subcommand_description: str | Unicode[str, str | bytes] = Unicode(subcommand_description)

python_config_loader_class = PyFileConfigLoader
json_config_loader_class = JSONFileConfigLoader

# The usage and example string that goes at the end of the help string.
examples = Unicode()
examples: str | Unicode[str, str | bytes] = Unicode()

# A sequence of Configurable subclasses whose config=True attributes will
# be exposed at the command line.
Expand Down Expand Up @@ -891,7 +891,7 @@ def parse_command_line(self, argv: ArgvType = None) -> None:
def _load_config_files(
cls,
basefilename: str,
path: list[str | None] | str | None = None,
path: list[str | None] | None = None,
log: AnyLogger | None = None,
raise_config_file_errors: bool = False,
) -> t.Generator[t.Any, None, None]:
Expand Down Expand Up @@ -949,7 +949,7 @@ def loaded_config_files(self) -> list[str]:
return self._loaded_config_files[:]

@catch_config_error
def load_config_file(self, filename: str, path: str | None = None) -> None:
def load_config_file(self, filename: str, path: list[str | None] | None = None) -> None:
"""Load config files by filename and path."""
filename, ext = os.path.splitext(filename)
new_config = Config()
Expand Down

0 comments on commit d8cf168

Please sign in to comment.