Skip to content

Commit

Permalink
remove prettyprinter dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Ichunjo committed Jul 14, 2021
1 parent 7d2c75f commit 6812f3b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
18 changes: 2 additions & 16 deletions pyparsebluray/mpls/movie_playlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from abc import ABC, abstractmethod
from io import BufferedReader
from pprint import pformat
from struct import unpack
from typing import Any, Dict, Tuple

Expand All @@ -18,22 +19,7 @@ def __init__(self, mpls: BufferedReader) -> None:
super().__init__()

def __repr__(self) -> str:
try:
from prettyprinter import pretty_call, pretty_repr, register_pretty
from prettyprinter.doc import Doc
from prettyprinter.prettyprinter import PrettyContext

@register_pretty(MplsObject)
def _repr(value: object, ctx: PrettyContext) -> Doc:
dic = vars(value)
del dic['mpls']
return pretty_call(ctx, MplsObject, dic)

return pretty_repr(self)
except ImportError:
from pprint import pformat

return pformat(vars(self), sort_dicts=False)
return pformat(vars(self), sort_dicts=False)

@abstractmethod
def load(self):
Expand Down
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
with open('README.md') as fh:
long_description = fh.read()

with open("requirements.txt") as fh:
install_requires = fh.read()

NAME = 'pyparsebluray'
VERSION = '0.1.2'
Expand All @@ -31,5 +29,4 @@
'Operating System :: OS Independent',
],
python_requires='>=3.9',
install_requires=install_requires,
)

0 comments on commit 6812f3b

Please sign in to comment.