diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-03 00:15:43 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-04-03 21:02:47 +0200 |
commit | 3ea68d648581a20797b9e1b4438299a057a1820d (patch) | |
tree | a8dc0e66963a9c46a13e3af3b24c5335ca0d5393 /python/vyos/range_regex.py | |
parent | 86f793fcb2c6be880819a572cc7982861ca38314 (diff) | |
download | vyos-1x-3ea68d648581a20797b9e1b4438299a057a1820d.tar.gz vyos-1x-3ea68d648581a20797b9e1b4438299a057a1820d.zip |
T6199: drop unused Python imports
found using "git ls-files *.py | xargs pylint | grep W0611"
(cherry picked from commit 274b2da242acd1f1f64ff1dee471e34295137c5f)
Diffstat (limited to 'python/vyos/range_regex.py')
-rw-r--r-- | python/vyos/range_regex.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/python/vyos/range_regex.py b/python/vyos/range_regex.py index a8190d140..81e9d2e7e 100644 --- a/python/vyos/range_regex.py +++ b/python/vyos/range_regex.py @@ -22,7 +22,6 @@ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ''' -import math # coding=utf8 @@ -67,7 +66,7 @@ def regex_for_range(min_, max_): min_ = 0 if max_ >= 0: - positive_subpatterns = split_to_patterns(min_, max_) + positive_subpatterns = split_to_patterns(min_, max_) negative_only_subpatterns = ['-' + val for val in negative_subpatterns if val not in positive_subpatterns] positive_only_subpatterns = [val for val in positive_subpatterns if val not in negative_subpatterns] @@ -139,4 +138,4 @@ def range_to_pattern(start, stop): if any_digit_count > 1: pattern += '{{{}}}'.format(any_digit_count) - return pattern
\ No newline at end of file + return pattern |