Skip to content

Commit

Permalink
grass.script: Make grass_path keyword only in init
Browse files Browse the repository at this point in the history
This makes the grass_path parameter a keyword-only argument (PEP 3102). While this technically breaks the 8.0 API for 8.4, the documentation only shows grass_path as a keyword argument, grass_path is required to be a keyword argument when location and mapset are omitted, and given the automation triggered by grass_path=None, any usage of grass_path is likely limited (the usage would have to be as positional argument to trigger the incompatibility).
  • Loading branch information
wenzeslaus committed May 6, 2024
1 parent 763fa05 commit 75c291e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/grass/script/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def setup_runtime_env(gisbase=None, *, env=None):
env["PYTHONPATH"] = path


def init(path, location=None, mapset=None, grass_path=None):
def init(path, location=None, mapset=None, *, grass_path=None):
"""Initialize system variables to run GRASS modules
This function is for running GRASS GIS without starting it with the
Expand Down

0 comments on commit 75c291e

Please sign in to comment.