-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(lint): fixing linter issues #102
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[flake8] | ||
max-line-length = 100 | ||
max-complexity = 18 | ||
select = | ||
"B", # Bugbear | ||
"C", # Cyclomatic complexity | ||
"E", # PEP8 errors | ||
"F", # PyFlakes | ||
"W", # PEP8 warnings | ||
"T4", # Flake8 plugins that check typing | ||
"B9", # Bugbear | ||
#require-plugins = | ||
# "flake8-bugbear", | ||
# "flake8-black", |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: [flake8-black, flake8-bugbear] | ||
args: [--config, .flake8] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.1 | ||
hooks: | ||
- id: ruff | ||
args: [--fix] | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
args: [--profile, black] | ||
- repo: local | ||
hooks: | ||
- id: pytest | ||
name: pytest | ||
entry: pytest | ||
language: system | ||
pass_filenames: false | ||
always_run: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
pydantic = "*" | ||
fastapi = "*" | ||
pydantic-settings = "*" | ||
mangum = "*" | ||
httpx = "*" | ||
|
||
[dev-packages] | ||
pre-commit = "*" | ||
pytest = "*" | ||
black = "*" | ||
flake8 = "*" | ||
pylint = "*" | ||
mypy = "*" | ||
Comment on lines
+13
to
+19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Dev dependencies align well with project needs; consider version specifications. The development dependencies listed align well with the project's linting and testing needs, and they correspond to the configurations in For better reproducibility of the development environment, consider specifying version ranges for these packages as well. For example:
This ensures consistent behavior across different development environments while still allowing for minor updates and bug fixes. |
||
|
||
[requires] | ||
python_version = "3.12" |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
from setuptools import setup | ||
|
||
with open('requirements.txt') as f: | ||
with open("requirements.txt") as f: | ||
required = f.read().splitlines() | ||
|
||
with open('VERSION.txt') as f: | ||
with open("VERSION.txt") as f: | ||
version = f.read().splitlines() | ||
|
||
setup( | ||
name="python command base", | ||
version=str(version), | ||
py_modules=['src'], | ||
py_modules=["src"], | ||
package_dir={"": "src"}, | ||
install_requires=required, | ||
author=', '.join(["mnq78"]), | ||
author_email=', '.join(["matias.quiroga@nan-labs.com"]), | ||
entry_points=''' | ||
author=", ".join(["mnq78"]), | ||
author_email=", ".join(["matias.quiroga@nan-labs.com"]), | ||
entry_points=""" | ||
[console_scripts] | ||
pycmd=app:start | ||
''', | ||
""", | ||
description="Developer tool CLI base.", | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
import factory | ||
from faker import Factory | ||
|
||
from models.user_model import Users | ||
|
||
faker = Factory.create() | ||
|
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.
🛠️ Refactor suggestion
Consider specifying version ranges for production dependencies.
While using "*" for package versions allows for the latest updates, it may lead to unexpected behavior or compatibility issues in the future. For production dependencies, it's generally recommended to specify version ranges or pin specific versions.
Consider updating the [packages] section to include version ranges. For example:
This ensures compatibility while still allowing for minor updates and bug fixes.