Skip to content

Commit

Permalink
lint: Fix new flake8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Bjwebb committed Aug 3, 2022
1 parent a18d50a commit 20486ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sphinxcontrib/opendataservices.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,14 @@ def run(self):
title = filename
pointed = resolve_pointer(json_obj, self.options['jsonpointer'])
# Remove the items mentioned in exclude
if(self.options.get('exclude')):
if self.options.get('exclude'):
for item in self.options['exclude'].split(","):
try:
del pointed[item.strip()]
except KeyError:
pass

if(self.options.get('include_only')):
if self.options.get('include_only'):
for node in list(pointed):
if not (node in self.options.get('include_only')):
del pointed[node]
Expand Down Expand Up @@ -183,13 +183,13 @@ def get_csv_data(self):
with open(abspath) as fp:
json_obj = json.load(fp, object_pairs_hook=OrderedDict)
pointed = resolve_pointer(json_obj, self.options['jsonpointer'])
if(self.options.get('exclude')):
if self.options.get('exclude'):
for item in self.options['exclude'].split(","):
try:
del pointed[item.strip()]
except KeyError:
pass
if(self.options.get('include_only')):
if self.options.get('include_only'):
for node in list(pointed):
if not (node in self.options.get('include_only')):
del pointed[node]
Expand Down

0 comments on commit 20486ce

Please sign in to comment.