-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clean up some http code+tests, and add auth setup documentation #40
Conversation
…tation for auth setup
@@ -32,7 +34,23 @@ def get_config() -> configparser.ConfigParser: | |||
"""Reads the config file and returns a ConfigParser object.""" | |||
config = configparser.ConfigParser() | |||
if not config.read(CONFIG_PATH): | |||
raise Exception(f"Please add your configuration file at '{CONFIG_PATH}'") | |||
raise Exception( | |||
f"""Please add your configuration file at '{CONFIG_PATH}' with the following format: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmagier1 , you'll appreciate this.
@@ -65,14 +83,16 @@ def get_default_host(host: str | None = None) -> str: | |||
(host for host in hosts if config.getboolean(host, "is_default", fallback=False) is True), | |||
hosts[0], | |||
) | |||
if first_default_host == 'localhost': | |||
if first_default_host == "localhost": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In ruby '
and "
are slightly different. You only use "
if you're going to do string interpolation. This is very ingrained into me, so I'm always using '
by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we using black and isort on this project?
I always type '
to avoid an extra keystroke (shift), and then let the autoformatter deal with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears we are and I just haven't installed the pre-commit hooks. My bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate your focus on developer efficiency, btw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sometimes laziness and efficiency are the same thing
No description provided.