From: Shane <30691680+gamesguru@users.noreply.github.com> Date: Tue, 9 Sep 2025 16:48:57 +0000 (-0400) Subject: flake8 working X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=c9f2a9434996e2c0c7150391865d37b7f192eedc;p=gamesguru%2Fgetmyancestors.git flake8 working --- diff --git a/Makefile b/Makefile index 79cadbe..643def2 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ LINT_LOCS ?= getmyancestors/ .PHONY: lint lint: - -flake8 $(LINT_LOCS) + flake8 $(LINT_LOCS) black $(LINT_LOCS) isort $(LINT_LOCS) pylint $(LINT_LOCS) diff --git a/getmyancestors/classes/session.py b/getmyancestors/classes/session.py index 122f087..2830251 100644 --- a/getmyancestors/classes/session.py +++ b/getmyancestors/classes/session.py @@ -80,7 +80,7 @@ class Session(requests.Session): ) res.raise_for_status() - url = f"https://ident.familysearch.org/cis-web/oauth2/v3/authorization" + url = "https://ident.familysearch.org/cis-web/oauth2/v3/authorization" params = { "response_type": "code", "scope": "profile email qualifies_for_affiliate_account country", @@ -93,7 +93,7 @@ class Session(requests.Session): response.raise_for_status() try: code = parse_qs(urlparse(response.url).query).get("code")[0] - except Exception as e: + except Exception: webbrowser.open(response.url) print( "Please log in to the web page that just opened and try again." diff --git a/getmyancestors/getmyancestors.py b/getmyancestors/getmyancestors.py index 0848766..6b535fb 100644 --- a/getmyancestors/getmyancestors.py +++ b/getmyancestors/getmyancestors.py @@ -8,7 +8,6 @@ import getpass import re import sys import time -from urllib.parse import unquote # local imports from getmyancestors.classes.session import Session diff --git a/setup.cfg b/setup.cfg index a57ff57..d5a420a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -27,16 +27,21 @@ exclude_lines = [pycodestyle] -max-line-length = 88 +max-line-length = 100 [flake8] per-file-ignores = # Allow unused imports in __init__.py files - ; __init__.py:F401, - -max-line-length = 88 + getmyancestors/__init__.py:F401, + # Ignore E203 whitespace before ':' for thehse files + getmyancestors/classes/gedcom.py:E203 + getmyancestors/classes/tree.py:E203 + # Allow long lines in the translation file + getmyancestors/classes/translation.py:E501 + +max-line-length = 100 ignore = # line break before binary operator