Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/grass/script/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1839,7 +1839,7 @@ def parse_color(
# check GRASS_OVERWRITE


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


def verbosity():
def verbosity() -> int:
"""Return the verbosity level selected by GRASS_VERBOSE

Currently, there are 5 levels of verbosity:
Expand Down Expand Up @@ -2212,7 +2212,7 @@ def debug_level(force: bool = False, *, env: _Env = None):
# TODO: Remove the pygrass backwards compatibility version of it?


def legal_name(s):
def legal_name(s: str) -> bool:
"""Checks if the string contains only allowed characters.

This is the Python implementation of :func:`G_legal_filename()` function.
Expand Down
Loading