import os.path
import json


PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:
    SMARTPHONE_DEV_IDS = json.load(open(f))
with open(os.path.join(PACKAGE_DIR, 'data/tablet_dev_id.json')) as f:
    TABLET_DEV_IDS = json.load(open())

import os.path
import json


PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:
    SMARTPHONE_DEV_IDS = json.load(f)
with open(os.path.join(PACKAGE_DIR, 'data/tablet_dev_id.json')) as f:
    TABLET_DEV_IDS = json.load(f)

Fix uses of file objects
Fix uses of file objects
  import os.path
  import json
  
  
  PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
  with open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:
-     SMARTPHONE_DEV_IDS = json.load(open(f))
+     SMARTPHONE_DEV_IDS = json.load(f)
  with open(os.path.join(PACKAGE_DIR, 'data/tablet_dev_id.json')) as f:
-     TABLET_DEV_IDS = json.load(open())
+     TABLET_DEV_IDS = json.load(f)
  
Fix uses of file objects
## Code Before:
import os.path
import json


PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:
    SMARTPHONE_DEV_IDS = json.load(open(f))
with open(os.path.join(PACKAGE_DIR, 'data/tablet_dev_id.json')) as f:
    TABLET_DEV_IDS = json.load(open())

## Instruction:
Fix uses of file objects
## Code After:
import os.path
import json


PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(PACKAGE_DIR, 'data/smartphone_dev_id.json')) as f:
    SMARTPHONE_DEV_IDS = json.load(f)
with open(os.path.join(PACKAGE_DIR, 'data/tablet_dev_id.json')) as f:
    TABLET_DEV_IDS = json.load(f)
