Use get_country for Schengen report
This commit is contained in:
parent
f499015466
commit
f41930f811
4 changed files with 7 additions and 51 deletions
|
|
@ -40,47 +40,6 @@ SCHENGEN_COUNTRIES = {
|
|||
"ch", # Switzerland
|
||||
}
|
||||
|
||||
# Country code to emoji flag mapping
|
||||
COUNTRY_FLAG_MAP = {
|
||||
"at": "🇦🇹", # Austria
|
||||
"be": "🇧🇪", # Belgium
|
||||
"bg": "🇧🇬", # Bulgaria
|
||||
"hr": "🇭🇷", # Croatia
|
||||
"cz": "🇨🇿", # Czech Republic
|
||||
"dk": "🇩🇰", # Denmark
|
||||
"ee": "🇪🇪", # Estonia
|
||||
"fi": "🇫🇮", # Finland
|
||||
"fr": "🇫🇷", # France
|
||||
"de": "🇩🇪", # Germany
|
||||
"gr": "🇬🇷", # Greece
|
||||
"hu": "🇭🇺", # Hungary
|
||||
"it": "🇮🇹", # Italy
|
||||
"lv": "🇱🇻", # Latvia
|
||||
"lt": "🇱🇹", # Lithuania
|
||||
"lu": "🇱🇺", # Luxembourg
|
||||
"mt": "🇲🇹", # Malta
|
||||
"nl": "🇳🇱", # Netherlands
|
||||
"pl": "🇵🇱", # Poland
|
||||
"pt": "🇵🇹", # Portugal
|
||||
"ro": "🇷🇴", # Romania
|
||||
"sk": "🇸🇰", # Slovakia
|
||||
"si": "🇸🇮", # Slovenia
|
||||
"es": "🇪🇸", # Spain
|
||||
"se": "🇸🇪", # Sweden
|
||||
"is": "🇮🇸", # Iceland
|
||||
"li": "🇱🇮", # Liechtenstein
|
||||
"no": "🇳🇴", # Norway
|
||||
"ch": "🇨🇭", # Switzerland
|
||||
}
|
||||
|
||||
|
||||
def get_country_flag(country_code: str) -> str:
|
||||
"""Get emoji flag for a country code."""
|
||||
if not country_code or not isinstance(country_code, str):
|
||||
return ""
|
||||
return COUNTRY_FLAG_MAP.get(country_code.lower(), "")
|
||||
|
||||
|
||||
def is_schengen_country(country_code: str) -> bool:
|
||||
"""Check if a country is in the Schengen area."""
|
||||
if not country_code or not isinstance(country_code, str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue