OpenSlides / openslides-backend

Backend service for OpenSlides 4+
MIT License
6 stars 26 forks source link

Renaming global directory #2604

Open reicda opened 1 month ago

reicda commented 1 month ago

At the moment we use global as the name for the directory containing the meta repository and data intended for further use in other modules.

'global' is one of the reserved keywords in python and thus must not be used in this case as it will lead to a syntax error. There are work-arounds but they will lead to errors by the linting tools we use (e.g. mypy) that need to be suppressed.

example: >>> import global.example_module

work-around: >>> sys.path.append("global") >>> import example_module

work-around (suppressed linting): >>> sys.path.append("global") >>> import example_module # type: ignore # noqa

To tackle the problem at the root I suggest we rename the directory to something similar (e.g. universal, general, unbounded, planetary, comprehensive) and adjust all references.