Skip to content

Commit

Permalink
feat($flake8): add more code constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnymillergh committed Sep 17, 2022
1 parent d12417a commit b978b9b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 6 deletions.
7 changes: 7 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ matplotlib = "==3.5.3"
# Black is the uncompromising Python code formatter. By using it, you agree to cede control over minutiae of
# hand-formatting. https://pypi.org/project/black/
black = "==22.6.0"
# Naming Convention checker for Python. https://github.com/PyCQA/pep8-naming
pep8-naming = "==0.13.2"
# Linting & toolkit for checking your code base against coding style (PEP8). https://pypi.org/project/flake8/
flake8 = "==5.0.4"
# https://github.com/DmytroLitvinov/awesome-flake8-extensions
flake8-quotes = "==3.3.1"
flake8-print = "==5.0.0"
flake8-use-fstring = "==1.4"
flake8-comprehensions = "==3.10.0"
# isort your imports, so you don't have to. https://pypi.org/project/isort/
isort = "==5.10.1"
# Add type annotations to your Python programs, and use mypy to type check them. https://pypi.org/project/mypy/
Expand Down
55 changes: 50 additions & 5 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python_boilerplate/demo/pandas_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def submit_parallel_tasks() -> list[DataFrame]:
futures.append(generate_random_data(5000))
wait(futures)
logger.info(f"All {len(futures)} tasks has done")
return list(map(lambda x: x.result(), futures))
return [future.result() for future in futures]


@elapsed_time("DEBUG")
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ ignore = E203, E266, E501, W503
max-line-length = 88
max-complexity = 18
select = B,C,E,F,W,T4
inline-quotes = "
multiline-quotes = "
docstring-quotes = "
[isort]
multi_line_output = 3
Expand Down

0 comments on commit b978b9b

Please sign in to comment.