Skip to content

Commit

Permalink
grass.script: Make grass_path keyword only in init (#3689)
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 (and the usage would have to be as positional argument to trigger the incompatibility).
  • Loading branch information
wenzeslaus authored May 9, 2024
1 parent 0383ee5 commit 6805375
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 6805375

Please sign in to comment.