linted
This commit is contained in:
parent
fae628b534
commit
17ca8f8b33
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
||||
venv
|
||||
data/.cache.csv
|
||||
__pycache__
|
||||
.idea
|
||||
|
6
tww.py
6
tww.py
@ -3,10 +3,9 @@
|
||||
Find time now, in the past or future in any timezone or location.
|
||||
"""
|
||||
|
||||
import os
|
||||
import argparse
|
||||
import logging
|
||||
import sys
|
||||
import os
|
||||
|
||||
import dateparser
|
||||
from pytz.exceptions import UnknownTimeZoneError
|
||||
@ -20,6 +19,7 @@ basepath = os.path.dirname(os.path.abspath(__file__))
|
||||
logging.basicConfig()
|
||||
logger = logging.getLogger()
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('query', nargs='*', default="now", help="<datetime-like> to <timezone-like or location string>")
|
||||
@ -36,11 +36,11 @@ def setup_logging_level(debug=False):
|
||||
logger.debug("Debugging enabled")
|
||||
|
||||
|
||||
|
||||
class Location:
|
||||
"""
|
||||
Represents a location with name, latitude and longitude
|
||||
"""
|
||||
|
||||
def __init__(self, name: str, latitude: float, longitude: float):
|
||||
self.name = name
|
||||
self.latitude = latitude
|
||||
|
Loading…
Reference in New Issue
Block a user