Skip to content

Commit

Permalink
issue devmanorg#110 create module utils.
Browse files Browse the repository at this point in the history
Fix test_are_tabs_used_for_indentation
  • Loading branch information
Ranc58 committed Apr 26, 2018
1 parent 86d302f commit fecc824
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion fiasko_bro/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .code_validator import CodeValidator, validate_repo
from .validator_helpers import tokenized_validator
from .utils.validator_helpers import tokenized_validator
from .repository_info import LocalRepositoryInfo
2 changes: 1 addition & 1 deletion fiasko_bro/pre_validation_checks/encoding.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from fiasko_bro.config import VALIDATOR_SETTINGS
from ..file_helpers import is_in_utf8
from ..utils.file_helpers import is_in_utf8


def are_sources_in_utf(path_to_repo, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion fiasko_bro/pre_validation_checks/repo_size.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .. import code_helpers
from ..utils import code_helpers


def are_repos_too_large(path_to_repo, max_num_of_py_files, path_to_original_repo=None, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion fiasko_bro/repository_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import git

from fiasko_bro.config import VALIDATOR_SETTINGS
from . import file_helpers
from .utils import file_helpers


class LocalRepositoryInfo:
Expand Down
8 changes: 8 additions & 0 deletions fiasko_bro/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from .ast_helpers import *
from .code_helpers import *
from .configparser_helpers import *
from .configparser_helpers import *
from .file_helpers import *
from .list_helpers import *
from .url_helpers import *
from .validator_helpers import *
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions fiasko_bro/validators/code_inclusion.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from .. import code_helpers
from .. import url_helpers
from .. import file_helpers
from ..utils import code_helpers, url_helpers, file_helpers


def is_mccabe_difficulty_ok(solution_repo, max_complexity, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions fiasko_bro/validators/comments.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ast

from .. import ast_helpers
from .. import url_helpers
from ..utils import ast_helpers, url_helpers


def has_no_extra_dockstrings(solution_repo, whitelists, functions_with_docstrings_percent_limit, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion fiasko_bro/validators/files.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os

from .. import url_helpers
from ..utils import url_helpers


def has_no_long_files(solution_repo, max_number_of_lines, *args, **kwargs):
Expand Down
3 changes: 1 addition & 2 deletions fiasko_bro/validators/imports.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from .. import ast_helpers
from .. import url_helpers
from ..utils import ast_helpers, url_helpers


def has_no_star_imports(solution_repo, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion fiasko_bro/validators/naming.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import builtins

from .. import ast_helpers
from ..utils import ast_helpers
from ..i18n import _


Expand Down
3 changes: 1 addition & 2 deletions fiasko_bro/validators/other_languages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import ast

from .. import ast_helpers
from .. import url_helpers
from ..utils import ast_helpers, url_helpers


def has_no_return_with_parenthesis(solution_repo, *args, **kwargs):
Expand Down
4 changes: 1 addition & 3 deletions fiasko_bro/validators/pythonic.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import ast

from .. import ast_nodes_validators
from .. import ast_helpers
from .. import code_helpers
from .. import url_helpers
from ..utils import ast_helpers, code_helpers, url_helpers
from ..i18n import _


Expand Down
2 changes: 1 addition & 1 deletion fiasko_bro/validators/requirements.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .. import list_helpers
from ..utils import list_helpers
from ..i18n import _


Expand Down
4 changes: 1 addition & 3 deletions fiasko_bro/validators/syntax.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import ast

from .. import ast_helpers
from .. import file_helpers
from .. import url_helpers
from ..utils import ast_helpers, file_helpers, url_helpers


def has_no_syntax_errors(solution_repo, *args, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


def test_are_tabs_used_for_indentation_fail_for_py_file(test_repo):
expected_output = 'tabs_used_for_indents', 'css_with_tabs.css'
expected_output = 'tabs_used_for_indents', 'js_with_tabs.js'
output = validators.are_tabs_used_for_indentation(
solution_repo=test_repo,
)
Expand Down

0 comments on commit fecc824

Please sign in to comment.