Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion mycli/main.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from collections import defaultdict
from io import open
import os
import sys
import shutil
Expand Down
1 change: 0 additions & 1 deletion mycli/packages/special/iocommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import logging
import subprocess
import shlex
from io import open
from time import sleep

import click
Expand Down
8 changes: 4 additions & 4 deletions mycli/sqlcompleter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import logging
from re import compile, escape
import re
from collections import Counter

from prompt_toolkit.completion import Completer, Completion
Expand Down Expand Up @@ -900,7 +900,7 @@ def __init__(self, smart_completion=True, supported_formats=(), keyword_casing="
self.reserved_words = set()
for x in self.keywords:
self.reserved_words.update(x.split())
self.name_pattern = compile(r"^[_a-z][_a-z0-9\$]*$")
self.name_pattern = re.compile(r"^[_a-z][_a-z0-9\$]*$")

self.special_commands = []
self.table_formats = supported_formats
Expand Down Expand Up @@ -1075,8 +1075,8 @@ def find_matches(text, collection, start_only=False, fuzzy=True, casing=None):
completions = []

if fuzzy:
regex = ".*?".join(map(escape, text))
pat = compile("(%s)" % regex)
regex = ".*?".join(map(re.escape, text))
pat = re.compile("(%s)" % regex)
for item in collection:
r = pat.search(item.lower())
if r:
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ ignore = [
'E117', # over-indented
'W191', # tab-indentation
# TODO
'A004', # todo enableme import shadowing builtin
'PIE796', # todo enableme Enum contains duplicate value
]

Expand Down