The following issues were found
coq/shared/parse.py
5 issues
Line: 1
Column: 1
from typing import AbstractSet, Iterable, Iterator, MutableSequence
from unicodedata import east_asian_width
_UNICODE_WIDTH_LOOKUP = {
"W": 2, # CJK
"N": 2, # Non printable
}
_SPECIAL = {"\n", "\r", "\0"}
Reported by Pylint.
Line: 12
Column: 1
_SPECIAL = {"\n", "\r", "\0"}
def display_width(text: str, tabsize: int) -> int:
def cont() -> Iterator[int]:
for char in text:
if char == "\t":
yield tabsize
Reported by Pylint.
Line: 27
Column: 1
return sum(cont())
def lower(text: str) -> str:
return text.casefold()
def is_word(char: str, unifying_chars: AbstractSet[str]) -> bool:
return char in unifying_chars or char.isalnum()
Reported by Pylint.
Line: 31
Column: 1
return text.casefold()
def is_word(char: str, unifying_chars: AbstractSet[str]) -> bool:
return char in unifying_chars or char.isalnum()
def coalesce(chars: Iterable[str], unifying_chars: AbstractSet[str]) -> Iterator[str]:
words: MutableSequence[str] = []
Reported by Pylint.
Line: 35
Column: 1
return char in unifying_chars or char.isalnum()
def coalesce(chars: Iterable[str], unifying_chars: AbstractSet[str]) -> Iterator[str]:
words: MutableSequence[str] = []
syms: MutableSequence[str] = []
def wit() -> Iterator[str]:
if words:
Reported by Pylint.
coq/databases/snippets/sql/create/tables.sql
4 issues
Line: 6
Column: 11
CREATE TABLE IF NOT EXISTS filetypes (
filetype TEXT NOT NULL PRIMARY KEY
) WITHOUT ROWID;
CREATE TABLE IF NOT EXISTS extensions (
src TEXT NOT NULL REFERENCES filetypes (filetype) ON UPDATE CASCADE ON DELETE CASCADE,
dest TEXT NOT NULL REFERENCES filetypes (filetype) ON UPDATE CASCADE ON DELETE CASCADE,
Reported by SQLint.
Line: 24
Column: 11
content TEXT NOT NULL,
label TEXT NOT NULL,
doc TEXT NOT NULL
) WITHOUT ROWID;
CREATE TABLE IF NOT EXISTS matches (
snippet_id BLOB NOT NULL REFERENCES snippets (rowid) ON UPDATE CASCADE ON DELETE CASCADE,
match TEXT NOT NULL,
Reported by SQLint.
Line: 45
Column: 16
);
CREATE VIEW IF NOT EXISTS extensions_view AS
WITH RECURSIVE all_exts AS (
SELECT
1 AS lvl,
e1.src,
e1.dest
Reported by SQLint.
Line: 75
Column: 16
lvl < 10;
CREATE VIEW IF NOT EXISTS snippets_view AS
SELECT
snippets.rowid AS snippet_id,
snippets.grammar AS grammar,
matches.match AS prefix,
matches.lmatch AS lprefix,
Reported by SQLint.
coq/snippets/loaders/parse.py
3 issues
Line: 5
Column: 1
from textwrap import dedent
from typing import NoReturn
from ..types import LoadError
def raise_err(path: PurePath, lineno: int, line: str, reason: str) -> NoReturn:
msg = f"""\
Cannot load:
Reported by Pylint.
Line: 1
Column: 1
from pathlib import PurePath
from textwrap import dedent
from typing import NoReturn
from ..types import LoadError
def raise_err(path: PurePath, lineno: int, line: str, reason: str) -> NoReturn:
msg = f"""\
Reported by Pylint.
Line: 8
Column: 1
from ..types import LoadError
def raise_err(path: PurePath, lineno: int, line: str, reason: str) -> NoReturn:
msg = f"""\
Cannot load:
path: {path}
lineno: {lineno}
line: {line}
Reported by Pylint.
coq/snippets/types.py
3 issues
Line: 1
Column: 1
from dataclasses import dataclass
from typing import AbstractSet, Literal, Mapping, Sequence, Tuple
class LoadError(Exception):
...
@dataclass(frozen=True)
Reported by Pylint.
Line: 5
Column: 1
from typing import AbstractSet, Literal, Mapping, Sequence, Tuple
class LoadError(Exception):
...
@dataclass(frozen=True)
class ParsedSnippet:
Reported by Pylint.
Line: 10
Column: 1
@dataclass(frozen=True)
class ParsedSnippet:
grammar: str
content: str
label: str
doc: str
matches: AbstractSet[str]
Reported by Pylint.
coq/treesitter/types.py
3 issues
Line: 1
Column: 1
from dataclasses import dataclass
from typing import TypedDict
class RawPayload(TypedDict):
kind: str
text: str
Reported by Pylint.
Line: 5
Column: 1
from typing import TypedDict
class RawPayload(TypedDict):
kind: str
text: str
@dataclass(frozen=True)
Reported by Pylint.
Line: 11
Column: 1
@dataclass(frozen=True)
class Payload:
kind: str
text: str
Reported by Pylint.
docker/__main__.py
3 issues
Line: 4
Column: 1
from asyncio import gather, run
from pathlib import Path
from std2.asyncio.subprocess import call
_PARENT = Path(__file__).resolve().parent
_TOP_LEVEL = _PARENT.parent
Reported by Pylint.
Line: 1
Column: 1
from asyncio import gather, run
from pathlib import Path
from std2.asyncio.subprocess import call
_PARENT = Path(__file__).resolve().parent
_TOP_LEVEL = _PARENT.parent
Reported by Pylint.
Line: 29
Column: 1
)
async def main() -> None:
await _build("_base")
await gather(_build("packer"), _build("vimplug"))
run(main())
Reported by Pylint.
coq/databases/tags/sql/create/tables.sql
3 issues
Line: 8
Column: 11
filename TEXT NOT NULL PRIMARY KEY,
filetype TEXT NOT NULL,
mtime REAL NOT NULL
) WITHOUT ROWID;
CREATE INDEX IF NOT EXISTS files_filetype ON files (filetype);
-- !! files 1:N tags
Reported by SQLint.
Line: 15
Column: 3
-- !! files 1:N tags
CREATE TABLE IF NOT EXISTS tags (
`path` TEXT NOT NULL REFERENCES files (filename) ON UPDATE CASCADE ON DELETE CASCADE,
line INTEGER NOT NULL,
kind TEXT NOT NULL,
name TEXT NOT NULL,
lname TEXT NOT NULL,
pattern TEXT NOT NULL,
Reported by SQLint.
Line: 27
Column: 47
`access` TEXT,
UNIQUE (`path`, name)
);
CREATE INDEX IF NOT EXISTS tags_path ON tags (`path`);
CREATE INDEX IF NOT EXISTS tags_line ON tags (line);
CREATE INDEX IF NOT EXISTS tags_name ON tags (name);
CREATE INDEX IF NOT EXISTS tags_lnam ON tags (lname);
Reported by SQLint.
coq/ci/lsp.py
3 issues
Line: 5
Column: 1
from pathlib import Path
from typing import Any
from std2.asyncio.subprocess import call
_TOP_LV = Path(__file__).resolve().parent
_DOCKER_FILE = _TOP_LV / "Dockerfile"
Reported by Pylint.
Line: 1
Column: 1
from json import loads
from pathlib import Path
from typing import Any
from std2.asyncio.subprocess import call
_TOP_LV = Path(__file__).resolve().parent
_DOCKER_FILE = _TOP_LV / "Dockerfile"
Reported by Pylint.
Line: 40
Column: 1
return proc.out.decode()
async def lsp() -> Any:
raw = await _build(_DOCKER_FILE)
json = loads(raw)
return json
Reported by Pylint.
coq/databases/buffers/sql/create/tables.sql
2 issues
Line: 7
Column: 11
CREATE TABLE IF NOT EXISTS buffers (
rowid INTEGER NOT NULL PRIMARY KEY,
filetype TEXT NOT NULL
) WITHOUT ROWID;
CREATE INDEX IF NOT EXISTS buffers_filetype ON buffers (filetype);
CREATE TABLE IF NOT EXISTS lines (
rowid BLOB NOT NULL PRIMARY KEY,
Reported by SQLint.
Line: 18
Column: 11
line TEXT NOT NULL
-- TODO -- How to update line_num from back -> front in a single query
-- UNIQUE(filename, line_num)
) WITHOUT ROWID;
CREATE INDEX IF NOT EXISTS liness_buffer_id ON lines (buffer_id);
CREATE INDEX IF NOT EXISTS lines_line_num ON lines (line_num);
CREATE TABLE IF NOT EXISTS words (
Reported by SQLint.
coq/databases/treesitter/sql/__init__.py
2 issues
Line: 3
Column: 1
from pathlib import Path
from ....shared.sql import loader
sql = loader(Path(__file__).resolve().parent)
Reported by Pylint.
Line: 1
Column: 1
from pathlib import Path
from ....shared.sql import loader
sql = loader(Path(__file__).resolve().parent)
Reported by Pylint.