Skip to content

Commit

Permalink
prune unused python code
Browse files Browse the repository at this point in the history
  • Loading branch information
SichangHe committed Jan 22, 2024
1 parent 2f6f396 commit a2ad4e8
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 291 deletions.
155 changes: 0 additions & 155 deletions parse_test.ipynb

This file was deleted.

2 changes: 2 additions & 0 deletions rpsl_lexer/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def red(string: str) -> str:
return f"\033[91m{string}\033[0m"
13 changes: 12 additions & 1 deletion rpsl_lexer/aut_num.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import sys

from .dump import parse_mp_import
from .lex import mp_import
from .lines import expressions
from .parse import import_export, lex_with
from .piped import stdin_lines, write_obj
from .rpsl_object import AutNum


def parse_mp_import(
expr: str, imports: dict[str, dict[str, list[dict]]], is_mp: bool = False
):
try:
lexed = lex_with(mp_import, expr)
import_export(lexed, imports, is_mp)
except Exception as err:
print(f"{err} parsing `{expr}`.")


def parse_aut_num():
n_import, n_export = 0, 0
imports: dict[str, dict[str, list[dict]]] = {}
Expand Down
133 changes: 0 additions & 133 deletions rpsl_lexer/dump.py

This file was deleted.

2 changes: 1 addition & 1 deletion rpsl_lexer/filter_set.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from .dump import red
from . import red
from .lex import mp_filter
from .lines import expressions
from .parse import clean_mp_filter, lex_with
Expand Down
2 changes: 1 addition & 1 deletion rpsl_lexer/peering_set.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from .dump import red
from . import red
from .lex import mp_peering
from .lines import expressions
from .parse import clean_mp_peering, lex_with
Expand Down

0 comments on commit a2ad4e8

Please sign in to comment.