Skip to content

Commit

Permalink
SectionParser: Remove (useless)
Browse files Browse the repository at this point in the history
This is part of a refactoring to make all parser objects, which are
essentially only one method, a bunch of functions.
  • Loading branch information
sils committed May 30, 2015
1 parent ffb8f8e commit f5776a2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 56 deletions.
5 changes: 1 addition & 4 deletions coalib/parsing/CliParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@
import sys

from coalib.parsing.LineParser import LineParser
from coalib.parsing.SectionParser import SectionParser
from coalib.settings.Setting import Setting
from coalib.settings.Section import Section
from coalib.parsing.DefaultArgParser import default_arg_parser


class CliParser(SectionParser):
class CliParser:
def __init__(self,
arg_parser=default_arg_parser,
key_value_delimiters=['=', ':'],
Expand All @@ -37,8 +36,6 @@ def __init__(self,
if not isinstance(arg_parser, argparse.ArgumentParser):
raise TypeError("arg_parser must be an ArgumentParser")

SectionParser.__init__(self)

self._arg_parser = arg_parser
self._line_parser = LineParser(key_value_delimiters,
comment_seperators,
Expand Down
4 changes: 1 addition & 3 deletions coalib/parsing/ConfParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,16 @@
import os

from coalib.parsing.LineParser import LineParser
from coalib.parsing.SectionParser import SectionParser
from coalib.settings.Setting import Setting
from coalib.settings.Section import Section


class ConfParser(SectionParser):
class ConfParser:
def __init__(self,
key_value_delimiters=['='],
comment_seperators=['#', ';', '//'],
key_delimiters=[',', ' '],
section_name_surroundings={'[': "]"}):
SectionParser.__init__(self)
self.line_parser = LineParser(key_value_delimiters,
comment_seperators,
key_delimiters,
Expand Down
26 changes: 0 additions & 26 deletions coalib/parsing/SectionParser.py

This file was deleted.

23 changes: 0 additions & 23 deletions coalib/tests/parsing/ParserTest.py

This file was deleted.

1 comment on commit f5776a2

@Makman2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack

Please sign in to comment.