mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-07 06:24:35 +00:00
Makefile, some fixes
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
LINT_FILES=maigret wizard.py tests
|
||||||
|
|
||||||
|
test:
|
||||||
|
coverage run --source=./maigret -m pytest tests
|
||||||
|
coverage report -m
|
||||||
|
coverage html
|
||||||
|
|
||||||
|
rerun-tests:
|
||||||
|
pytest --lf
|
||||||
|
|
||||||
|
lint:
|
||||||
|
@echo 'syntax errors or undefined names'
|
||||||
|
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics ${LINT_FILES} maigret.py
|
||||||
|
|
||||||
|
@echo 'warning'
|
||||||
|
flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --ignore=E731,W503 ${LINT_FILES} maigret.py
|
||||||
|
|
||||||
|
@echo 'mypy'
|
||||||
|
mypy ${LINT_FILES}
|
||||||
|
|
||||||
|
format:
|
||||||
|
@echo 'black'
|
||||||
|
black --skip-string-normalization ${LINT_FILES}
|
||||||
|
|
||||||
|
pull:
|
||||||
|
git stash
|
||||||
|
git checkout main
|
||||||
|
git pull origin head
|
||||||
|
git stash pop
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf reports htmcov dist
|
||||||
|
|
||||||
|
install:
|
||||||
|
pip3 install .
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
FILES="maigret wizard.py maigret.py tests"
|
|
||||||
|
|
||||||
echo 'black'
|
|
||||||
black --skip-string-normalization $FILES
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
FILES="maigret wizard.py maigret.py tests"
|
|
||||||
|
|
||||||
echo 'syntax errors or undefined names'
|
|
||||||
flake8 --count --select=E9,F63,F7,F82 --show-source --statistics $FILES
|
|
||||||
|
|
||||||
echo 'warning'
|
|
||||||
flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --ignore=E731,W503 $FILES
|
|
||||||
|
|
||||||
echo 'mypy'
|
|
||||||
mypy ./maigret ./wizard.py ./tests
|
|
||||||
+6
-1
@@ -1,6 +1,11 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from mock import Mock
|
|
||||||
|
try:
|
||||||
|
from mock import Mock
|
||||||
|
except ImportError:
|
||||||
|
from unittest.mock import Mock
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import ssl
|
import ssl
|
||||||
import sys
|
import sys
|
||||||
|
|||||||
@@ -7883,11 +7883,14 @@
|
|||||||
],
|
],
|
||||||
"checkType": "message",
|
"checkType": "message",
|
||||||
"absenceStrs": [
|
"absenceStrs": [
|
||||||
"@context\": \"https://schema.org"
|
"https://likee.video/@/"
|
||||||
],
|
],
|
||||||
"alexaRank": 1072749,
|
"presenseStrs": [
|
||||||
"urlMain": "https://likee.com",
|
"user_name"
|
||||||
"url": "https://likee.com/user/@{username}/",
|
],
|
||||||
|
"alexaRank": 38032,
|
||||||
|
"url": "https://likee.video/@{username}",
|
||||||
|
"urlMain": "https://likee.video",
|
||||||
"usernameClaimed": "adam",
|
"usernameClaimed": "adam",
|
||||||
"usernameUnclaimed": "noonewouldeverusethis7"
|
"usernameUnclaimed": "noonewouldeverusethis7"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user