HomeSoftware Heritage

common/highlightjs: Turn some global variables into functions

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

common/highlightjs: Turn some global variables into functions

The _hljs_languages* global variables content rely on reading a JSON file
located through Django static finders.

As a side effect, when the module is imported, the JSON file is located
then read.

When the DJANGO_SETTINGS_MODULE environment variable is not set, the
module import will fail as the JSON file could not be located.

So avoid to execute that JSON loading code when importing the module
by turning the global variables into functions.

The purpose is to avoid import errors when running sphinx autodoc.

Details

Provenance
anlambertAuthored on Apr 20 2021, 3:00 PM
anlambertPushed on Apr 21 2021, 11:26 AM
Differential Revision
D5563: common/highlightjs: Turn some global variables into functions
Build Status
Buildable 20897
Build 32427: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.