from django.conf import settings
from json import loads as json_loads
from os import path


def get_schema():
    schema_root = path.join(
        settings.BASE_DIR,
        'stagecraft/apps/datasets/schemas/timestamp.json'
    )
    with open(schema_root) as f:
        json_f = json_loads(f.read())

    return json_f

from django.conf import settings
from json import loads as json_loads
from os import path


def get_schema():
    schema_root = path.join(
        settings.BASE_DIR,
        'stagecraft/apps/datasets/schemas/timestamp.json'
    )
    with open(schema_root) as f:
        schema = json_loads(f.read())

    return schema

Make the schema return object a bit more obvious and descriptive
Make the schema return object a bit more obvious and descriptive

  from django.conf import settings
  from json import loads as json_loads
  from os import path
  
  
  def get_schema():
      schema_root = path.join(
          settings.BASE_DIR,
          'stagecraft/apps/datasets/schemas/timestamp.json'
      )
      with open(schema_root) as f:
-         json_f = json_loads(f.read())
+         schema = json_loads(f.read())
  
-     return json_f
+     return schema
  
Make the schema return object a bit more obvious and descriptive
## Code Before:
from django.conf import settings
from json import loads as json_loads
from os import path


def get_schema():
    schema_root = path.join(
        settings.BASE_DIR,
        'stagecraft/apps/datasets/schemas/timestamp.json'
    )
    with open(schema_root) as f:
        json_f = json_loads(f.read())

    return json_f

## Instruction:
Make the schema return object a bit more obvious and descriptive
## Code After:
from django.conf import settings
from json import loads as json_loads
from os import path


def get_schema():
    schema_root = path.join(
        settings.BASE_DIR,
        'stagecraft/apps/datasets/schemas/timestamp.json'
    )
    with open(schema_root) as f:
        schema = json_loads(f.read())

    return schema
