Skip to content

Commit

Permalink
added version 5.2.5: retrived and tweaked PL 126 about dealing with s…
Browse files Browse the repository at this point in the history
…htab package
  • Loading branch information
piccolomo committed Sep 24, 2022
1 parent 6c80e18 commit cdba5d5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion plotext/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""\nplotext plots directly on terminal"""

__name__ = "plotext"
__version__ = "5.2.4"
__version__ = "5.2.5"

from ._core import *
from .plotext_cli import build_parser
9 changes: 9 additions & 0 deletions plotext/_shtab.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# added by user @Freed-Wu as a replacement for package shtab if not present and in particular its method add_argument_to

FILE = None
DIRECTORY = DIR = None

def add_argument_to(parser, *args, **kwargs):
from argparse import Action
Action.complete = None
return parser
3 changes: 0 additions & 3 deletions plotext/_utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ def try_float(data): # it turn a string into float if it can
########### List Creation ##############
###############################################

def frange(a, b): # same as standard range, except that a and b can be float
return [a + el for el in range(math.ceil(b - a))]

def linspace(lower, upper, length = 10): # it returns a lists of numbers from lower to upper with given length
slope = (upper - lower) / (length - 1) if length > 1 else 0
return [lower + x * slope for x in range(length)]
Expand Down
5 changes: 4 additions & 1 deletion plotext/plotext_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
from plotext._utility import all_markers, colors
import argparse, sys, os
import plotext as plt
import shtab
try:
import shtab
except ImportError:
from . import _shtab as shtab

# For Possible Colors and Markers Completion
def dict_to_complete(d={}):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
author = "Savino Piccolomo",
author_email = "[email protected]",
name = 'plotext',
version='5.2.4',
version='5.2.5',
description = 'plotext plots directly on terminal',
long_description = README,
long_description_content_type = "text/markdown",
Expand Down

0 comments on commit cdba5d5

Please sign in to comment.