Skip to content

Commit

Permalink
Merge branch 'housecanary-fix-setup-cfg-parser'
Browse files Browse the repository at this point in the history
  • Loading branch information
yeisonvargasf committed Oct 17, 2023
2 parents 7db0452 + c457ef8 commit 5b9cb59
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dparse/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,15 @@ class SetupCfgParser(Parser):
def parse(self):
parser = ConfigParser()
parser.read_string(self.obj.content)
for section in parser.values():
for section in parser.sections():
if section.name == 'options':
options = 'install_requires', 'setup_requires', 'test_require'
for name in options:
content = section.get(name)
if not content:
continue
self._parse_content(content)
elif section.name == 'options.extras_require':
for content in section.values():
if parser.has_option('options', name):
content = section.get('options', name)
self._parse_content(content)
elif section == 'options.extras_require':
for _, content in parser.items('options.extras_require'):
self._parse_content(content)

def _parse_content(self, content):
Expand Down

0 comments on commit 5b9cb59

Please sign in to comment.