Skip to content

Commit bea693f

Browse files
committed
Run pre-commit on all files
1 parent 2f3ce08 commit bea693f

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

DOCUMENTATION.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,12 +632,12 @@ included in the YAML file, or the corresponding absolute path:
632632
'/.../app/data/info.db'
633633

634634
Likewise directories can be parsed using the :class:`.Path_dw` type, which would
635-
require a directory to exist and be writeable. New path types can be created
635+
require a directory to exist and be writable. New path types can be created
636636
using the :func:`.path_type` function. For example to create a type for files
637-
that must exist and be both readable and writeable, the command would be
637+
that must exist and be both readable and writable, the command would be
638638
``Path_frw = path_type('frw')``. If the file ``app/config.yaml`` is not
639-
writeable, then using the type to cast ``Path_frw('app/config.yaml')`` would
640-
raise a *TypeError: File is not writeable* exception. For more information of
639+
writable, then using the type to cast ``Path_frw('app/config.yaml')`` would
640+
raise a *TypeError: File is not writable* exception. For more information of
641641
all the mode flags supported, refer to the documentation of the :class:`.Path`
642642
class.
643643

jsonargparse/_actions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def apply_config(parser, cfg, dest, value) -> None:
122122
raise ex_path
123123
cfg_path = None
124124
cfg_file = parser.parse_string(value, **kwargs)
125-
except (TypeError, ValueError) + get_loader_exceptions() as ex_str: # type: ignore[misc]
125+
except (TypeError, ValueError) + get_loader_exceptions() as ex_str:
126126
raise TypeError(f'Parser key "{dest}": {ex_str}') from ex_str
127127
else:
128128
cfg_file = parser.parse_path(value, **kwargs)

jsonargparse/_core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@ def instantiate_classes(
12591259
cfg: Namespace,
12601260
instantiate_groups: bool = True,
12611261
) -> Namespace:
1262-
"""Recursively instantiates all subclasses defined by ``class_path``+``init_args`` and class groups.
1262+
"""Recursively instantiates all subclasses defined by ``class_path`` + ``init_args`` and class groups.
12631263
12641264
Args:
12651265
cfg: The configuration object to use.

jsonargparse/_paths.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,12 @@ class Path(PathDeprecations):
9494
9595
When a Path instance is created, it is checked that: the path exists,
9696
whether it is a file or directory and whether it has the required access
97-
permissions (f=file, d=directory, r=readable, w=writeable, x=executable,
97+
permissions (f=file, d=directory, r=readable, w=writable, x=executable,
9898
c=creatable, u=url, s=fsspec or in uppercase meaning not, i.e., F=not-file,
99-
D=not-directory, R=not-readable, W=not-writeable and X=not-executable).
99+
D=not-directory, R=not-readable, W=not-writable and X=not-executable).
100100
101101
The creatable flag "c" can be given one or two times. If given once, the
102-
parent directory must exist and be writeable. If given twice, the parent
102+
parent directory must exist and be writable. If given twice, the parent
103103
directory does not have to exist, but should be allowed to create.
104104
105105
An instance of Path class can also refer to the standard input or output.
@@ -204,7 +204,7 @@ def __init__(
204204
if not os.path.isdir(pdir):
205205
raise PathError(f"{ptype} is not creatable since parent directory does not exist: {abs_path!r}")
206206
if not os.access(pdir, os.W_OK):
207-
raise PathError(f"{ptype} is not creatable since parent directory not writeable: {abs_path!r}")
207+
raise PathError(f"{ptype} is not creatable since parent directory not writable: {abs_path!r}")
208208
if "d" in mode and os.access(abs_path, os.F_OK) and not os.path.isdir(abs_path):
209209
raise PathError(f"{ptype} is not creatable since path already exists: {abs_path!r}")
210210
if "f" in mode and os.access(abs_path, os.F_OK) and not os.path.isfile(abs_path):
@@ -220,7 +220,7 @@ def __init__(
220220
if "r" in mode and not os.access(abs_path, os.R_OK):
221221
raise PathError(f"{ptype} is not readable: {abs_path!r}")
222222
if "w" in mode and not os.access(abs_path, os.W_OK):
223-
raise PathError(f"{ptype} is not writeable: {abs_path!r}")
223+
raise PathError(f"{ptype} is not writable: {abs_path!r}")
224224
if "x" in mode and not os.access(abs_path, os.X_OK):
225225
raise PathError(f"{ptype} is not executable: {abs_path!r}")
226226
if "D" in mode and os.path.isdir(abs_path):
@@ -230,7 +230,7 @@ def __init__(
230230
if "R" in mode and os.access(abs_path, os.R_OK):
231231
raise PathError(f"{ptype} is readable: {abs_path!r}")
232232
if "W" in mode and os.access(abs_path, os.W_OK):
233-
raise PathError(f"{ptype} is writeable: {abs_path!r}")
233+
raise PathError(f"{ptype} is writable: {abs_path!r}")
234234
if "X" in mode and os.access(abs_path, os.X_OK):
235235
raise PathError(f"{ptype} is executable: {abs_path!r}")
236236

jsonargparse/typing.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,9 +562,9 @@ def add_type(type_class: type, uniqueness_key: Optional[tuple], type_check: Opti
562562

563563
Path_fr = path_type("fr", docstring="path to a file that exists and is readable")
564564
Path_fc = path_type("fc", docstring="path to a file that can be created if it does not exist")
565-
Path_dw = path_type("dw", docstring="path to a directory that exists and is writeable")
565+
Path_dw = path_type("dw", docstring="path to a directory that exists and is writable")
566566
Path_dc = path_type("dc", docstring="path to a directory that can be created if it does not exist")
567-
Path_drw = path_type("drw", docstring="path to a directory that exists and is readable and writeable")
567+
Path_drw = path_type("drw", docstring="path to a directory that exists and is readable and writable")
568568

569569
register_type(os.PathLike, str, str)
570570
register_type(complex)

0 commit comments

Comments
 (0)