diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aabfacbfc..403ec44c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,10 +20,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip setuptools six wheel - python -m pip install mypy pytest-cov -r requirements.txt - - run: | - mkdir -p .mypy_cache - mypy --ignore-missing-imports --install-types --non-interactive . || true + python -m pip install pytest-cov -r requirements.txt - name: Run tests run: pytest --doctest-modules --ignore=project_euler/ --ignore=scripts/validate_solutions.py --cov-report=term-missing:skip-covered --cov=. . - if: ${{ success() }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33069a807..ab74d28e1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: hooks: - id: pyupgrade args: - - --py39-plus + - --py310-plus - repo: https://gitlab.com/pycqa/flake8 rev: 3.9.2 diff --git a/arithmetic_analysis/in_static_equilibrium.py b/arithmetic_analysis/in_static_equilibrium.py index 6fe84b454..2ac3e7213 100644 --- a/arithmetic_analysis/in_static_equilibrium.py +++ b/arithmetic_analysis/in_static_equilibrium.py @@ -13,9 +13,9 @@ def polar_force( Resolves force along rectangular components. (force, angle) => (force_x, force_y) >>> polar_force(10, 45) - [7.0710678118654755, 7.071067811865475] + [7.071067811865477, 7.0710678118654755] >>> polar_force(10, 3.14, radian_mode=True) - [-9.999987317275394, 0.01592652916486828] + [-9.999987317275396, 0.01592652916486828] """ if radian_mode: return [magnitude * cos(angle), magnitude * sin(angle)] diff --git a/web_programming/fetch_well_rx_price.py b/web_programming/fetch_well_rx_price.py index 58dbe5993..5174f39f9 100644 --- a/web_programming/fetch_well_rx_price.py +++ b/web_programming/fetch_well_rx_price.py @@ -5,7 +5,6 @@ after providing the drug name and zipcode. """ -from typing import Union from urllib.error import HTTPError from bs4 import BeautifulSoup @@ -14,7 +13,7 @@ from requests import exceptions, get BASE_URL = "https://www.wellrx.com/prescriptions/{0}/{1}/?freshSearch=true" -def fetch_pharmacy_and_price_list(drug_name: str, zip_code: str) -> Union[list, None]: +def fetch_pharmacy_and_price_list(drug_name: str, zip_code: str) -> list | None: """[summary] This function will take input of drug name and zipcode, @@ -85,7 +84,7 @@ if __name__ == "__main__": drug_name = input("Enter drug name: ").strip() zip_code = input("Enter zip code: ").strip() - pharmacy_price_list: Union[list, None] = fetch_pharmacy_and_price_list( + pharmacy_price_list: list | None = fetch_pharmacy_and_price_list( drug_name, zip_code )