Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
thibaudcolas committed Dec 9, 2017
1 parent 9ea82a1 commit 94311dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions benchmark.py
Expand Up @@ -78,8 +78,7 @@ def block_fallback(props):

BENCHMARK_RUNS = int(os.environ.get('BENCHMARK_RUNS', 1))

print('Exporting %s ContentStates %s times' %
(len(content_states), BENCHMARK_RUNS))
print('Exporting %s ContentStates %s times' % (len(content_states), BENCHMARK_RUNS))

pr = cProfile.Profile()
pr.enable()
Expand Down
3 changes: 1 addition & 2 deletions draftjs_exporter/dom.py
Expand Up @@ -81,8 +81,7 @@ def create_element(cls, type_=None, props=None, *children):

# Convert style object to style string, like the DOM would do.
if 'style' in props and isinstance(props['style'], dict):
rules = ['{0}: {1};'.format(DOM.camel_to_dash(
s), props['style'][s]) for s in props['style'].keys()]
rules = ['{0}: {1};'.format(DOM.camel_to_dash(s), props['style'][s]) for s in props['style'].keys()]
props['style'] = ''.join(sorted(rules))

# Convert props to HTML attributes.
Expand Down
3 changes: 1 addition & 2 deletions example.py
Expand Up @@ -108,8 +108,7 @@ def block_fallback(props):
type_ = props['block']['type']

if type_ == 'example-discard':
logging.warn(
'Missing config for "%s". Discarding block, keeping content.' % type_)
logging.warn('Missing config for "%s". Discarding block, keeping content.' % type_)
# Directly return the block's children to keep its content.
return props['children']
elif type_ == 'example-delete':
Expand Down

0 comments on commit 94311dc

Please sign in to comment.