1
0
mirror of https://github.com/ilri/csv-metadata-quality.git synced 2024-12-22 12:12:18 +01:00

csv_metadata_quality/experimental.py: Move all imports to top of file
All checks were successful
continuous-integration/drone/push Build is passing

PEP8 recommends keeping imports at the top of the file. Also, I had
to re-work the issn/isbn so they didn't conflict with the functions
in check.py (flake8 warned about them being redefined).

Imports sorted with isort.

See: https://www.python.org/dev/peps/pep-0008/#imports
This commit is contained in:
Alan Orth 2021-03-16 16:13:34 +02:00
parent ab3af2ec62
commit 14010896a5
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -1,5 +1,9 @@
import re
import langid
import pandas as pd
from colorama import Fore
from pycountry import languages
def correct_language(row):
@ -11,11 +15,6 @@ def correct_language(row):
language and returns the value in the language field if it does match.
"""
import re
import langid
from pycountry import languages
# Initialize some variables at global scope so that we can set them in the
# loop scope below and still be able to access them afterwards.
language = ""