From d955b319861ce1d3e28d753d9c83f4b09045837a Mon Sep 17 00:00:00 2001 From: grym Date: Sat, 22 Jan 2022 08:14:23 -0500 Subject: [PATCH] resolve typing error --- README.org | 3 +++ fedmon/cli.py | 4 ++-- poetry.lock | 14 +++++++++++++- pyproject.toml | 1 + 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/README.org b/README.org index bcaa861..e00c8f6 100644 --- a/README.org +++ b/README.org @@ -4,6 +4,9 @@ Monitor [[https://analytics.usa.gov][analytics.usa.gov]] for federal websites th number of unique visitors than the USPS package tracking system does. Display your results in the terminal every 10 minutes: +[[[ + +]]] - As JSON: #+begin_src bash user@host:~$fedmon --format json diff --git a/fedmon/cli.py b/fedmon/cli.py index 785c110..2a0ea41 100644 --- a/fedmon/cli.py +++ b/fedmon/cli.py @@ -6,7 +6,7 @@ import time from datetime import datetime from enum import Enum from io import StringIO -from typing import Tuple +from typing import Sequence, Tuple import cachetools.func import httpx @@ -56,7 +56,7 @@ class FedSite(BaseModel): class Summary(BaseModel): - sites: Tuple[FedSite] + sites: Sequence[FedSite] @functools.lru_cache() diff --git a/poetry.lock b/poetry.lock index 4f1ea79..ebb7dd8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -139,6 +139,14 @@ python-versions = ">=3.6" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} +[[package]] +name = "cogapp" +version = "3.3.0" +description = "Cog: A content generator for executing Python snippets in source files." +category = "dev" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" + [[package]] name = "colorama" version = "0.4.4" @@ -672,7 +680,7 @@ python-versions = "*" [metadata] lock-version = "1.1" python-versions = "^3.8" -content-hash = "176b6c7e99878be0ff9ee9f708a69835ff2b3eaa8fe2029427346d052453a694" +content-hash = "034532f84bbe75746626c4aa2a1a992b9a56b1189283dd6bff65fa7945f60ece" [metadata.files] anyio = [ @@ -723,6 +731,10 @@ click = [ {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, ] +cogapp = [ + {file = "cogapp-3.3.0-py2.py3-none-any.whl", hash = "sha256:8b5b5f6063d8ee231961c05da010cb27c30876b2279e23ad0eae5f8f09460d50"}, + {file = "cogapp-3.3.0.tar.gz", hash = "sha256:1be95183f70282422d594fa42426be6923070a4bd8335621f6347f3aeee81db0"}, +] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, ] diff --git a/pyproject.toml b/pyproject.toml index 5ace275..2161aa8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,6 +16,7 @@ tabulate = "^0.8.9" pytest = "^5.2" ipython = "^8.0.1" pre-commit = "^2.17.0" +cogapp = "^3.3.0" [build-system] requires = ["poetry-core>=1.0.0"]