diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 073fc47..20bc803 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -33,12 +33,6 @@ repos: language: system types: [python] require_serial: true - - id: reorder-python-imports - name: Reorder python imports - entry: reorder-python-imports - language: system - types: [python] - args: [--application-directories=src] - id: trailing-whitespace name: Trim Trailing Whitespace entry: trailing-whitespace-fixer diff --git a/.python-version b/.python-version index a78f7c6..ac957df 100644 --- a/.python-version +++ b/.python-version @@ -1,2 +1 @@ -3.7.9 -3.9.0 +3.10.6 diff --git a/poetry.lock b/poetry.lock index 2ed4563..9573563 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. [[package]] name = "aiohttp" version = "3.8.3" description = "Async http client/server framework (asyncio)" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -113,7 +112,6 @@ speedups = ["Brotli", "aiodns", "cchardet"] name = "aiosignal" version = "1.3.1" description = "aiosignal: a list of registered asynchronous callbacks" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -128,7 +126,6 @@ frozenlist = ">=1.1.0" name = "aspy-refactor-imports" version = "2.3.0" description = "Utilities for refactoring imports in python-like syntax." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -143,7 +140,6 @@ cached-property = "*" name = "async-timeout" version = "4.0.2" description = "Timeout context manager for asyncio programs" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -155,7 +151,6 @@ files = [ name = "atomicwrites" version = "1.4.1" description = "Atomic file writes." -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -166,7 +161,6 @@ files = [ name = "attrs" version = "22.2.0" description = "Classes Without Boilerplate" -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -185,7 +179,6 @@ tests-no-zope = ["cloudpickle", "cloudpickle", "hypothesis", "hypothesis", "mypy name = "babel" version = "2.11.0" description = "Internationalization utilities" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -200,7 +193,6 @@ pytz = ">=2015.7" name = "beautifulsoup4" version = "4.11.2" description = "Screen-scraping library" -category = "main" optional = false python-versions = ">=3.6.0" files = [ @@ -219,7 +211,6 @@ lxml = ["lxml"] name = "black" version = "22.12.0" description = "The uncompromising code formatter." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -255,7 +246,6 @@ uvloop = ["uvloop (>=0.15.2)"] name = "cached-property" version = "1.5.2" description = "A decorator for caching properties in classes." -category = "dev" optional = false python-versions = "*" files = [ @@ -267,7 +257,6 @@ files = [ name = "certifi" version = "2022.12.7" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -279,7 +268,6 @@ files = [ name = "cfgv" version = "3.3.1" description = "Validate configuration and produce human readable error messages." -category = "dev" optional = false python-versions = ">=3.6.1" files = [ @@ -291,7 +279,6 @@ files = [ name = "charset-normalizer" version = "2.1.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.6.0" files = [ @@ -306,7 +293,6 @@ unicode-backport = ["unicodedata2"] name = "cinemagoer" version = "2023.5.1" description = "Python package to access the IMDb's database" -category = "main" optional = false python-versions = "*" files = [ @@ -326,7 +312,6 @@ doc = ["sphinx", "sphinx-rtd-theme"] name = "click" version = "8.1.3" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -341,7 +326,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -353,7 +337,6 @@ files = [ name = "coverage" version = "6.5.0" description = "Code coverage measurement for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -419,7 +402,6 @@ toml = ["tomli"] name = "csscompressor" version = "0.9.5" description = "A python port of YUI CSS Compressor" -category = "dev" optional = false python-versions = "*" files = [ @@ -430,7 +412,6 @@ files = [ name = "darglint" version = "1.8.1" description = "A utility for ensuring Google-style docstrings stay up to date with the source code." -category = "dev" optional = false python-versions = ">=3.6,<4.0" files = [ @@ -442,7 +423,6 @@ files = [ name = "distlib" version = "0.3.6" description = "Distribution utilities" -category = "dev" optional = false python-versions = "*" files = [ @@ -454,7 +434,6 @@ files = [ name = "dparse" version = "0.6.2" description = "A parser for Python dependency files" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -474,7 +453,6 @@ pipenv = ["pipenv"] name = "filelock" version = "3.9.0" description = "A platform independent file lock." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -490,7 +468,6 @@ testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pyt name = "flake8" version = "6.0.0" description = "the modular source code checker: pep8 pyflakes and co" -category = "dev" optional = false python-versions = ">=3.8.1" files = [ @@ -507,7 +484,6 @@ pyflakes = ">=3.0.0,<3.1.0" name = "flake8-polyfill" version = "1.0.2" description = "Polyfill package for Flake8 plugins" -category = "dev" optional = false python-versions = "*" files = [ @@ -522,7 +498,6 @@ flake8 = "*" name = "frozenlist" version = "1.3.3" description = "A list-like structure which implements collections.abc.MutableSequence" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -606,7 +581,6 @@ files = [ name = "ghp-import" version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." -category = "dev" optional = false python-versions = "*" files = [ @@ -624,7 +598,6 @@ dev = ["flake8", "markdown", "twine", "wheel"] name = "gitdb" version = "4.0.10" description = "Git Object Database" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -639,7 +612,6 @@ smmap = ">=3.0.1,<6" name = "gitpython" version = "3.1.30" description = "GitPython is a python library used to interact with Git repositories" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -654,7 +626,6 @@ gitdb = ">=4.0.1,<5" name = "greenlet" version = "2.0.2" description = "Lightweight in-process concurrent programming" -category = "main" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" files = [ @@ -732,7 +703,6 @@ test = ["objgraph", "psutil"] name = "griffe" version = "0.25.4" description = "Signatures for entire Python programs. Extract the structure, the frame, the skeleton of your project, to generate API documentation or find breaking changes in your API." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -750,7 +720,6 @@ async = ["aiofiles (>=0.7,<1.0)"] name = "htmlmin" version = "0.1.12" description = "An HTML Minifier" -category = "dev" optional = false python-versions = "*" files = [ @@ -761,7 +730,6 @@ files = [ name = "identify" version = "2.5.17" description = "File identification library for Python" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -776,7 +744,6 @@ license = ["ukkonen"] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -788,7 +755,6 @@ files = [ name = "importlib-metadata" version = "6.0.0" description = "Read metadata from Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -808,7 +774,6 @@ testing = ["flake8 (<5)", "flufl.flake8", "importlib-resources (>=1.3)", "packag name = "iniconfig" version = "2.0.0" description = "brain-dead simple config-ini parsing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -820,7 +785,6 @@ files = [ name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -838,7 +802,6 @@ i18n = ["Babel (>=2.7)"] name = "jsmin" version = "3.0.1" description = "JavaScript minifier." -category = "dev" optional = false python-versions = "*" files = [ @@ -849,7 +812,6 @@ files = [ name = "lxml" version = "4.9.2" description = "Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, != 3.4.*" files = [ @@ -942,7 +904,6 @@ source = ["Cython (>=0.29.7)"] name = "markdown" version = "3.3.7" description = "Python implementation of Markdown." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -960,7 +921,6 @@ testing = ["coverage", "pyyaml"] name = "markdown-include" version = "0.8.0" description = "A Python-Markdown extension which provides an 'include' function" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -978,7 +938,6 @@ tests = ["pytest"] name = "markupsafe" version = "2.1.2" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1038,7 +997,6 @@ files = [ name = "mccabe" version = "0.7.0" description = "McCabe checker, plugin for flake8" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1050,7 +1008,6 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1062,7 +1019,6 @@ files = [ name = "mkdocs" version = "1.4.2" description = "Project documentation with Markdown." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1091,7 +1047,6 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp name = "mkdocs-autolinks-plugin" version = "0.6.0" description = "An MkDocs plugin" -category = "dev" optional = false python-versions = ">=2.7" files = [ @@ -1106,7 +1061,6 @@ mkdocs = ">=1.2.3" name = "mkdocs-autorefs" version = "0.4.1" description = "Automatically link across pages in MkDocs." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1122,7 +1076,6 @@ mkdocs = ">=1.1" name = "mkdocs-git-revision-date-localized-plugin" version = "1.1.0" description = "Mkdocs plugin that enables displaying the localized date of the last git modification of a markdown file." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1139,7 +1092,6 @@ mkdocs = ">=1.0" name = "mkdocs-htmlproofer-plugin" version = "0.10.2" description = "A MkDocs plugin that validates URL in rendered HTML files" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1157,7 +1109,6 @@ requests = "*" name = "mkdocs-material" version = "9.0.10" description = "Documentation that simply works" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1180,7 +1131,6 @@ requests = ">=2.26" name = "mkdocs-material-extensions" version = "1.1.1" description = "Extension pack for Python Markdown and MkDocs Material." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1192,7 +1142,6 @@ files = [ name = "mkdocs-minify-plugin" version = "0.6.2" description = "An MkDocs plugin to minify HTML, JS or CSS files prior to being written to disk" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1210,7 +1159,6 @@ mkdocs = ">=1.4.1" name = "mkdocstrings" version = "0.20.0" description = "Automatic documentation from sources, for MkDocs." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1235,7 +1183,6 @@ python-legacy = ["mkdocstrings-python-legacy (>=0.2.1)"] name = "mkdocstrings-python" version = "0.8.3" description = "A Python handler for mkdocstrings." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1251,7 +1198,6 @@ mkdocstrings = ">=0.19" name = "multidict" version = "6.0.4" description = "multidict implementation" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1335,7 +1281,6 @@ files = [ name = "mypy" version = "0.910" description = "Optional static typing for Python" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1377,7 +1322,6 @@ python2 = ["typed-ast (>=1.4.0,<1.5.0)"] name = "mypy-extensions" version = "0.4.3" description = "Experimental type system extensions for programs checked with the mypy typechecker." -category = "dev" optional = false python-versions = "*" files = [ @@ -1389,7 +1333,6 @@ files = [ name = "nodeenv" version = "1.7.0" description = "Node.js virtual environment builder" -category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" files = [ @@ -1404,7 +1347,6 @@ setuptools = "*" name = "packaging" version = "21.3" description = "Core utilities for Python packages" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1419,7 +1361,6 @@ pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" name = "pathspec" version = "0.11.0" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1431,7 +1372,6 @@ files = [ name = "pep8-naming" version = "0.12.1" description = "Check PEP-8 naming conventions, plugin for flake8" -category = "dev" optional = false python-versions = "*" files = [ @@ -1447,7 +1387,6 @@ flake8-polyfill = ">=1.0.2,<2" name = "platformdirs" version = "2.6.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1463,7 +1402,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest- name = "pluggy" version = "1.0.0" description = "plugin and hook calling mechanisms for python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1479,7 +1417,6 @@ testing = ["pytest", "pytest-benchmark"] name = "pre-commit" version = "2.21.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1498,7 +1435,6 @@ virtualenv = ">=20.10.0" name = "pre-commit-hooks" version = "4.4.0" description = "Some out-of-the-box hooks for pre-commit." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1514,7 +1450,6 @@ tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} name = "py" version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" files = [ @@ -1526,7 +1461,6 @@ files = [ name = "pycodestyle" version = "2.10.0" description = "Python style guide checker" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1538,7 +1472,6 @@ files = [ name = "pyflakes" version = "3.0.1" description = "passive checker of Python programs" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1550,7 +1483,6 @@ files = [ name = "pygments" version = "2.14.0" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1565,7 +1497,6 @@ plugins = ["importlib-metadata"] name = "pymdown-extensions" version = "9.9.2" description = "Extension pack for Python Markdown." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1580,7 +1511,6 @@ markdown = ">=3.2" name = "pyparsing" version = "3.0.9" description = "pyparsing module - Classes and methods to define and execute parsing grammars" -category = "dev" optional = false python-versions = ">=3.6.8" files = [ @@ -1595,7 +1525,6 @@ diagrams = ["jinja2", "railroad-diagrams"] name = "pytest" version = "6.2.5" description = "pytest: simple powerful testing with Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1620,7 +1549,6 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm name = "pytest-aiohttp" version = "0.3.0" description = "pytest plugin for aiohttp support" -category = "dev" optional = false python-versions = "*" files = [ @@ -1636,7 +1564,6 @@ pytest = "*" name = "pytest-asyncio" version = "0.16.0" description = "Pytest support for asyncio." -category = "dev" optional = false python-versions = ">= 3.6" files = [ @@ -1654,7 +1581,6 @@ testing = ["coverage", "hypothesis (>=5.7.1)"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -1669,7 +1595,6 @@ six = ">=1.5" name = "pytz" version = "2022.7.1" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" files = [ @@ -1681,7 +1606,6 @@ files = [ name = "pyyaml" version = "6.0" description = "YAML parser and emitter for Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1731,7 +1655,6 @@ files = [ name = "pyyaml-env-tag" version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1746,7 +1669,6 @@ pyyaml = "*" name = "regex" version = "2022.10.31" description = "Alternative regular expression module, to replace re." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1844,7 +1766,6 @@ files = [ name = "reorder-python-imports" version = "2.8.0" description = "Tool for reordering python imports" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1859,7 +1780,6 @@ files = [ name = "requests" version = "2.28.2" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7, <4" files = [ @@ -1881,7 +1801,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "ruamel-yaml" version = "0.17.21" description = "ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order" -category = "dev" optional = false python-versions = ">=3" files = [ @@ -1900,7 +1819,6 @@ jinja2 = ["ruamel.yaml.jinja2 (>=0.2)"] name = "ruamel-yaml-clib" version = "0.2.7" description = "C version of reader, parser and emitter for ruamel.yaml derived from libyaml" -category = "dev" optional = false python-versions = ">=3.5" files = [ @@ -1945,35 +1863,34 @@ files = [ [[package]] name = "ruff" -version = "0.0.240" +version = "0.0.292" description = "An extremely fast Python linter, written in Rust." -category = "dev" optional = false python-versions = ">=3.7" files = [ - {file = "ruff-0.0.240-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:222dd5a5f7cf2f155d7bb77ac484b9afd6f8aaecd963a91c8dbb93355ef42fd2"}, - {file = "ruff-0.0.240-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:2c956a037671b5ab81546346f3e7f0b3f0e13d0b2e5a3e88c1b2227a1e9aae82"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b43c73fc165f8c7de7c095208d05653744aee6fb0a71680449c2ff1cf59183ea"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f58f1122001150d70909885ccf43d869237be814d4cfc74bb60b3883635e440a"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3b427050336b8967755e305f506e84e550591fa47766b5b0cb0c8bcb5c8ca9e7"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:0fe8cc47c4c3423548a074e163388f943a14b1e349be88e5dc4cd43df81b6344"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2f40f07d030e7a8cbe365a62fe8543e146b9bcd2a31f5625c2beaccad0d1b8c1"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:c222ad12e4bf795e3cec64d56178af1bfbc5d97929a0abf685564937e52c9862"}, - {file = "ruff-0.0.240-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a26eb3cd68527bcae2543027a0a674d37d03f239f6f025049149115c9775438d"}, - {file = "ruff-0.0.240-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:4591c9104b6898cbd0df57f6b6f8e2907b08fa85ff5196750f0a7b370ae9f78e"}, - {file = "ruff-0.0.240-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:7fed973319ca0a8c2e5c80732217b9b1ec069305839f480907469791e596b150"}, - {file = "ruff-0.0.240-py3-none-musllinux_1_2_i686.whl", hash = "sha256:4ce049d1fedb1b785fef29403d26e6109b77287b51afd10b74edc986f609c4af"}, - {file = "ruff-0.0.240-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:5127cfaec1f78bd7104174eeacee85dea64796905812b448efd60f504cfa5eec"}, - {file = "ruff-0.0.240-py3-none-win32.whl", hash = "sha256:071e01a980ffd638a5ce7960ce662fa9b434962f78e7c575478c64e5f147aac8"}, - {file = "ruff-0.0.240-py3-none-win_amd64.whl", hash = "sha256:d0b1ac5d1d882db25ca4b7dff8aa813ecc7912bdde4ad8f59f2d922b1996cbc7"}, - {file = "ruff-0.0.240.tar.gz", hash = "sha256:0f1a0b04ce6f3d59894c64f3c3a5a0a35ff4803b8dc51e962d7de42fdb0f5eb1"}, + {file = "ruff-0.0.292-py3-none-macosx_10_7_x86_64.whl", hash = "sha256:02f29db018c9d474270c704e6c6b13b18ed0ecac82761e4fcf0faa3728430c96"}, + {file = "ruff-0.0.292-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:69654e564342f507edfa09ee6897883ca76e331d4bbc3676d8a8403838e9fade"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c3c91859a9b845c33778f11902e7b26440d64b9d5110edd4e4fa1726c41e0a4"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f4476f1243af2d8c29da5f235c13dca52177117935e1f9393f9d90f9833f69e4"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:be8eb50eaf8648070b8e58ece8e69c9322d34afe367eec4210fdee9a555e4ca7"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9889bac18a0c07018aac75ef6c1e6511d8411724d67cb879103b01758e110a81"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:6bdfabd4334684a4418b99b3118793f2c13bb67bf1540a769d7816410402a205"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aa7c77c53bfcd75dbcd4d1f42d6cabf2485d2e1ee0678da850f08e1ab13081a8"}, + {file = "ruff-0.0.292-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8e087b24d0d849c5c81516ec740bf4fd48bf363cfb104545464e0fca749b6af9"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:f160b5ec26be32362d0774964e218f3fcf0a7da299f7e220ef45ae9e3e67101a"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:ac153eee6dd4444501c4bb92bff866491d4bfb01ce26dd2fff7ca472c8df9ad0"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_i686.whl", hash = "sha256:87616771e72820800b8faea82edd858324b29bb99a920d6aa3d3949dd3f88fb0"}, + {file = "ruff-0.0.292-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b76deb3bdbea2ef97db286cf953488745dd6424c122d275f05836c53f62d4016"}, + {file = "ruff-0.0.292-py3-none-win32.whl", hash = "sha256:e854b05408f7a8033a027e4b1c7f9889563dd2aca545d13d06711e5c39c3d003"}, + {file = "ruff-0.0.292-py3-none-win_amd64.whl", hash = "sha256:f27282bedfd04d4c3492e5c3398360c9d86a295be00eccc63914438b4ac8a83c"}, + {file = "ruff-0.0.292-py3-none-win_arm64.whl", hash = "sha256:7f67a69c8f12fbc8daf6ae6d36705037bde315abf8b82b6e1f4c9e74eb750f68"}, + {file = "ruff-0.0.292.tar.gz", hash = "sha256:1093449e37dd1e9b813798f6ad70932b57cf614e5c2b5c51005bf67d55db33ac"}, ] [[package]] name = "safety" version = "2.3.5" description = "Checks installed dependencies for known vulnerabilities and licenses." -category = "dev" optional = false python-versions = "*" files = [ @@ -1997,7 +1914,6 @@ gitlab = ["python-gitlab (>=1.3.0)"] name = "setuptools" version = "67.1.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2014,7 +1930,6 @@ testing-integration = ["build[virtualenv]", "filelock (>=3.4.0)", "jaraco.envs ( name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2026,7 +1941,6 @@ files = [ name = "smmap" version = "5.0.0" description = "A pure Python implementation of a sliding window memory map manager" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2038,7 +1952,6 @@ files = [ name = "soupsieve" version = "2.3.2.post1" description = "A modern CSS selector implementation for Beautiful Soup." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -2050,7 +1963,6 @@ files = [ name = "sqlalchemy" version = "2.0.1" description = "Database Abstraction Library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2128,7 +2040,6 @@ sqlcipher = ["sqlcipher3-binary"] name = "toml" version = "0.10.2" description = "Python Library for Tom's Obvious, Minimal Language" -category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -2140,7 +2051,6 @@ files = [ name = "tomli" version = "2.0.1" description = "A lil' TOML parser" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2152,7 +2062,6 @@ files = [ name = "typeguard" version = "2.13.3" description = "Run-time type checker for Python" -category = "dev" optional = false python-versions = ">=3.5.3" files = [ @@ -2168,7 +2077,6 @@ test = ["mypy", "pytest", "typing-extensions"] name = "types-requests" version = "2.28.11.8" description = "Typing stubs for requests" -category = "dev" optional = false python-versions = "*" files = [ @@ -2183,7 +2091,6 @@ types-urllib3 = "<1.27" name = "types-urllib3" version = "1.26.25.4" description = "Typing stubs for urllib3" -category = "dev" optional = false python-versions = "*" files = [ @@ -2195,7 +2102,6 @@ files = [ name = "typing-extensions" version = "4.4.0" description = "Backported and Experimental Type Hints for Python 3.7+" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2207,7 +2113,6 @@ files = [ name = "urllib3" version = "1.26.14" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" files = [ @@ -2224,7 +2129,6 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] name = "vcrpy" version = "4.2.1" description = "Automatically mock your HTTP interactions to simplify and speed up testing" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2242,7 +2146,6 @@ yarl = "*" name = "virtualenv" version = "20.17.1" description = "Virtual Python Environment builder" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2263,7 +2166,6 @@ testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7 name = "watchdog" version = "2.2.1" description = "Filesystem events monitoring" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -2304,7 +2206,6 @@ watchmedo = ["PyYAML (>=3.10)"] name = "wrapt" version = "1.14.1" description = "Module for decorators, wrappers and monkey patching." -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" files = [ @@ -2378,7 +2279,6 @@ files = [ name = "xdoctest" version = "0.15.10" description = "A rewrite of the builtin doctest module" -category = "dev" optional = false python-versions = "*" files = [ @@ -2402,7 +2302,6 @@ tests = ["IPython", "cmake", "codecov", "ipykernel", "jupyter-client", "nbconver name = "yarl" version = "1.8.2" description = "Yet another URL library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -2490,7 +2389,6 @@ multidict = ">=4.0" name = "zipp" version = "3.12.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -2505,4 +2403,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "2.0" python-versions = "^3.8.1" -content-hash = "1eedef6b1f57109c2f7c4cc15c7348a5e64ebe0887b633a6742d0ae47a6d5abb" +content-hash = "51cfd674dd2670d3043daefcb18b644f4453e8f6b05d1d61638ff4193fac2784" diff --git a/pyproject.toml b/pyproject.toml index 9255d8b..ad61124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -45,7 +45,7 @@ reorder-python-imports = "^2.6.0" pre-commit-hooks = "^4.0.1" Pygments = "^2.9.0" types-requests = "^2.25.11" -ruff = "^0.0.240" +ruff = "~0.0.1" [tool.poetry.group.docs.dependencies] markdown-include = "*" @@ -75,7 +75,9 @@ show_missing = true fail_under = 90 [tool.ruff] +src = ['src', 'tests'] ignore = [ + 'A003', 'B019', 'D203', 'D204', @@ -88,19 +90,38 @@ ignore = [ 'D408', 'D409', 'D413', + 'DTZ007', 'E501', - 'S113' + 'S113', ] line-length = 80 +target-version = 'py37' select = [ + 'A', + 'ARG', + 'ASYNC', 'B', 'B9', + 'BLE', 'C', + 'C4', 'D', + 'DTZ', 'E', 'F', + 'I', 'N', + 'PIE', + 'PT', + 'PTH', + 'Q', + 'RET', 'S', + 'SIM', + 'SLF', + 'T10', + 'TCH', + 'UP', 'W', ] @@ -110,10 +131,13 @@ max-complexity = 10 [tool.ruff.pydocstyle] convention = 'google' +[tool.ruff.isort] +force-single-line = true + [tool.ruff.per-file-ignores] "__init__.py" = ['F401'] "tests/*" = [ - 'S101', + 'S', 'D212', 'D415', 'D205', diff --git a/src/phylm/tools.py b/src/phylm/tools.py index da12a53..e3698dc 100644 --- a/src/phylm/tools.py +++ b/src/phylm/tools.py @@ -1,11 +1,13 @@ """Module to hold `phylm` tools.""" +from typing import TYPE_CHECKING from typing import Any from typing import Dict from typing import List from typing import Optional from typing import Union -from imdb.Movie import Movie +if TYPE_CHECKING: + from imdb.Movie import Movie from phylm.clients.tmdb import initialize_tmdb_client from phylm.sources.imdb import ia diff --git a/src/phylm/utils/web.py b/src/phylm/utils/web.py index 199d03f..2b24746 100644 --- a/src/phylm/utils/web.py +++ b/src/phylm/utils/web.py @@ -6,7 +6,6 @@ from aiohttp import ClientSession from bs4 import BeautifulSoup - # DEFAULT_HEADERS = {"User-agent": "Mozilla/5.0"} DEFAULT_HEADERS = { "User-agent": ( diff --git a/tests/conftest.py b/tests/conftest.py index b7a153e..587e5a7 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -4,6 +4,7 @@ import pytest import vcr from aiohttp import ClientSession + from tests.utils.vcr_serializers import ResponseBodyCompressor my_vcr = vcr.VCR() diff --git a/tests/test_main.py b/tests/test_main.py index a9477ca..30426ae 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -5,7 +5,7 @@ from phylm import __main__ -@pytest.fixture +@pytest.fixture() def runner() -> CliRunner: """Fixture for invoking command-line interfaces.""" return CliRunner() diff --git a/tests/unit/clients/test_tmdb.py b/tests/unit/clients/test_tmdb.py index 9dfeb9a..bdafa40 100644 --- a/tests/unit/clients/test_tmdb.py +++ b/tests/unit/clients/test_tmdb.py @@ -7,11 +7,11 @@ import pytest import vcr from requests.exceptions import HTTPError -from tests.conftest import FIXTURES_DIR -from phylm.clients.tmdb import initialize_tmdb_client from phylm.clients.tmdb import TmdbClient +from phylm.clients.tmdb import initialize_tmdb_client from phylm.errors import NoTMDbApiKeyError +from tests.conftest import FIXTURES_DIR VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/clients/tmdb" MODULE_PATH = "phylm.clients.tmdb" @@ -83,7 +83,7 @@ def test_api_error(self) -> None: class TestSearchMoviesAsync: """Tests for the `search_movies_async` method.""" - @pytest.mark.asyncio + @pytest.mark.asyncio() async def test_success(self) -> None: """Movies search results are returned.""" client = TmdbClient(api_key="not_a_key") @@ -107,7 +107,7 @@ async def test_success(self) -> None: ("region", "US"), ] - @pytest.mark.asyncio + @pytest.mark.asyncio() async def test_success_year(self) -> None: """Movies search results filtered by year are returned.""" client = TmdbClient(api_key="not_a_key") @@ -131,7 +131,7 @@ async def test_success_year(self) -> None: ("year", "1999"), ] - @pytest.mark.asyncio + @pytest.mark.asyncio() async def test_no_results(self) -> None: """Empty list is returned for no results.""" client = TmdbClient(api_key="not_a_key") @@ -148,7 +148,7 @@ async def test_no_results(self) -> None: class TestGetMovie: """Tests for the `get_movie` method.""" - @pytest.mark.asyncio + @pytest.mark.asyncio() async def test_success(self) -> None: """Movie result is returned.""" client = TmdbClient(api_key="not_a_key") @@ -168,7 +168,7 @@ async def test_success(self) -> None: ("language", "en-US"), ] - @pytest.mark.asyncio + @pytest.mark.asyncio() async def test_not_found(self) -> None: """Unrecognised movie id is handled.""" client = TmdbClient(api_key="not_a_key") diff --git a/tests/unit/sources/test_imdb.py b/tests/unit/sources/test_imdb.py index cc53b19..ce8bb67 100644 --- a/tests/unit/sources/test_imdb.py +++ b/tests/unit/sources/test_imdb.py @@ -1,9 +1,9 @@ """Module for `Imdb` tests.""" import pytest -from tests.conftest import FIXTURES_DIR -from tests.conftest import my_vcr from phylm.sources.imdb import Imdb +from tests.conftest import FIXTURES_DIR +from tests.conftest import my_vcr VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/imdb" IMDB_IA_PATH = "phylm.sources.imdb.ia" diff --git a/tests/unit/sources/test_mtc.py b/tests/unit/sources/test_mtc.py index 1ae6565..ec615b1 100644 --- a/tests/unit/sources/test_mtc.py +++ b/tests/unit/sources/test_mtc.py @@ -1,9 +1,9 @@ """Tests for the Mtc class.""" import pytest -from tests.conftest import FIXTURES_DIR -from tests.conftest import my_vcr from phylm.sources.mtc import Mtc +from tests.conftest import FIXTURES_DIR +from tests.conftest import my_vcr VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/mtc" pytestmark = pytest.mark.asyncio diff --git a/tests/unit/sources/test_rt.py b/tests/unit/sources/test_rt.py index 57889b5..6f13428 100644 --- a/tests/unit/sources/test_rt.py +++ b/tests/unit/sources/test_rt.py @@ -1,9 +1,9 @@ """Tests for the Rt class.""" import pytest -from tests.conftest import FIXTURES_DIR -from tests.conftest import my_vcr from phylm.sources.rt import Rt +from tests.conftest import FIXTURES_DIR +from tests.conftest import my_vcr VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/rt" pytestmark = pytest.mark.asyncio diff --git a/tests/unit/sources/test_tmdb.py b/tests/unit/sources/test_tmdb.py index b8e3766..943fe79 100644 --- a/tests/unit/sources/test_tmdb.py +++ b/tests/unit/sources/test_tmdb.py @@ -5,10 +5,10 @@ from unittest.mock import patch import pytest -from tests.conftest import FIXTURES_DIR -from tests.conftest import vcr from phylm.sources.tmdb import Tmdb +from tests.conftest import FIXTURES_DIR +from tests.conftest import vcr MODULE_PATH = "phylm.sources.tmdb" VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/tmdb" @@ -116,7 +116,7 @@ async def test_no_results(self, mock_initialize_client: MagicMock) -> None: await tmdb.load_source() search_movies_mock.assert_awaited_once_with("The Matrix", year=1999) - get_movie_mock.assert_not_awaited + get_movie_mock.assert_not_awaited() @patch(f"{MODULE_PATH}.initialize_tmdb_client") async def test_new_session(self, mock_initialize_client: MagicMock) -> None: diff --git a/tests/unit/test_main.py b/tests/unit/test_main.py index a9477ca..30426ae 100644 --- a/tests/unit/test_main.py +++ b/tests/unit/test_main.py @@ -5,7 +5,7 @@ from phylm import __main__ -@pytest.fixture +@pytest.fixture() def runner() -> CliRunner: """Fixture for invoking command-line interfaces.""" return CliRunner() diff --git a/tests/unit/utils/test_web.py b/tests/unit/utils/test_web.py index df0befa..4c50de3 100644 --- a/tests/unit/utils/test_web.py +++ b/tests/unit/utils/test_web.py @@ -5,13 +5,13 @@ from aiohttp import ClientSession from bs4 import BeautifulSoup -from tests.conftest import FIXTURES_DIR -from tests.conftest import my_vcr -from phylm.utils.web import async_soupify from phylm.utils.web import DEFAULT_HEADERS +from phylm.utils.web import async_soupify from phylm.utils.web import soupify from phylm.utils.web import url_encode +from tests.conftest import FIXTURES_DIR +from tests.conftest import my_vcr VCR_FIXTURES_DIR = f"{FIXTURES_DIR}/utils/web"