Skip to content

Commit e0153d9

Browse files
Sourish-spcDasux
authored andcommitted
grass.script: Add Python type hints to core.py (OSGeo#7130)
1 parent 204f425 commit e0153d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

python/grass/script/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,7 +1839,7 @@ def parse_color(
18391839
# check GRASS_OVERWRITE
18401840

18411841

1842-
def overwrite():
1842+
def overwrite() -> bool:
18431843
"""Return True if existing files may be overwritten"""
18441844
owstr = "GRASS_OVERWRITE"
18451845
return owstr in os.environ and os.environ[owstr] != "0"
@@ -1848,7 +1848,7 @@ def overwrite():
18481848
# check GRASS_VERBOSE
18491849

18501850

1851-
def verbosity():
1851+
def verbosity() -> int:
18521852
"""Return the verbosity level selected by GRASS_VERBOSE
18531853
18541854
Currently, there are 5 levels of verbosity:
@@ -2212,7 +2212,7 @@ def debug_level(force: bool = False, *, env: _Env = None):
22122212
# TODO: Remove the pygrass backwards compatibility version of it?
22132213

22142214

2215-
def legal_name(s):
2215+
def legal_name(s: str) -> bool:
22162216
"""Checks if the string contains only allowed characters.
22172217
22182218
This is the Python implementation of :func:`G_legal_filename()` function.

0 commit comments

Comments
 (0)