Skip to content

Commit

Permalink
fix: ruff exception Trawlwatcher.py on exception
Browse files Browse the repository at this point in the history
Trawlwatcher.py:15:11: TRY003 Avoid specifying long messages outside the exception class
  • Loading branch information
rv2931 committed Mar 1, 2024
1 parent b3c673e commit 883ef7b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Trawlwatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
layout="wide",
)

class EnvFileNotFoundError(FileNotFoundError):
def __init__(self, env_path:str) -> None:
super().__init__(f"Couldn't find .env file at {env_path}")

# FILL IN YOUR CREDENTIALS .env file HERE !!
env_path = Path('.') / '.env.template'
env_path = Path('.') / '.env.template2'
if not env_path.is_file():
raise FileNotFoundError(f"Couldn't find .env file at {env_path.absolute()}")
raise EnvFileNotFoundError(env_path.absolute())
load_dotenv(env_path)

def local_css(file_name: str) -> None:
Expand Down

0 comments on commit 883ef7b

Please sign in to comment.