Skip to content

Commit 1e31a77

Browse files
committed
run of isort, ruff, autoflake
1 parent 3219be3 commit 1e31a77

File tree

7 files changed

+46
-57
lines changed

7 files changed

+46
-57
lines changed

coverage.xml

Lines changed: 38 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" ?>
2-
<coverage version="7.6.0" timestamp="1721529816847" lines-valid="705" lines-covered="187" line-rate="0.2652" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
2+
<coverage version="7.6.0" timestamp="1721531383612" lines-valid="691" lines-covered="188" line-rate="0.2721" branches-covered="0" branches-valid="0" branch-rate="0" complexity="0">
33
<!-- Generated by coverage.py: https://coverage.readthedocs.io/en/7.6.0 -->
44
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd -->
55
<sources>
@@ -311,7 +311,7 @@
311311
</class>
312312
</classes>
313313
</package>
314-
<package name="dsg_lib.common_functions" line-rate="0.1387" branch-rate="0" complexity="0">
314+
<package name="dsg_lib.common_functions" line-rate="0.1468" branch-rate="0" complexity="0">
315315
<classes>
316316
<class name="__init__.py" filename="dsg_lib/common_functions/__init__.py" complexity="0" line-rate="1" branch-rate="0">
317317
<methods/>
@@ -621,83 +621,69 @@
621621
<line number="231" hits="0"/>
622622
</lines>
623623
</class>
624-
<class name="logging_config.py" filename="dsg_lib/common_functions/logging_config.py" complexity="0" line-rate="0.08108" branch-rate="0">
624+
<class name="logging_config.py" filename="dsg_lib/common_functions/logging_config.py" complexity="0" line-rate="0.1167" branch-rate="0">
625625
<methods/>
626626
<lines>
627627
<line number="33" hits="1"/>
628628
<line number="34" hits="1"/>
629629
<line number="35" hits="1"/>
630630
<line number="36" hits="1"/>
631-
<line number="38" hits="1"/>
632-
<line number="41" hits="1"/>
633-
<line number="103" hits="0"/>
634-
<line number="107" hits="0"/>
635-
<line number="114" hits="0"/>
636-
<line number="121" hits="0"/>
631+
<line number="37" hits="1"/>
632+
<line number="39" hits="1"/>
633+
<line number="42" hits="1"/>
634+
<line number="104" hits="0"/>
635+
<line number="108" hits="0"/>
636+
<line number="115" hits="0"/>
637637
<line number="122" hits="0"/>
638638
<line number="123" hits="0"/>
639-
<line number="126" hits="0"/>
639+
<line number="124" hits="0"/>
640640
<line number="127" hits="0"/>
641-
<line number="130" hits="0"/>
641+
<line number="128" hits="0"/>
642642
<line number="131" hits="0"/>
643-
<line number="134" hits="0"/>
644-
<line number="137" hits="0"/>
643+
<line number="132" hits="0"/>
644+
<line number="135" hits="0"/>
645645
<line number="138" hits="0"/>
646-
<line number="141" hits="0"/>
647-
<line number="144" hits="0"/>
648-
<line number="157" hits="0"/>
649-
<line number="159" hits="0"/>
650-
<line number="186" hits="0"/>
651-
<line number="188" hits="0"/>
646+
<line number="139" hits="0"/>
647+
<line number="142" hits="0"/>
648+
<line number="145" hits="0"/>
649+
<line number="158" hits="0"/>
650+
<line number="160" hits="0"/>
651+
<line number="187" hits="0"/>
652652
<line number="189" hits="0"/>
653-
<line number="194" hits="0"/>
654-
<line number="205" hits="0"/>
655-
<line number="207" hits="0"/>
653+
<line number="190" hits="0"/>
654+
<line number="195" hits="0"/>
655+
<line number="206" hits="0"/>
656656
<line number="208" hits="0"/>
657-
<line number="211" hits="0"/>
658-
<line number="214" hits="0"/>
659-
<line number="217" hits="0"/>
657+
<line number="209" hits="0"/>
658+
<line number="212" hits="0"/>
659+
<line number="215" hits="0"/>
660+
<line number="218" hits="0"/>
661+
<line number="219" hits="0"/>
662+
<line number="220" hits="0"/>
663+
<line number="221" hits="0"/>
664+
<line number="222" hits="0"/>
665+
<line number="224" hits="0"/>
666+
<line number="226" hits="0"/>
667+
<line number="227" hits="0"/>
668+
<line number="228" hits="0"/>
669+
<line number="229" hits="0"/>
660670
<line number="231" hits="0"/>
661671
<line number="232" hits="0"/>
662672
<line number="233" hits="0"/>
663673
<line number="234" hits="0"/>
664674
<line number="235" hits="0"/>
665675
<line number="236" hits="0"/>
676+
<line number="237" hits="0"/>
666677
<line number="238" hits="0"/>
667-
<line number="239" hits="0"/>
668-
<line number="240" hits="0"/>
669-
<line number="242" hits="0"/>
678+
<line number="241" hits="0"/>
670679
<line number="243" hits="0"/>
671-
<line number="244" hits="0"/>
672680
<line number="246" hits="0"/>
673-
<line number="247" hits="0"/>
674681
<line number="248" hits="0"/>
675682
<line number="250" hits="0"/>
676-
<line number="251" hits="0"/>
677683
<line number="252" hits="0"/>
678684
<line number="254" hits="0"/>
679-
<line number="255" hits="0"/>
685+
<line number="256" hits="0"/>
680686
<line number="257" hits="0"/>
681-
<line number="258" hits="0"/>
682-
<line number="260" hits="0"/>
683-
<line number="261" hits="0"/>
684-
<line number="262" hits="0"/>
685-
<line number="264" hits="0"/>
686-
<line number="265" hits="0"/>
687-
<line number="267" hits="0"/>
688-
<line number="268" hits="0"/>
689-
<line number="269" hits="0"/>
690-
<line number="270" hits="0"/>
691-
<line number="271" hits="0"/>
692-
<line number="272" hits="0"/>
693-
<line number="273" hits="0"/>
694-
<line number="275" hits="0"/>
695-
<line number="277" hits="0"/>
696-
<line number="280" hits="0"/>
697-
<line number="282" hits="0"/>
698-
<line number="283" hits="0"/>
699-
<line number="285" hits="0"/>
700-
<line number="286" hits="0"/>
701687
</lines>
702688
</class>
703689
<class name="patterns.py" filename="dsg_lib/common_functions/patterns.py" complexity="0" line-rate="0.1765" branch-rate="0">

dsg_lib/common_functions/email_validation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@
3838
"""
3939
from enum import Enum
4040
from typing import Dict, List, Union
41-
from loguru import logger
41+
4242
from email_validator import (
4343
EmailNotValidError,
4444
EmailUndeliverableError,
4545
caching_resolver,
4646
validate_email,
4747
)
48+
from loguru import logger
4849

4950

5051
class DNSType(Enum):

examples/fastapi_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from sqlalchemy import Column, ForeignKey, Select, String
1717
from sqlalchemy.orm import relationship
1818
from tqdm import tqdm
19-
from dsg_lib.fastapi_functions import system_health_endpoints # , system_tools_endpoints
2019

2120
from dsg_lib.async_database_functions import (
2221
async_database,
@@ -25,6 +24,7 @@
2524
database_operations,
2625
)
2726
from dsg_lib.common_functions import logging_config
27+
from dsg_lib.fastapi_functions import system_health_endpoints # , system_tools_endpoints
2828

2929
logging_config.config_log(logging_level='INFO', log_serializer=False, log_name='log.log')
3030

examples/log_example.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
import logging
88
import secrets
99
import threading
10+
1011
from loguru import logger
1112
from tqdm import tqdm
13+
1214
from dsg_lib.common_functions import logging_config
1315

1416
# Configure logging as before

examples/validate_emails.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@
3737
Date: 2024/05/16
3838
License: MIT
3939
"""
40-
from dsg_lib.common_functions.email_validation import validate_email_address
41-
4240
import pprint
4341
import time
4442

43+
from dsg_lib.common_functions.email_validation import validate_email_address
4544

4645
if __name__ == "__main__":
4746

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ bump-release: ## Bump the release version number x.x.x-beta.1
3737
bump-patch: ## Bump the patch version number x.x.1
3838
bump2version patch
3939

40-
cleanup: ruff autoflake flake8 ## Run ruff, autoflake, and flake8 to clean up and format Python code
40+
cleanup: isort ruff autoflake ## Run isort, ruff, autoflake
4141

4242
create-docs: ## Build and deploy the project's documentation
4343
python3 scripts/changelog.py

tests/test_common_functions/test_email_validation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import pytest
2+
23
from dsg_lib.common_functions.email_validation import validate_email_address
34

45

0 commit comments

Comments
 (0)