Skip to content

Instantly share code, notes, and snippets.

Last active Mar 22, 2016
What would you like to do?
from __future__ import print_function
import sys
import re
import fileinput
in_graphql = False
for line in fileinput.input(inplace=1):
if '`' in line and not'`.*`', line):
in_graphql = not in_graphql
if in_graphql:
line = re.sub(',$', '', line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment