Skip to content

Commit

Permalink
pep8 compliance (#257)
Browse files Browse the repository at this point in the history
add pep8 check to continuous integration tests and bring codebase into compliance

automatic commit by git-black, original commits:
  0e01064
  • Loading branch information
cmcarthur authored and iknox-fa committed Feb 8, 2022
1 parent 9e0fdf9 commit 9f3c1ad
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
4 changes: 1 addition & 3 deletions core/dbt/deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class AdapterDeprecationWarning(DBTDeprecation):
def warn(name, *args, **kwargs):
if name not in deprecations:
# this should (hopefully) never happen
raise RuntimeError(
"Error showing deprecation warning: {}".format(name)
)
raise RuntimeError("Error showing deprecation warning: {}".format(name))

deprecations[name].show(*args, **kwargs)

Expand Down
10 changes: 5 additions & 5 deletions core/dbt/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def track_run(task):
dbt.tracking.track_invocation_start(config=task.config, args=task.args)
try:
yield
dbt.tracking.track_invocation_end(
dbt.tracking.track_invocation_end(config=task.config, args=task.args, result_type="ok")
config=task.config, args=task.args, result_type="ok"
)
except (NotImplementedException,
Expand Down Expand Up @@ -260,7 +260,7 @@ def _build_base_subparser():
)

base_subparser.add_argument(
'--profiles-dir',
"--profiles-dir",
default=None,
dest="sub_profiles_dir", # Main cli arg precedes subcommand
type=str,
Expand All @@ -272,7 +272,7 @@ def _build_base_subparser():
)
base_subparser.add_argument(
'--profile',
"--profile",
required=False,
type=str,
help='''
Expand All @@ -282,7 +282,7 @@ def _build_base_subparser():
base_subparser.add_argument(
'-t',
'--target',
"--target",
default=None,
type=str,
help='''
Expand Down Expand Up @@ -478,7 +478,7 @@ def _build_snapshot_subparser(subparsers, base_subparser):
''',
)
sub.add_argument(
'--threads',
"--threads",
type=int,
required=False,
help='''
Expand Down
3 changes: 1 addition & 2 deletions core/dbt/task/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ def __is_protected_path(self, path):
protected_paths = self.config.model_paths + \
self.config.test_paths + ['.']
protected_abs_paths = [os.path.abspath(p) for p in protected_paths]
return abs_path in set(protected_abs_paths) or \
self.__is_project_path(abs_path)
return abs_path in set(protected_abs_paths) or self.__is_project_path(abs_path)

def run(self):
"""
Expand Down
2 changes: 1 addition & 1 deletion core/dbt/tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ def track_invocation_end(
)


def track_invalid_invocation(
def track_invalid_invocation(config=None, args=None, result_type=None):
config=None, args=None, result_type=None
):
assert active_user is not None, \
Expand Down

0 comments on commit 9f3c1ad

Please sign in to comment.